package com.yihu.figure.model.patient;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.figure.model.IdEntity;
import com.yihu.figure.model.patient.portrait.UserPortrait;
import com.yihu.figure.model.suggest.Suggest;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by yeshijie on 2017/3/6.
 */
@Entity
@Table(name = "wlyy_patient_info")
public class PatientInfo extends IdEntity implements Serializable{
    // 业务主键
    private String code;
    // 身份证号
    private String idcard;
    // 姓名
    private String name;
    // 生日
    private Date birthday;
    // 性別，1男，2女
    private Integer sex;
    // 手機號
    private String mobile;
    // 社保卡號
    private String ssc;
    // 城市代碼
    private String city;
    // 地址
    private String address;
    // 更新時間
    private Date createTime;
    //区代码
    private String town;
    //区名称
    private String townName;
    //现病史
    private String xbs;
    //既往史
    private String jws;
    //个人史
    private String grs;
    //家族史
    private String jzs;
    //婚育史
    private String hys;


    public String getTown() {
        return town;
    }

    public void setTown(String town) {
        this.town = town;
    }

    public String getTownName() {
        return townName;
    }

    public void setTownName(String townName) {
        this.townName = townName;
    }

    //标签列表
    private List<UserPortrait> userPortraits;
    //建议列表
    private Map<String,List<Suggest>> suggests;

    @Transient
    public Map<String, List<Suggest>> getSuggests() {
        return suggests;
    }

    public void setSuggests(Map<String, List<Suggest>> suggests) {
        this.suggests = suggests;
    }

    @Transient
    public List<UserPortrait> getUserPortraits() {
        return userPortraits;
    }

    public void setUserPortraits(List<UserPortrait> userPortraits) {
        this.userPortraits = userPortraits;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getSsc() {
        return ssc;
    }

    public void setSsc(String ssc) {
        this.ssc = ssc;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getXbs() {
        return xbs;
    }

    public void setXbs(String xbs) {
        this.xbs = xbs;
    }

    public String getJws() {
        return jws;
    }

    public void setJws(String jws) {
        this.jws = jws;
    }

    public String getGrs() {
        return grs;
    }

    public void setGrs(String grs) {
        this.grs = grs;
    }

    public String getJzs() {
        return jzs;
    }

    public void setJzs(String jzs) {
        this.jzs = jzs;
    }

    public String getHys() {
        return hys;
    }

    public void setHys(String hys) {
        this.hys = hys;
    }
}
