package com.openhis.web.datadictionary.dto;

import java.math.BigDecimal;

import com.core.common.annotation.Excel;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 药品目录导入Dto
 *
 * @author Thanking
 * @date 2025-08-18
 */
@Data
@Accessors(chain = true)
public class MedicationImportDto {

    /** 行号 */
    private Integer lineNumber;

    // ---------------------- 药品定义 med_medication_definition -------------------------------------

    /** 药品名称 */
    @Excel(name = "药品名称", prompt = "必填")
    private String name;

    /** 药品版本 */
    @Excel(name = "药品版本")
    private String version;

    /** 英文药名 */
    @Excel(name = "英文药名")
    private String nameEn;

    /** 药品分类 */
    @Excel(name = "药品分类", prompt = "必填", dictType = "med_category_code", comboReadDict = true)
    private String categoryCode;

    /** 商品名称 */
    @Excel(name = "商品名称", prompt = "必填")
    private String merchandiseName;

    /** 药品性质 */
    @Excel(name = "药品性质", prompt = "必填", dictType = "medicine_properties", comboReadDict = true)
    private String pharmacologyCategoryCode;

    /** 药品单位 */
    @Excel(name = "药品单位", prompt = "必填", dictType = "unit_code", comboReadDict = true)
    private String unitCode;

    /** 最小单位 */
    @Excel(name = "最小单位", prompt = "必填", dictType = "unit_code", comboReadDict = true)
    private String minUnitCode;

    /** 拆零比 */
    @Excel(name = "拆零比", prompt = "必填，数值类型")
    private String partPercentStr;
    private BigDecimal partPercent;

    /** 剂量形式 */
    @Excel(name = "剂量形式", prompt = "必填", dictType = "dose_form_code", comboReadDict = true)
    private String doseFrom;

    /** 批准文号 */
    @Excel(name = "批准文号")
    private String approvalNumber;

    /** 医保是否对码 */
    @Excel(name = "医保是否对码", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String ybMatchFlag;

    /** 医保编码 */
    @Excel(name = "医保编码", prompt = "医保对码时必填")
    private String ybNo;

    /** 是否皮试 */
    @Excel(name = "是否皮试", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String skinTestFlag;

    /** 是否为注射药物 */
    @Excel(name = "是否为注射药物", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String injectFlag;

    /** 是否限制使用 */
    @Excel(name = "是否限制使用", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String restrictedFlag;

    /** 限制使用范围 */
    @Excel(name = "限制使用范围", prompt = "限制使用时必填")
    private String restrictedScope;

    /** 儿童用药标志 */
    @Excel(name = "儿童用药标志", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String childrenFlag;

    /** 贯标国家编码 */
    @Excel(name = "贯标国家编码")
    private String nationalDrugCode;

    /** 拆分属性 */
    @Excel(name = "拆分属性", prompt = "必填",
        readConverterExp = "1=门诊按最小单位每次量向上取整,2=门诊按包装单位不可拆分,3=门诊按最小单位总量向上取整,4=门诊按包装单位每次量向上取整",
        combo = "门诊按最小单位每次量向上取整,门诊按包装单位不可拆分,门诊按最小单位总量向上取整,门诊按包装单位每次量向上取整")
    private String partAttributeEnum;

    /** 是否抗生素 */
    @Excel(name = "是否抗生素", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String antibioticFlag;

    /** 抗生素分类 */
    @Excel(name = "抗生素分类", prompt = "抗生素时必填", dictType = "antibiotic_type_code", comboReadDict = true)
    private String antibioticCode;

    /** 是否自制 */
    @Excel(name = "是否自制", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String selfFlag;

    /** 基药标识 */
    @Excel(name = "基药标识", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String basicFlag;

    /** 生产厂商文本 */
    @Excel(name = "生产厂商文本", prompt = "必填")
    private String manufacturerText;

    /** 住院临时医嘱拆分属性 */
    @Excel(name = "住院临时医嘱拆分属性", prompt = "必填", width = 20,
        readConverterExp = "1=临时医嘱按最小单位每次量向上取整,2=临时医嘱按包装单位开立,3=临时医嘱按最小单位总量向上取整,4=临时医嘱按包装单位每次量向上取整",
        combo = "临时医嘱按最小单位每次量向上取整,临时医嘱按包装单位开立,临时医嘱按最小单位总量向上取整,临时医嘱按包装单位每次量向上取整")
    private String thoPartAttributeEnum;

    /** 剂量单位换算比 */
    @Excel(name = "剂量单位换算比", prompt = "必填，数值类型")
    private String unitConversionRatioStr;
    private BigDecimal unitConversionRatio;

    /** 医保等级 */
    @Excel(name = "医保等级", prompt = "必填", dictType = "chrgitm_lv", comboReadDict = true)
    private String chrgitmLv;

    /** 处方标志 */
    @Excel(name = "处方标志", prompt = "必填", readConverterExp = "0=否,1=是", combo = "否,是")
    private String rxFlag;

    /** 最小库存警戒数量(常规单位) */
    @Excel(name = "最小库存警戒数量(常规单位)", width = 25, prompt = "必填，数值类型")
    private String itemMinQuantityStr;
    private BigDecimal itemMinQuantity;

    /** 最大库存警戒数量(常规单位) */
    @Excel(name = "最大库存警戒数量(常规单位)", width = 25, prompt = "必填，数值类型")
    private String itemMaxQuantityStr;
    private BigDecimal itemMaxQuantity;

    // ---------------------- 药品基本信息 med_medication ----------------------------------------------

    /** 所在位置名称（locationId） */
    @Excel(name = "所在位置名称", prompt = "必填")
    private String locationName;

    /** 规格 */
    @Excel(name = "规格", prompt = "必填")
    private String totalVolume;

    /** 用法 */
    @Excel(name = "用法", dictType = "method_code", comboReadDict = true)
    private String methodCode;

    /** 用药频次 */
    @Excel(name = "用药频次", dictType = "rate_code", comboReadDict = true)
    private String rateCode;

    /** 单次剂量 */
    @Excel(name = "单次剂量", prompt = "数值类型")
    private String doseStr;
    private BigDecimal dose;

    /** 剂量单位 */
    @Excel(name = "剂量单位", dictType = "unit_code", comboReadDict = true)
    private String doseUnitCode;

    /** 单次最大剂量 */
    @Excel(name = "单次最大剂量", prompt = "数值类型")
    private String maxUnitStr;
    private BigDecimal maxUnit;

    // ---------------------- 费用定价 adm_charge_item_definition ----------------------------------------------

    /** 财务类别 */
    @Excel(name = "财务类别", prompt = "必填", dictType = "fin_type_code", comboReadDict = true)
    private String typeCode;

    /** 医保费用类别 */
    @Excel(name = "医保费用类别", prompt = "必填", dictType = "med_chrgitm_type", comboReadDict = true)
    private String ybType;

    // ---------------------- 费用定价子表 adm_charge_item_def_detail ----------------------------------------------

    /** 购入价 */
    @Excel(name = "购入价", prompt = "必填，数值类型")
    private String purchasePriceStr;
    private BigDecimal purchasePrice;

    /** 零售价 */
    @Excel(name = "零售价", prompt = "必填，数值类型")
    private String retailPriceStr;
    private BigDecimal retailPrice;

    /** 最高零售价 */
    @Excel(name = "最高零售价", prompt = "必填，数值类型")
    private String maximumRetailPriceStr;
    private BigDecimal maximumRetailPrice;

}
