package thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru;

import lombok.Data;
import thyyxxk.webserver.utils.StringUtil;

import java.math.BigDecimal;

/**
 * <p>
 * 描述：搜索医嘱名字
 * </p>
 *
 * @author xc
 * @date 2022-01-10 15:48
 */
@Data
public class YiZhuMingChen {

    private String id;
    private String pyCode;
    private String dCode;
    private String patternCode;
    private String patternName;
    private String orderCode;
    private String orderName;
    private String specification;
    private String orderType;
    private String parentCode;
    private String excluGroupType;
    private String discription;
    private String serial;
    private String groupNo;
    private String groupName;
    private String infusionFlag;
    private String drugFlag;

    private float packSize;
    private String packSizeName;

    private String orderClass;
    private String specPack;
    private String jsyFlag;
    private String xnhFlag;
    private String ybComment;
    private String dosage;
    private String ybType;
    private String fatherFlag;
    private String manuName;
    /**
     * 医保编码
     */
    private String nationalCode;
    private String nationalName;

    /**
     * 默认的执行科室
     */
    private String execDept;
    private String execDeptName;

    //---------------------------------草药医嘱要用的
    /**
     * 草药医嘱用的 项目编码
     */
    private String chargeCode;
    private String chargeCodeName;
    /**
     * 草药医嘱用的 金额
     */
    private BigDecimal retprice;
    private BigDecimal quantity;
    private String selfFlag;
    private String supriceFlag;
    private String instruction;
    /**
     * 库存
     */
    private String stockAmount;
    private String ybFlagNew;
    private String drugSpecification;
    private String billItemZy;
    private String miniUnitName;

    private String minAgeRestriction;
    private String maxAgeRestriction;
    private String genderRestriction;
//--------end-------------------------草药医嘱要用的

    /**
     * 毒药
     *
     * @return 返回枚举
     */
    public String getDrugFlagName() {
        if (StringUtil.isBlank(drugFlag)) {
            return "";
        }
        switch (drugFlag) {
            case "1":
                return "毒性药品";
            case "2":
                return "麻醉药品";
            case "3":
                return "精神1类";
            case "4":
                return "精神2类";
            case "5":
                return "高危药品";
            case "6":
                return "终止妊娠类";
            default:
                return "未知";
        }
    }

    public String getInfusionFlagName() {
        if (StringUtil.isBlank(infusionFlag)) {
            return "";
        } else if (infusionFlag.equals("1")) {
            return "是";
        }
        return "";
    }

    public String getValue() {
        return this.orderCode;
    }

    public String getLabel() {
        return this.orderName;
    }


}
