package com.openhis.web.inpatientmanage.dto;

import java.util.Date;

import javax.validation.constraints.NotNull;

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 gaoyy
 * @since 2025/05/30
 */
@Data
@Accessors(chain = true)
public class NursingDetailDto {

    /** 就诊ID */
    @NotNull(message = "就诊ID不能为空")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long encounterId;

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

    /** 记录单ID */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long recordId;

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

    /** 患者生日 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birthDate;

    /** 患者年龄 */
    private String ageString;

    /** 记录人 */
    @Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
    private Long recorderId;
    private String recorderId_dictText;

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

    /** 病历信息 */
    private String contextJson;

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

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

    /** 科室ID */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orgId;

    /** 床位号 */
    @JsonSerialize(using = ToStringSerializer.class)
    @Dict(dictTable = "adm_location", dictCode = "id", dictText = "name")
    private Long bedLocationId;
    private String bedLocationId_dictText;

    /** 病区 */
    @JsonSerialize(using = ToStringSerializer.class)
    @Dict(dictTable = "adm_location", dictCode = "id", dictText = "name")
    private Long wardLocationId;
    private String wardLocationId_dictText;
}
