package com.openhis.web.inpatientmanage.dto;

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

    /**
     * ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private String id;

    /**
     * 活动标记
     */
    private Integer activeFlag;

    /**
     * 临时标识
     */
    private Integer tempFlag;

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

    /**
     * 患者其他名称
     */
    private String nameJson;

    /**
     * 病历号
     */
    private String patientNo;

    /**
     * 住院号
     */
    private String hospitalNo;

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

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

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

    /**
     * 婚姻状态
     */
    private Integer maritalStatusEnum;
    private String maritalStatusEnum_enumText;

    /**
     * 职业编码
     */
    private Integer prfsEnum;
    private String prfsEnum_enumText;

    /**
     * 电话
     */
    private String phone;

    /**
     * 地址
     */
    private String address;

    /**
     * 地址省
     */
    private String addressProvince;

    /**
     * 地址市
     */
    private String addressCity;

    /**
     * 地址区
     */
    private String addressDistrict;

    /**
     * 地址街道
     */
    private String addressStreet;

    /**
     * 患者其他地址
     */
    private String addressJson;

    /**
     * 民族
     */
    private String nationalityCode;

    /**
     * 身份证号
     */
    private String idCard;

    /**
     * 拼音码
     */
    private String pyStr;

    /**
     * 五笔码
     */
    private String wbStr;

    /**
     * 血型ABO
     */
    private Integer bloodAbo;
    private String bloodAbo_enumText;

    /**
     * 血型RH
     */
    private Integer bloodRh;
    private String bloodRh_enumText;

    /**
     * 工作单位
     */
    private String workCompany;

    /**
     * 籍贯
     */
    private String nativePlace;

    /**
     * 国家编码
     */
    private String countryCode;

    /**
     * 联系人
     */
    private String linkName;

    /**
     * 联系人关系
     */
    private Integer linkRelationCode;
    private String linkRelationCode_codeText;

    /**
     * 联系人电话
     */
    private String linkTelcom;

    /**
     * 其他联系人
     */
    private String linkJsons;

    /**
     * 租户ID
     */
    private Integer tenanId;

    /**
     * 就诊ID
     */
    private String encounterId;

    /**
     * 病人年龄
     */
    private String ageString;

    /**
     * 护理级别
     */
    private Integer priorityEnum;
    private String priorityEnum_enumText;

    /**
     * 患者状态
     */
    private Integer statusEnum;
    private String statusEnum_enumText;

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

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

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

    /**
     * 责任医生
     */
    private String responsibleDoctor;

    /**
     * 就诊位置ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private String encounterLocationId;

    /**
     * 责任护士
     */
    private String responsibleNurse;

    /**
     * 主要诊断
     */
    private String mainDiagnosis;

    /**
     * 费别
     */
    private Integer typeCode;
    private String typeCode_dictText;

    /**
     * 住院天数
     */
    private Integer hospitalizationDays;

    /**
     * 就诊类别
     */
    private Integer classEnum;
    private String classEnum_enumText;

    /**
     * 术后天数
     */
    private Integer postoperativeDays;

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

    /**
     * 手术结束日期日期
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date surgeryEndTime;

    /**
     * 手术状态
     */
    private Integer surgeryStatusEnum;
    private String surgeryStatusEnum_enumText;

    /**
     * 过敏源类别
     */
    @Dict(dictCode = "aise_code")
    private String categoryCode;
    private String categoryCode_dictText;

    /**
     * 入院科室名称
     */
    private String caty;

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

}
