package com.diagbot.enums;

import com.diagbot.core.KeyedNamed;
import lombok.Setter;

public enum ModeIdEnum implements KeyedNamed {
    BEHOSPITAL_INFO(1, "入院记录"),
    FIRST_RECORD(2, "首次病程录"),
    DEATH_DISCUSSION(3, "死亡病例讨论记录"),
    WARD_RECORD(4, "查房记录"),
    LEAVE_HOSPITAL(5, "出院小结"),
    HOME_PAGE(6, "病案首页"),
    CONSULTATION_NOTE1(7, "会诊记录"),
//            (8, "医嘱信息"),
//            (9, "交接班记录"),
        BLOODNOTE(10, "输血/血制品病程记录"),
    OPERATIVE_FRONT_SUM (11, "术前讨论、术前小结"),
//            (12, "麻醉记录"),
//            (13, "麻醉知情同意书"),
//            (14, "麻醉术前访视记录"),
//            (15, "麻醉术后访视记录"),
    OPERATIVE_AGREE_BOOK (16, "手术知情同意书"),
    OPERATIVE_FIRST_NOTE(18, "术后首次病程及谈话记录"),
//            (20, "手术风险评估表"),
OPERATIVE_SAFE_SURFACE (21, "手术安全核查表"),
    DIFFICULT_CASE(19, "疑难病例讨论记录"),
    OPERATIVE_NOTE(17, "手术记录"),
    RESCUE_NOTE(22, "抢救记录"),
    CRISIS_NOTE(23, "危急值记录"),
    DEATH_NOTE(24, "死亡记录"),
    ILL_CRITICALLY(25, "病危通知书"),
    TRANSFER_IN_NOTE(26, "转入记录"),
    TRANSFER_OUT_NOTE(27, "转出记录"),
    PERIOD_CONCLUSION(28, "阶段小结"),
    ILL_SERIOUSL(29, "病重通知书"),
    CONSULTATION_APPLY(30, "会诊申请单"),
    CONSULTATION_RESULT(31, "会诊结果单"),
    DATA_MODEL(32, "输血后效果评价"),
//    DATA_MODEL(33, "专科交接单"),
//    DATA_MODEL(34, "转科记录"),
//    DATA_MODEL(35, "病理检验送检单"),
//    DATA_MODEL(36, "自定义病程记录"),
//    DATA_MODEL(37, "病程信息"),
//    DATA_MODEL(52, "授权知情同意书"),
//    DATA_MODEL(53, "知情同意书"),
//    DATA_MODEL(54, "谈话告知书"),
//    DATA_MODEL(56, "日常病程录"),
    OTHER(55, "其他"),
    PACS_INTO(57, "检查信息"),
    LIS_INFO(58, "检验信息"),
    //LIS_INFO(59, "有创操作"),
    CONSULTATION_NOTE(60, "会诊单");
    @Setter
    private int key;

    @Setter
    private String name;

    ModeIdEnum(int key, String name) {
        this.key = key;
        this.name = name;
    }

    public static ModeIdEnum getEnum(int key) {
        for (ModeIdEnum item : ModeIdEnum.values()) {
            if (item.key == key) {
                return item;
            }
        }
        return null;
    }

    public static String getName(int key) {
        ModeIdEnum item = getEnum(key);
        return item != null ? item.name : null;
    }

    @Override
    public int getKey() {
        return key;
    }

    @Override
    public String getName() {
        return name;
    }
}
