package com.yihu.jw.entity.followup;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IntegerIdentityEntity;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.iot.gateway.IdEntity;

import javax.persistence.*;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 随访记录表
 * @author hzp add 2016-12-07
 *
 */
@Entity
@Table(name = "wlyy_followup")
@SequenceGenerator(name="id_generated", sequenceName="wlyy_followup")
public class Followup extends IntegerIdentityEntity {

	//随访编号【基卫】
	private String followupNo;
	//随访时间
	private Date followupDate;
	//随访计划时间
	private Date followupPlanDate;
	//计划下次随访时间
	private Date followupNextDate;
	//随访方式【字典FOLLOWUP_WAY_DICT】
	private String followupType;
	//随访类别，多类别“，”分割【1.高血压 2.糖尿病 3.肿瘤 4.精神分裂症 5.产后 6.新生儿 7.严重精神病 8.80岁以上老人 9.肺结核 10异常体温随访
	// 11.冠心病日常随访 12.慢性妇科炎症13.慢性前列腺疾病日常随访 14.慢性乳腺疾病日常随访 15慢性肾病日常随访 16慢性阻塞性肺病 17脑卒中日常随访 18脂肪肝日常随访
	private String followupClass;
	//随访管理状态【字典FOLLOWUP_MANAGER_STATUS】
	private String followupManagerStatus;
	//医生代码
	private String doctorCode;
	//医生姓名
	private String doctorName;
	//基卫医生CODE
	private String jwdoctorCode;
	//社区代码
	private String orgCode;
	//社区名称
	private String orgName;
	//基卫机构编码
	private String jworgCode;
	//患者代码
	private String patientCode;
	//患者姓名
	private String patientName;
	//患者身份证
	private String idcard;
	//年龄
	private String age;
	//性别
	private Integer sex;
	//手机号
	private String mobile;
	//妊娠编号
	private String idcardEncrypt;
	//数据来源 1基卫 2APP
	private String dataFrom;
	//状态 0取消 1已完成 2未开始 3进行中 4待审核
	private String status;
	//电话随访内容
	private String followupContentPhone;
	//创建时间
	private Date createTime;
	//更新时间
	private Date updateTime;
	//创建者
	private String creater;
	// 签约类型 1三师 2家庭
	private Integer signType;
	// 行政团队
	private Long adminTeamCode;
	//签约表Code
	private String signCode;
	//关联的续方CODE
	private String prescriptionCode;
	//外部数据-居民数据
	private BasePatientDO patient;
	//外部数据-标签数据
	private List<Map<String,Object>> followupLabelPatient;
	//居民头像
	private String photo;
	//随访类型1、新增随访、2临时随访、3入户访视
	private Integer type;
	//随访角色【FAMILY_WORK_TYPE_DICT】【1. 专科医生 2. 全科医生 3. 健康管理师】
	private String jwDoctorWorkType;
	private String jwDoctorHealth;//基卫系统的随访健管师ID
	private String healthFollowupType;//健管师随访方式【FOLLOWUP_WAY_DICT】
	private Date healthFollowupNextDate;//健管师下次随访日期
	private String ruralDoctorsFlag;//是否乡医【0.否;1.是;】
	private Integer doctorReadStatus;
	private Integer patientReadStatus;

	@Column(name = "doctor_read_status")
	public Integer getDoctorReadStatus() {
		return doctorReadStatus;
	}

	public void setDoctorReadStatus(Integer doctorReadStatus) {
		this.doctorReadStatus = doctorReadStatus;
	}

	@Column(name = "patient_read_status")
	public Integer getPatientReadStatus() {
		return patientReadStatus;
	}

	public void setPatientReadStatus(Integer patientReadStatus) {
		this.patientReadStatus = patientReadStatus;
	}

	@Transient
	public BasePatientDO getPatient() {
		return patient;
	}

	public void setPatient(BasePatientDO patient) {
		this.patient = patient;
	}

	@Transient
	public List<Map<String, Object>> getFollowupLabelPatient() {
		return followupLabelPatient;
	}

