package com.openhis.web.doctorstation.dto;

import java.util.Date;
import java.util.List;

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;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 处方信息 dto
 */
@Data
@Accessors(chain = true)
public class PrescriptionInfoBaseDto {

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

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

    /**
     * 患者id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long patientId;

    /**
     * 患者
     */
    private String patientName;

    /**
     * 诊断定义名称
     */
    private String conditionDefinitionName;

    /** 请求时间 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date requestTime;

    /**
     * 开方医生
     */
    private String practitionerName;

    /** 科室 */
    @JsonSerialize(using = ToStringSerializer.class)
    @Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
    private Long organizationId;
    private String organizationId_dictText;

    /** 出生日期 */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birthDate;

    /**
     * 年龄
     */
    private String age;

    /**
     * 性别编码
     */
    private Integer genderEnum;
    private String genderEnum_enumText;

    /**
     * 就诊号
     */
    private String busNo;

    /**
     * 费用性质
     */
    private String contractName;

    /**
     * 详情
     */
    private List<PrescriptionInfoDetailDto> prescriptionInfoDetailList;

}
