package com.openhis.web.regdoctorstation.dto;

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

import org.springframework.format.annotation.DateTimeFormat;

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;

/**
 * 申请单查询dto
 */
@Data
@Accessors(chain = true)
public class RequestFormQueryDto {

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

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

    /**
     * 申请单ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long requestFormId;

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

    /**
     * 名称
     */
    private String name;

    /**
     * 描述内容
     */
    private String descJson;

    /** 申请人 */
    @Dict(dictCode = "id", dictTable = "adm_practitioner", dictText = "name")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long requesterId;
    private String requesterId_dictText;

    /**
     * 申请时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 申请单详情
     */
    private List<RequestFormDetailQueryDto> requestFormDetailList;

}