	public void setFollowupLabelPatient(List<Map<String, Object>> followupLabelPatient) {
		this.followupLabelPatient = followupLabelPatient;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getFollowupPlanDate() {
		return followupPlanDate;
	}

	public void setFollowupPlanDate(Date followupPlanDate) {
		this.followupPlanDate = followupPlanDate;
	}

	public String getFollowupNo() {
		return followupNo;
	}

	public void setFollowupNo(String followupNo) {
		this.followupNo = followupNo;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getFollowupDate() {
		return followupDate;
	}

	public void setFollowupDate(Date followupDate) {
		this.followupDate = followupDate;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getFollowupNextDate() {
		return followupNextDate;
	}

	public void setFollowupNextDate(Date followupNextDate) {
		this.followupNextDate = followupNextDate;
	}

	public String getFollowupType() {
		return followupType;
	}

	public void setFollowupType(String followupType) {
		this.followupType = followupType;
	}

	public String getFollowupClass() {
		return followupClass;
	}

	public void setFollowupClass(String followupClass) {
		this.followupClass = followupClass;
	}

	public String getFollowupManagerStatus() {
		return followupManagerStatus;
	}

	public void setFollowupManagerStatus(String followupManagerStatus) {
		this.followupManagerStatus = followupManagerStatus;
	}

	public String getDoctorCode() {
		return doctorCode;
	}

	public void setDoctorCode(String doctorCode) {
		this.doctorCode = doctorCode;
	}

	public String getDoctorName() {
		return doctorName;
	}

	public void setDoctorName(String doctorName) {
		this.doctorName = doctorName;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	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 String getIdcard() {
		return idcard;
	}

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

	public String getDataFrom() {
		return dataFrom;
	}

	public void setDataFrom(String dataFrom) {
		this.dataFrom = dataFrom;
	}

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

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

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getFollowupContentPhone() {
		return followupContentPhone;
	}

	public void setFollowupContentPhone(String followupContentPhone) {
		this.followupContentPhone = followupContentPhone;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	public Integer getSignType() {
		return signType;
	}

	public void setSignType(Integer signType) {
		this.signType = signType;
	}

	public Long getAdminTeamCode() {
		return adminTeamCode;
	}

	public void setAdminTeamCode(Long adminTeamCode) {
		this.adminTeamCode = adminTeamCode;
	}

	public String getSignCode() {
		return signCode;
	}

	public void setSignCode(String signCode) {
		this.signCode = signCode;
	}

	public String getJwdoctorCode() {
		return jwdoctorCode;
	}

	public void setJwdoctorCode(String jwdoctorCode) {
		this.jwdoctorCode = jwdoctorCode;
	}

	public String getJworgCode() {
		return jworgCode;
	}

	public void setJworgCode(String jworgCode) {
		this.jworgCode = jworgCode;
	}

	public String getPrescriptionCode() {
		return prescriptionCode;
	}

	public void setPrescriptionCode(String prescriptionCode) {
		this.prescriptionCode = prescriptionCode;
	}

	public String getAge() {
		return age;
	}

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

	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 getIdcardEncrypt() {
		return idcardEncrypt;
	}

	public void setIdcardEncrypt(String idcardEncrypt) {
		this.idcardEncrypt = idcardEncrypt;
	}


	@Transient
	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getJwDoctorWorkType() {
		return jwDoctorWorkType;
	}

	public void setJwDoctorWorkType(String jwDoctorWorkType) {
		this.jwDoctorWorkType = jwDoctorWorkType;
	}

	public String getJwDoctorHealth() {
		return jwDoctorHealth;
	}

	public void setJwDoctorHealth(String jwDoctorHealth) {
		this.jwDoctorHealth = jwDoctorHealth;
	}

	public String getHealthFollowupType() {
		return healthFollowupType;
	}

	public void setHealthFollowupType(String healthFollowupType) {
		this.healthFollowupType = healthFollowupType;
	}

	public Date getHealthFollowupNextDate() {
		return healthFollowupNextDate;
	}

	public void setHealthFollowupNextDate(Date healthFollowupNextDate) {
		this.healthFollowupNextDate = healthFollowupNextDate;
	}

	public String getRuralDoctorsFlag() {
		return ruralDoctorsFlag;
	}

	public void setRuralDoctorsFlag(String ruralDoctorsFlag) {
		this.ruralDoctorsFlag = ruralDoctorsFlag;
	}

}
