package thyyxxk.webserver.constants.sidicts;

import thyyxxk.webserver.utils.StringUtil;

/**
 * 政策项
 * */
public enum PolItemCode {
    
    QZF("101", "全自费"),

    YLXZF("102", "乙类先自付"),

    CXEZF("103", "超限额自付"),

    CJD("BS01", "冲减段"),

    TCYD("C001", "统筹一段"),

    TCED("C002", "统筹二段"),

    TCSD("C003", "统筹三段"),

    BCYFQFBZ("S001", "本次应付起付标准"),

    GWYBCQFBZ("GBS1", "公务员补充起付标准"),

    GWYBCDYD("GB01", "公务员补充第一段"),

    GWYBCDED("GB02", "公务员补充第二段"),

    GWYBCDSD("GB03", "公务员补充第三段"),

    GWYBCDSID("GB04", "公务员补充第四段"),

    BCDBQFBZ("PS01", "补充大病起付标准"),

    BCDBDYD("PL01", "补充大病第一段"),

    BCDBDED("PL02", "补充大病第二段"),

    BCDBDSD("PL03", "补充大病第三段"),

    BCDBDSID("PL04", "补充大病第四段"),

    EWBZDYD("AB01", "额外补助第一段"),

    EWBZDED("AB02", "额外补助第二段"),

    YLBZQFBZ("YBS1", "医疗补助起付标准"),

    YLBZDYD("YB01", "医疗补助第一段"),

    YLBZDED("YB02", "医疗补助第二段"),

    STDDEZF("JB02", "双通道大额支付"),

    DEYD("L001", "大额一段"),

    CBFY("E000", "超标费用"),

    ZWZL("S000", "转外自理"),

    STDTCZF("JB01", "双通道统筹支付"),

    THBDYD("TH01", "特惠保第一段"),

    MZWFD("C000", "门诊(无分段)"),

    ZBMLBCED("JP02", "直报目录补充二段"),

    JBYLCFDD("EC01", "基本医疗超封顶段");

    private final String code;
    private final String name;

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

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

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