package thyyxxk.webserver.constants.sidicts;

import thyyxxk.webserver.utils.StringUtil;

/**
 * @description: 目录类别（自建）
 * @author: DingJie
 * @create: 2021/8/514:16
 */
public enum Catalogue {

    PATENT_AND_WESTERN_MEDICINE_CATALOGUE("1301", "西药中成药目录"),

    CHINESE_HERBAL_CATALOGUE("1302", "中药饮片目录"),

    INSTITUTIONS_PREPARATIONS_CATALOGUE("1303", "医疗机构制剂目录"),

    ETHNIC_MEDICINE("1304", "民族药品目录"),

    MEDICAL_SERVICE_ITEMS_CATALOGUE("1305", "医疗服务项目目录"),

    MEDICAL_SUPPLIES_CATALOGUE("1306", "医用耗材目录"),

    DISEASES_AND_DIAGNOSIS_CATALOGUE("1307", "疾病与诊断目录"),

    OPERATION_CATALOGUE("1308", "手术操作目录"),

    OUTPATIENT_SPECIAL_CHRONIC_DISEASES_CATALOGUE("1309", "门诊慢特病种目录"),

    PAY_BY_DISEASE_CATALOGUE("1310", "按病种付费病种目录"),

    DAYTIME_SURGERY_DISEASES_CATALOGUE("1311", "日间手术治疗病种目录"),

    MEDICAL_INSURANCE_CATALOGUE("1312", "医保目录信息"),

    TUMOR_MORPHOLOGY_CATALOGUE("1313", "肿瘤形态学目录"),

    TRADITIONAL_CHINESE_DISEASES_CATALOGUE("1314", "中医疾病目录"),

    TCM_SYNDROME_CATALOGUE("1315", "中医证候目录"),

    MEDICAL_INSURANCE_MATCH_CATALOGUE("1316", "医疗目录与医保目录匹配信息"),

    MEDICAL_INSTITUTION_MATCH_CATALOGUE("1317", "医药机构目录匹配信息"),

    MEDICAL_INSURANCE_PRICE_LIMIT_CATALOGUE("1318", "医保目录限价信息"),

    MEDICAL_INSURANCE_PAY_FIRST_CATALOGUE("1319", "医保目录先自付比例信息"),

    DICTIONARY_LIST("1901", "字典表");

    private final String code;
    private final String name;

    Catalogue(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static Catalogue get(String code) {
        if (StringUtil.isBlank(code)) {
            return null;
        }
        for (Catalogue catalogue : Catalogue.values()) {
            if (code.trim().equals(catalogue.getCode())) {
                return catalogue;
            }
        }
        return null;
    }
}
