package thyyxxk.webserver.entity.medicaladvice.medicamanage.drugmanage;

import thyyxxk.webserver.utils.StringUtil;

/**
 * @Description:药单类别枚举
 * @Author:lihong
 * @Date: 2023/9/27
 */
public enum PageClassEnum {
    CYDY("1","出院带药"),
    DMY("2","毒麻药单"),
    JSY("3","基数药"),
    DSY("4","大输液"),
    CQKF("5","长期口服"),
    LSKF("6","临时口服"),
    TLD("7","统领单"),
    MZLYD("8","门诊领药单"),
    ZCYYD("Z","中草药单"),
    TYD("T","退药单"),
    YJKSLY("A","医技科室领药"),
    JYYP("Y","节余药品");


    private String code;
    private String name;

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

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }


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