package com.openhis.web.regdoctorstation.dto;

import java.util.ArrayList;
import java.util.List;

import com.openhis.common.enums.EncounterStatus;

import com.openhis.common.enums.EncounterZyStatus;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 住院医生站 init基础数据
 */
@Data
@Accessors(chain = true)
public class RegDoctorStationInitDto {

    private List<RegPatientEncounterStatusOption> regPatientEncounterStatusOptions;

    /**
     * 住院患者就诊状态
     */
    @Data
    public static class RegPatientEncounterStatusOption {
        private Integer value;
        private String label;

        public RegPatientEncounterStatusOption(Integer value, String label) {
            this.value = value;
            this.label = label;
        }
    }

    /**
     * 设置默认值
     */
    public RegDoctorStationInitDto() {
        List<RegPatientEncounterStatusOption> options = new ArrayList<>();
        // 已入院
        options.add(new RegPatientEncounterStatusOption(EncounterZyStatus.ADMITTED_TO_THE_HOSPITAL.getValue(),
            EncounterZyStatus.ADMITTED_TO_THE_HOSPITAL.getInfo()));
        // 已出院
        options.add(new RegPatientEncounterStatusOption(EncounterZyStatus.DISCHARGED_FROM_HOSPITAL.getValue(),
            EncounterZyStatus.DISCHARGED_FROM_HOSPITAL.getInfo()));

        this.regPatientEncounterStatusOptions = options;
    }

}
