package com.ann.demo.entity.normalEntity;

import com.ann.demo.entity.normalEntity.ids.CommonTableIds;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author: LeiJiaXin
 * @Date: 2019/8/6 9:44
 */
@Data
@Entity
@Table(name = "commomtable")
@IdClass(CommonTableIds.class)
public class CommonTable {

    /**
     * masterId
     */
    @Id
    @Column(name = "patient_id")
    private String masterId;

    /**
     * 3 患者ID 病案号
     */
    @Column(name = "admiss_id", length = 30)
    private String YZY001;

    /**
     * 年龄 (岁)
     */
    @Column(name = "age")
    private Integer age;

    /**
     * 年龄(月)
     */
    @Column(name = "age_month")
    private Integer age_month;

    /**
     * 年龄(天)
     */
    @Column(name = "age_day")
    private Integer age_day;

    /**
     * 4 年龄
     */
    @Column(name = "bothDate")
    private String AKC023;

    /**
     * 6 性别
     */
    @Column(name = "sex")
    private String YZY008;

    /**
     * 14 住院次数
     */
    @Id
    @Column(name = "admiss_times", length = 10)
    private String YZY002;

    /**
     * 16 姓名
     */
    @Id
    @Column(name = "name", length = 20)
    private String AAC003;


    /**
     * 60 （主要出院诊断）名称
     */
    @Column(name = "main_diag_name")
    private String mainDiagName;

    /**
     * 88 入院时间
     */
    @Column(name = "admiss_date")
    private Date YKC701;

    /**
     * 89 出院时间
     */
    @Column(name = "dis_date")
    private Date YKC702;


    /**
     * 90 出院科别
     */
    @Column(name = "dis_dept")
    private String YZY038;

    /**
     * 93 实际住院天数
     */
    @Column(name = "admiss_days")
    private String AKB063;

    /**
     *  103 主治医师
     */
    @Column(name = "attending")
    private String YZY054;


    /**
     * 是否手术处理
     */
    @Column(name = "is_oper")
    private String isOper;


    /////////////////////////////////

    /**
     * 户口地址
     */
    @Column(name = "home_addr")
    private String AAC010;

    /**
     * 住院号
     */
    @Id
    @Column(name = "inpatient_no", length = 30)
    private String YZY175;

    /**
     * 姓名简写
     */
    @Column(name = "name_cym")
    private String nameCym;

    /**
     * 主要诊断转归情况
     */
    @Column(name = "main_dis_thing")
    private String main_dis_thing;

    /**
     * 出院主诊断编码
     */
    @Column(name = "main_diag_code")
    private String mainDiagCode;

}
