package thyyxxk.webserver.entity.inpatient;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ZyActpatient implements Serializable {

    private static final long serialVersionUID = 5145290750715622360L;

    private String wardName;
    /**
     * 医保类型
     */
    private String responceTypeName;
    private BigDecimal balance;
    private String wardCode;
    private String deptCode;
    private Integer ledgerSn;
    private Integer maxDetailSn;
    private String staffId;

    /**
     * 执行科室 （门 急诊转入时用的）
     */
    private String execUnit;

    /**
     * 住院天数
     */
    private String actIptDays;

    /**
     * 身份证
     */
    private String certno;
    /**
     * 参保地
     */
    private String insuplcAdmdvs;
    /**
     * 参保地名称
     */
    private String insuplcAdmdvsName;

    /**
     * 0 - 没有出院医嘱
     * 1 - 有出院医嘱
     */
    private Integer chuYuanYiZhu;

    private Integer infantFlag;

    private String reqExecUnit;

    @TableField(exist = false)
    private List<MzChargeDetail> list;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date chargeDate;

    /**
     * inpatientNo
     */
    private String inpatientNo;

    /**
     * admissTimes
     */
    private Integer admissTimes;

    /**
     * name
     */
    private String name;

    /**
     * outpatientNo
     */
    private String outpatientNo;

    /**
     * chargeType
     */
    private String chargeType;

    /**
     * visitType
     */
    private String visitType;

    /**
     * admissDate
     */
    private Date admissDate;

    /**
     * admissStatus
     */
    private String admissStatus;

    /**
     * clinicDiag
     */
    private String clinicDiag;

    /**
     * admissDiag
     */
    private String admissDiag;

    /**
     * admissPhysician
     */
    private String admissPhysician;

    /**
     * 管床医生
     */
    private String referPhysician;
    private String referPhysicianName;

    /**
     * consultPhysician
     */
    private String consultPhysician;

    /**
     * deptDirector
     */
    private String deptDirector;

    /**
     * admissDept
     */
    private String admissDept;

    /**
     * admissWard
     */
    private String admissWard;

    /**
     * disDate
     */
    private Date disDate;

    /**
     * 主要诊断代码
     */
    private String disDiag;
    /**
     * 主要诊断名称
     */
    private String disDiagComment;

    /**
     * disStatus
     */
    private String disStatus;

    /**
     * disDept
     */
    private String disDept;

    /**
     * disWard
     */
    private String disWard;

    /**
     * insurCode
     */
    private String insurCode;

    /**
     * contractCode
     */
    private String contractCode;

    /**
     * 医保类型
     */
    private String responceType;

    /**
     * timesBilled
     */
    private Integer timesBilled;


    /**
     * totalCharge
     */
    private BigDecimal totalCharge;

    /**
     * charge1
     */
    private Double charge1;

    /**
     * charge2
     */
    private Double charge2;

    /**
     * charge3
     */
    private Double charge3;

    /**
     * charge4
     */
    private Double charge4;

    /**
     * charge5
     */
    private Double charge5;

    /**
     * charge6
     */
    private Double charge6;

    /**
     * charge7
     */
    private Double charge7;

    /**
     * charge8
     */
    private Double charge8;

    /**
     * charge9
     */
    private Double charge9;

    /**
     * charge10
     */
    private Double charge10;

    /**
     * charge11
     */
    private Double charge11;

    /**
     * charge12
     */
    private Double charge12;

    /**
     * charge13
     */
    private Double charge13;

    /**
     * charge14
     */
    private Double charge14;

    /**
     * charge15
     */
    private Double charge15;

    /**
     * charge16
     */
    private Double charge16;

    /**
     * charge17
     */
    private Double charge17;

    /**
     * charge18
     */
    private Double charge18;

    /**
     * charge19
     */
    private Double charge19;

    /**
     * charge20
     */
    private Double charge20;

    /**
     * charge21
     */
    private Double charge21;

    /**
     * charge22
     */
    private Double charge22;

    /**
     * charge23
     */
    private Double charge23;

    /**
     * charge24
     */
    private Double charge24;

    /**
     * charge25
     */
    private Double charge25;

    /**
     * charge26
     */
    private Double charge26;

    /**
     * charge27
     */
    private Double charge27;

    /**
     * charge28
     */
    private Double charge28;

    /**
     * charge29
     */
    private Double charge29;

    /**
     * charge30
     */
    private Double charge30;

    /**
     * ward
     */
    private String ward;

    /**
     * dept
     */
    private String dept;

    /**
     * bedNo
     */
    private String bedNo;

    /**
     * sex
     */
    private Integer sex;

    /**
     * bloodType
     */
    private String bloodType;

    /**
     * diagnosisDate
     */
    private Date diagnosisDate;

    /**
     * allergyMedicine
     */
    private String allergyMedicine;

    /**
     * rescueTimes
     */
    private String rescueTimes;

    /**
     * successTimes
     */
    private String successTimes;

    /**
     * followupMark
     */
    private String followupMark;

    /**
     * followupPrior
     */
    private String followupPrior;

    /**
     * autopsyMark
     */
    private String autopsyMark;

    /**
     * qualityLevel
     */
    private String qualityLevel;

    /**
     * opIdCode
     */
    private String opIdCode;

    /**
     * archiveCode
     */
    private String archiveCode;

    /**
     * archiveMark
     */
    private String archiveMark;

    /**
     * teachingMark
     */
    private String teachingMark;

    /**
     * diagnoseConform1
     */
    private String diagnoseConform1;

    /**
     * diagnoseConform2
     */
    private String diagnoseConform2;

    /**
     * diagnoseConform3
     */
    private String diagnoseConform3;

    /**
     * diagnoseConform4
     */
    private String diagnoseConform4;

    /**
     * diagnoseConform5
     */
    private String diagnoseConform5;

    /**
     * diagnoseConform6
     */
    private String diagnoseConform6;

    /**
     * diagnoseConform7
     */
    private String diagnoseConform7;

    /**
     * diagnoseConform8
     */
    private String diagnoseConform8;

    /**
     * internCode
     */
    private String internCode;

    /**
     * diagnoseConform9
     */
    private String diagnoseConform9;

    /**
     * diagnoseConform10
     */
    private String diagnoseConform10;

    /**
     * pathologyDiag
     */
    private String pathologyDiag;

    /**
     * disHour
     */
    private Date disHour;

    /**
     * admissHour
     */
    private Date admissHour;

    /**
     * capBloody
     */
    private Integer capBloody;

    /**
     * maxLedger
     */
    private Integer maxLedger;

    /**
     * admissDiagStr
     */
    private String admissDiagStr;

    /**
     * patientStatus
     */
    private String patientStatus;

    /**
     * moveFlag
     */
    private String moveFlag;

    /**
     * jzjlh
     */
    private String jzjlh;

    /**
     * zkDept
     */
    private String zkDept;

    /**
     * hbsag
     */
    private String hbsag;

    /**
     * archiveCode1
     */
    private String archiveCode1;

    /**
     * jobDoctor
     */
    private String jobDoctor;

    /**
     * jobNurse
     */
    private String jobNurse;

    /**
     * ybjy
     */
    private Double ybjy;

    /**
     * bczf
     */
    private Double bczf;

    /**
     * zflj
     */
    private Double zflj;

    /**
     * disDiagStr
     */
    private String disDiagStr;

    /**
     * ybZyh
     */
    private String ybZyh;

    /**
     * ybJzlb
     */
    private String ybJzlb;

    /**
     * yzIn
     */
    private Date yzIn;

    /**
     * yzOut
     */
    private Date yzOut;

    /**
     * ybFlag
     */
    private String ybFlag;

    /**
     * oweFlag
     */
    private String oweFlag;

    /**
     * zkWard
     */
    private String zkWard;
    private String zkWardName;

    /**
     * zkDate
     */
    private Date zkDate;

    /**
     * ybJlh
     */
    private String ybJlh;

    /**
     * ybType
     */
    private String ybType;

    /**
     * zySerialNo
     */
    private String zySerialNo;

    /**
     * mzNo
     */
    private String mzNo;

    /**
     * clinicDiagStr
     */
    private String clinicDiagStr;

    /**
     * bedStatus
     */
    private String bedStatus;

    /**
     * inputDate
     */
    private Date inputDate;

    /**
     * ybJsffbz
     */
    private String ybJsffbz;

    /**
     * ybSylb
     */
    private String ybSylb;

    /**
     * ybZszh
     */
    private String ybZszh;

    /**
     * admissDateYb
     */
    private Date admissDateYb;

    /**
     * baReceiveFlag
     */
    private String baReceiveFlag;

    /**
     * blzkStatus
     */
    private String blzkStatus;

    /**
     * room
     */
    private String room;

    /**
     * disYb
     */
    private String disYb;

    /**
     * disYbStr
     */
    private String disYbStr;

    /**
     * ybBzfx
     */
    private String ybBzfx;

    /**
     * disRoom
     */
    private String disRoom;

    /**
     * disYb1
     */
    private String disYb1;

    /**
     * disYbStr1
     */
    private String disYbStr1;

    /**
     * disYb2
     */
    private String disYb2;

    /**
     * disYbStr2
     */
    private String disYbStr2;

    /**
     * 入院小科室
     */
    private String smallDept;
    private String smallDeptName;

    /**
     * xnhFamilysysno
     */
    private String xnhFamilysysno;

    /**
     * xnhMembersysno
     */
    private String xnhMembersysno;

    /**
     * xnhBookno
     */
    private String xnhBookno;

    /**
     * xnhCardno
     */
    private String xnhCardno;

    /**
     * xnhCmisno
     */
    private String xnhCmisno;

    /**
     * xnhZyh
     */
    private String xnhZyh;

    /**
     * xnhReferralno
     */
    private String xnhReferralno;

    /**
     * xnhRedeemType
     */
    private String xnhRedeemType;

    /**
     * xnhHasreferral
     */
    private String xnhHasreferral;

    /**
     * zyFlag
     */
    private String zyFlag;

    /**
     * xnhRejectFlag
     */
    private String xnhRejectFlag;

    /**
     * ownFlag
     */
    private String ownFlag;

    /**
     * ownTime
     */
    private Date ownTime;

    /**
     * freeFlag
     */
    private String freeFlag;

    /**
     * operation
     */
    private String operation;

    /**
     * cyyy
     */
    private String cyyy;

    /**
     * ybGsNo
     */
    private String ybGsNo;

    /**
     * treatType
     */
    private String treatType;

    /**
     * hicNo
     */
    private String hicNo;

    /**
     * ybRegisterDate
     */
    private Date ybRegisterDate;

    /**
     * pathologyDiagComment
     */
    private String pathologyDiagComment;

    /**
     * fileStatus
     */
    private String fileStatus;

    /**
     * lendFlag
     */
    private Integer lendFlag;


    /**
     * 违规费用
     */
    private List<ZyDetailCharge> weiXieDaiYuanLiuShui;

    /**
     * 未匹配
     */
    private List<WeiGuiFeiYongFenXi> weiPiPei;


    public String getSexName() {
        if (this.sex == null) {
            return "";
        }
        switch (sex) {
            case 1:
                return "男";
            case 2:
                return "女";
            default:
                return "未知";
        }
    }
}
