/*
 * Copyright ©2023 CJB-CNIT Team. All rights reserved
 */
package com.openhis.web.pharmacymanage.dto;

import java.math.BigDecimal;
import java.util.Date;

import com.core.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.openhis.common.annotation.Dict;

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

/**
 * 发药/耗材单
 *
 * @author wangyang
 * @date 2025-03-14
 */
@Data
@Accessors(chain = true)
public class ItemDispenseOrderDto {

    /**
     * 发放药房
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long locationId;

    /**
     * 项目id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long itemId;

    /**
     * 发放id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long dispenseId;

    /**
     * 请求id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long requestId;

    /**
     * 就诊id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long encounterId;

    /**
     * 发放药房
     */
    @Excel(name = "发放药房",sort = 3)
    private String locationName;

    /**
     * 批次号
     */
    @Excel(name = "批次号",sort = 4)
    private String lotNumber;

    /**
     * 科室
     */
    @Excel(name = "科室",sort = 5)
    private String departmentName;

    /**
     * 开单医生ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long doctorId;

    /**
     * 开单医生
     */
    @Excel(name = "开单医生",sort = 6)
    private String doctorName;

    /**
     * 发药医生
     */
     @Excel(name = "发药医生",sort = 7)
    private String dispenseDoctorName;

    /**
     * 项目类型
     */
    @Dict(dictCode = "med_category_code")
    private String itemType;
    @Excel(name = "项目类型",sort = 8)
    private String itemType_dictText;



    /**
     * 发药状态
     */
    private Integer statusEnum;
    @Excel(name = "发药状态",sort = 9)
    private String statusEnum_enumText;

    /**
     * 诊断名称
     */
    @Excel(name = "诊断名称",sort = 10)
    private String conditionName;

    /**
     * 处方号
     */
    @Excel(name = "处方号",sort = 11)
    private String prescriptionNo;

    /**
     * 项目名称
     */
    @Excel(name = "项目名称",sort = 1,width = 30)
    private String itemName;

    /**
     * 规格
     */
    @Excel(name = "规格",sort = 2,width = 30)
    private String totalVolume;

    /**
     * 单次剂量
     */
    @Excel(name = "单次剂量",sort = 12)
    private BigDecimal dose;

    /**
     * 用药频次
     */
    @Dict(dictCode = "rate_code")
    private String rateCode;
    @Excel(name = "用药频次",sort = 13)
    private String rateCode_dictText;

    /**
     * 用法
     */
    @Dict(dictCode = "method_code")
    private String methodCode;
    @Excel(name = "用法",sort = 14)
    private String methodCode_dictText;



    /**
     * 剂量单位
     */
    @Dict(dictCode = "unit_code")
    private String doseUnitCode;
    @Excel(name = "剂量单位",sort = 15)
    private String doseUnitCode_dictText;



    /**
     * 单位
     */
    @Dict(dictCode = "unit_code")
    private String unitCode;
    @Excel(name = "单位",sort = 16)
    private String unitCode_dictText;


    /**
     * 单次发药数
     */
    @Excel(name = "单次发药数",sort = 17)
    private Integer dispensePerQuantity;

    /**
     * 每次发药供应天数
     */
    @Excel(name = "每次发药供应天数",sort = 18)
    private Integer dispensePerDuration;

    /**
     * 数量
     */
    @Excel(name = "数量",sort = 19)
    private Integer quantity;

    /**
     * 单价
     */
    @Excel(name = "单价",sort = 20)
    private BigDecimal unitPrice;

    /**
     * 金额
     */
    @Excel(name = "金额",sort = 21)
    private BigDecimal totalPrice;
    /**
     * 组合号
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long groupId;

    /**
     * 就诊NO
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "就诊NO",sort = 24)
    private String encounterBusNo;

    /** 开具日期 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "开具日期",sort = 25, dateFormat = "yyyy-MM-dd HH:mm:ss",width = 25)
    private Date reqAuthoredTime;

    /** 皮试标志 */
    @Excel(name = "皮试标志",sort = 26)
    private Integer skinTestFlag;

    /** 中药标识 */
    @Excel(name = "中药标识",sort = 27)
    private Integer tcmFlag;

    /** 所在表 */
    @Excel(name = "所在表",sort = 28,width = 30)
    private String itemTable;

    /**
     * 生产厂家
     */
    @Excel(name = "生产厂家",sort = 22,width = 35)
    private String manufacturerText;

    /**
     * 追溯码
     */
    @Excel(name = "追溯码",sort = 23)
    private String traceNo;
}
