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

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

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;

    /**
     * 发放药房
     */
    private String locationName;

    /**
     * 批次号
     */
    private String lotNumber;

    /**
     * 科室
     */
    private String departmentName;

    /**
     * 开单医生
     */
    private String doctorName;

    /**
     * 发药医生
     */
    private String dispenseDoctorName;

    /**
     * 项目类型
     */
    @Dict(dictCode = "med_category_code")
    private String itemType;
    private String itemType_dictText;

    /**
     * 发药状态
     */
    private Integer statusEnum;
    private String statusEnum_enumText;

    /**
     * 诊断名称
     */
    private String conditionName;

    /**
     * 处方号
     */
    private String prescriptionNo;

    /**
     * 项目名称
     */
    private String itemName;

    /**
     * 规格
     */
    private String totalVolume;

    /**
     * 单次剂量
     */
    private BigDecimal dose;

    /**
     * 用药频次
     */
    @Dict(dictCode = "rate_code")
    private String rateCode;
    private String rateCode_dictText;

    /**
     * 用法
     */
    @Dict(dictCode = "method_code")
    private String methodCode;
    private String methodCode_dictText;

    /**
     * 剂量单位
     */
    @Dict(dictCode = "unit_code")
    private String doseUnitCode;
    private String doseUnitCode_dictText;

    /**
     * 单位
     */
    @Dict(dictCode = "unit_code")
    private String unitCode;
    private String unitCode_dictText;

    /**
     * 单次发药数
     */
    private Integer dispensePerQuantity;

    /**
     * 每次发药供应天数
     */
    private Integer dispensePerDuration;

    /**
     * 数量
     */
    private Integer quantity;

    /**
     * 单价
     */
    private BigDecimal unitPrice;

    /**
     * 金额
     */
    private BigDecimal totalPrice;
    /**
     * 组合号
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long groupId;

    /**
     * 就诊NO
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private String encounterBusNo;

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

    /** 皮试标志 */
    private Integer skinTestFlag;

    /** 中药标识 */
    private Integer tcmFlag;

    /** 所在表 */
    private String itemTable;

    /**
     * 生产厂家
     */
    private String manufacturerText;

    /**
     * 追溯码
     */
    private String traceNo;
}
