package com.openhis.web.inhospitalcharge.dto;

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

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 InHospitalInfoDto {

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

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

    /**
     * 类别医保编码
     */
    private Integer ybClassEnum;

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

    /**
     * 住院次数
     */
    private Integer inHospitalCount;

    /**
     * 住院科室id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long inHospitalOrgId;

    /**
     * 住院科室
     */
    private String inHospitalOrgName;

    /**
     * 病区id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long wardLocationId;

    /**
     * 病区
     */
    private String wardName;

    /**
     * 病区号
     */
    private String wardBusNo;

    /**
     * 当前病区总床位数
     */
    private Integer totalBedsNum;

    /**
     * 当前病区空闲床位数
     */
    private Integer idleBedsNum;

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

    /**
     * 门诊医生id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ambDoctorPractitionerId;

    /**
     * 门诊医生
     */
    private String ambDoctorPractitionerName;

    /**
     * 门诊诊断名称
     */
    private String ambDiagnosisName;

    /** 优先级(患者病情) */
    private Integer priorityEnum;
    private String priorityEnum_enumText;

    /**
     * 入院类型
     */
    @Dict(dictCode = "admit_source_code")
    private String admitSourceCode;
    private String admitSourceCode_dictText;

    /**
     * 入院方式
     */
    @Dict(dictCode = "in_way_code")
    private String inWayCode;
    private String inWayCode_dictText;

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

    /**
     * 费用性质(合同编码)
     */
    private String contractNo;

    /**
     * 账户类型编码
     */
    private String typeCoce;

    /** 账户余额 */
    private BigDecimal balanceAmount;

    /**
     * 诊断定义id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long diagnosisDefinitionId;

    /**
     * 诊断对应的医保编码
     */
    private String diagnosisYbNo;

    /** 诊断的医疗类型 */
    private String medTypeCode;

    /**
     * 诊断描述
     */
    private String diagnosisDesc;

}
