package com.dashitech.businessdata.entity;

import com.dashitech.utils.I18n;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * Created by chi on 2019/9/11.
 *
 * department主表为id 这里为编码
 */
@Entity
@Table(name = "itsm_patient")
public class PatientEntity  implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="id",length = 20)
    private Integer id;

    @I18n("病人标识")
    @Column(name = "patientcode")
    private String patientcode;

    @I18n("病人姓名")
    @Column(name = "patientname")
    private String patientname;

    @I18n("住院科室id，主表为id这里为编码")
    @Column(name = "department")
    private Integer department;

    @I18n("住院号")
    @Column(name = "residence_no")
    private String residenceNo;

    @I18n("腕带条码")
    @Column(name = "Bar_code")
    private String barCode;

    @I18n("房间号")
    @Column(name = "roomnum")
    private String roomnum;

    @I18n("床号")
    @Column(name = "bednum" )
    private String bednum;

    @I18n("年龄")
    @Column(name = "age" )
    private String age;

    @Column(name = "VERSION" )
    private Integer version;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "hospitalized_time" )
    private Date hospitalizedTime;

    @I18n("拼音")
    @Column(name = "pinyin" )
    private String pinyin;
    @I18n("拼音简写")
    @Column(name = "input_code" )
    private String inputCode;

    @I18n("是否重点关注,1为重点关注 0为不需重点关注")
    @Column(name = "focus_patient")
    private Integer focusPatient;

    @I18n("院区id")
    @Column(name = "hos_id")
    private Long hosId;

    @I18n("护理等级(字典表id)")
    @Column(name = "level_of_care_id")
    private Long levelOfCare;

    @I18n("病情代理(字典表id)")
    @Column(name = "state_of_an_illness_id")
    private Long stateOfAnIllness;

    public Long getStateOfAnIllness() {
        return stateOfAnIllness;
    }

    public void setStateOfAnIllness(Long stateOfAnIllness) {
        this.stateOfAnIllness = stateOfAnIllness;
    }

    public Long getLevelOfCare() {
        return levelOfCare;
    }

    public void setLevelOfCare(Long levelOfCare) {
        this.levelOfCare = levelOfCare;
    }

    public Long getHosId() {
        return hosId;
    }

    public void setHosId(Long hosId) {
        this.hosId = hosId;
    }

    public Integer getFocusPatient() {
        return focusPatient;
    }

    public void setFocusPatient(Integer focusPatient) {
        this.focusPatient = focusPatient;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public String getInputCode() {
        return inputCode;
    }

    public void setInputCode(String inputCode) {
        this.inputCode = inputCode;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Date getHospitalizedTime() {
        return hospitalizedTime;
    }

    public void setHospitalizedTime(Date hospitalizedTime) {
        this.hospitalizedTime = hospitalizedTime;
    }

    public String getPatientcode() {
        return patientcode;
    }

    public void setPatientcode(String patientcode) {
        this.patientcode = patientcode;
    }

    public String getPatientname() {
        return patientname;
    }

    public void setPatientname(String patientname) {
        this.patientname = patientname;
    }

    public Integer getDepartment() {
        return department;
    }

    public void setDepartment(Integer department) {
        this.department = department;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public String getRoomnum() {
        return roomnum;
    }

    public void setRoomnum(String roomnum) {
        this.roomnum = roomnum;
    }

    public String getBednum() {
        return bednum;
    }

    public void setBednum(String bednum) {
        this.bednum = bednum;
    }

    public String getResidenceNo() {
        return residenceNo;
    }

    public void setResidenceNo(String residenceNo) {
        this.residenceNo = residenceNo;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    @Override
    public String toString() {
        return "PatientEntity{" +
                "id=" + id +
                ", patientcode='" + patientcode + '\'' +
                ", patientname='" + patientname + '\'' +
                ", department='" + department + '\'' +
                ", residenceNo='" + residenceNo + '\'' +
                ", barCode='" + barCode + '\'' +
                ", roomnum='" + roomnum + '\'' +
                ", bednum='" + bednum + '\'' +
                ", age='" + age + '\'' +
                '}';
    }
}
