package thyyxxk.webserver.constants.sidicts;

import thyyxxk.webserver.utils.StringUtil;

/**
 * @description: 业务申请类型
 * @author: DingJie
 * @create: 2021/7/2615:06
 */
public enum BizAppyType {

    SLOW_SPECIAL_DISE_REGISTRATION("01", "门慢门特登记"),

    ACCIDENTAL_INJURY_REGISTRATION("02", "意外伤害登记"),

    REGISTRATION_OF_DESIGNATED_MEDICAL_INSTITUTIONS("03", "就医定点医疗机构登记"),

    FAMILY_BED_REGISTRATION("04", "家庭病床登记"),

    FAMILY_DOCTOR_SIGNING_REGISTRATION("05", "家庭医生签约登记"),

    REFERRAL_REGISTRATION("06", "转诊转院登记"),

    REMOTE_EMERGENCY_HOSPITALIZATION_REGISTRATION("07", "异地急诊住院登记"),

    RELOCATION_REGISTRATION("08", "异地安置登记"),

    SPECIAL_INSPECTION_AND_TREATMENT_REGISTRATION("09", "特检特治登记"),

    REGISTRATION_OF_SPECIAL_DRUGS("10", "特殊药品登记"),

    LONG_TERM_DRUG_REGISTRATION("11", "长期带药登记"),

    REGISTRATION_OF_PURCHASED_DRUGS("12", "代购药品登记"),

    BIRTH_RECORD_REGISTRATION("13", "生育备案登记"),

    ACCOUNT_FILING_REGISTRATION("14", "账户备案登记"),

    QUALIFICATION_OF_TEMPORARY_MEDICAL_ASSISTANCE_PERSONNEL("15", "临时医疗救助人员资格认定"),

    ANNUAL_RESCUE_FILING_AND_REGISTRATION("16", "年度救助备案登记"),

    SETTLEMENT_AND_REGISTRATION_BY_DISEASE("17", "按病种结算登记"),

    REGISTRATION_OF_SETTLEMENT_WITHOUT_MEDICAL_INSURANCE_CERTIFICATE("18", "无医保凭证结算备案登记"),

    REFUND_FILING_REGISTRATION("19", "退费备案登记"),

    EXTERNAL_INSPECTION_AND_OUTSOURCING_REGISTRATION("20", "外检外购登记"),

    OTHERS("99", "其他");

    private final String code;
    private final String name;

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

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

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