package com.diagbot.enums;

import lombok.Setter;

public enum CacheKeyEnum implements KeyedString {
    BEHOSPITAL_INFO("入院记录", "strAdmissionNote"),
    BLOOD_RESULT("输血后效果评价", "strBloodResult"),
    BLOOD_TRANSFUSION("输血/血制品病程记录", "strBloodTransfusion"),
    PERIOD_CONCLUSION("阶段小结", "strPeriodConclusion"),
    FIRST_RECORD("首次病程录","strFirstRecord"),
    TRANSFER_IN_NOTE("转入记录", "strTransferInNote"),
    TRANSFER_OUT_NOTE("转出记录", "strTransferOutNote"),
    ILL_CRITICALLY("病危通知书", "strIllCritically"),
    ILL_SERIOUSL("病重通知书", "strIllSeriousl"),
    DIFFICULT_CASE("疑难病例讨论记录", "strDifficultCase"),
    DEATH_NOTE("死亡记录", "strDeathNote"),
    DEATH_DISCUSSION("死亡病例讨论记录", "strDeathDiscussion"),
    WARD_RECORD("查房记录", "strWardRecord"),
    OPERATIVE_FIRST_RECORD("术后首次病程及谈话记录", "strOperativeFirstRecord"),
    PREOPERATIVE_DISCUSSION("术前讨论、术前小结", "strPreoperativeDiscussion"),
    OPERATIVE_NOTE("手术记录", "strOperativeNote"),
    RESCUE_NOTE("抢救记录", "strRescueNote"),
    CRISIS_NOTE("危急值记录", "strCrisisNote"),
    LEAVE_HOSPITAL("出院小结", "strLeaveHospital"),
    CONSULTATION_APPLY("会诊申请单", "strConsultationApply"),
    CONSULTATION_RESULT("会诊结果单", "strConsultationResult"),
    CONSULTATION_NOTE("会诊单", "strConsultationNote"),
    CONSULTATION_RECORD("会诊记录","strConsultationRecord");
    /*
    FIRST_RECORD(2, "aStrFirstRecordFacade"),
    HOME_PAGE(6, "病案首页"),
            (8, "医嘱信息"),
            (9, "交接班记录"),
            (10, "输血/血制品病程记录"),
            (12, "麻醉记录"),
            (13, "麻醉知情同意书"),
            (14, "麻醉术前访视记录"),
            (15, "麻醉术后访视记录"),
            (16, "手术知情同意书"),
    (20, "手术风险评估表"),
    (21, "手术安全核查表"),
    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, "有创操作"),
    */

    @Setter
    private String key;

    @Setter
    private String name;

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

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

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

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

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