Patient.java 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. package com.yihu.wlyy.entity.patient;
  2. import java.io.Serializable;
  3. import java.util.ArrayList;
  4. import java.util.Date;
  5. import java.util.List;
  6. import javax.persistence.Column;
  7. import javax.persistence.Entity;
  8. import javax.persistence.Table;
  9. import javax.persistence.Transient;
  10. import com.yihu.wlyy.entity.IdEntity;
  11. import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
  12. import org.apache.commons.lang3.builder.ToStringBuilder;
  13. import com.fasterxml.jackson.annotation.JsonFormat;
  14. /**
  15. * 患者信息
  16. * @author George
  17. *
  18. */
  19. @Entity
  20. @Table(name = "wlyy_patient")
  21. public class Patient extends IdEntity implements Serializable {
  22. /**
  23. *
  24. */
  25. private static final long serialVersionUID = 8358924836164389434L;
  26. // 业务主键
  27. private String code;
  28. // 身份证号
  29. private String idcard;
  30. // 登录密码
  31. private String password;
  32. private String salt;
  33. // 姓名
  34. private String name;
  35. // 生日
  36. private Date birthday;
  37. // 性別,1男,2女
  38. private Integer sex;
  39. // 手機號
  40. private String mobile;
  41. // (基卫)手機號
  42. private String mobileRemarks;
  43. // 聯繫電話
  44. private String phone;
  45. // 社保卡號
  46. private String ssc;
  47. // 頭像HTTP地址
  48. private String photo;
  49. // 省代碼
  50. private String province;
  51. // 城市代碼
  52. private String city;
  53. // 區縣代碼
  54. private String town;
  55. // 街道代码
  56. private String street;
  57. // 省名
  58. private String provinceName;
  59. // 市名
  60. private String cityName;
  61. // 區縣名
  62. private String townName;
  63. // 街道名称
  64. private String streetName;
  65. // 地址
  66. private String address;
  67. // 疾病类型,0健康,1高血压,2糖尿病,3高血压+糖尿病
  68. private Integer disease;
  69. // 病情:0绿标,1黄标,2红标
  70. private Integer diseaseCondition;
  71. // 病历记录总数
  72. private Integer recordAmount;
  73. // 總積分
  74. private Integer points;
  75. // 更新時間
  76. private Date czrq;
  77. // 微信编号
  78. private String openid;
  79. //微信时间
  80. private Date openidTime;
  81. // 用户状态:1正常,0禁用,-1恶意注册,2审核中
  82. private Integer status;
  83. private List<SignPatientLabelInfo> labelInfos=new ArrayList<>();//患者的疾病标签list
  84. public Patient() {
  85. }
  86. public Patient(Long id) {
  87. this.id = id;
  88. }
  89. public String getCode() {
  90. return code;
  91. }
  92. public void setCode(String code) {
  93. this.code = code;
  94. }
  95. public String getIdcard() {
  96. return idcard;
  97. }
  98. public void setIdcard(String idcard) {
  99. this.idcard = idcard;
  100. }
  101. public String getPassword() {
  102. return password;
  103. }
  104. public void setPassword(String password) {
  105. this.password = password;
  106. }
  107. public String getSalt() {
  108. return salt;
  109. }
  110. public void setSalt(String salt) {
  111. this.salt = salt;
  112. }
  113. public String getName() {
  114. return name;
  115. }
  116. public void setName(String name) {
  117. this.name = name;
  118. }
  119. @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
  120. public Date getBirthday() {
  121. return birthday;
  122. }
  123. public void setBirthday(Date birthday) {
  124. this.birthday = birthday;
  125. }
  126. public Integer getSex() {
  127. return sex;
  128. }
  129. public void setSex(Integer sex) {
  130. this.sex = sex;
  131. }
  132. public String getMobile() {
  133. return mobile;
  134. }
  135. public void setMobile(String mobile) {
  136. this.mobile = mobile;
  137. }
  138. public String getPhone() {
  139. return phone;
  140. }
  141. public void setPhone(String phone) {
  142. this.phone = phone;
  143. }
  144. public String getSsc() {
  145. return ssc;
  146. }
  147. public void setSsc(String ssc) {
  148. this.ssc = ssc;
  149. }
  150. @Column(name = "photo", insertable = false)
  151. public String getPhoto() {
  152. return photo;
  153. }
  154. public void setPhoto(String photo) {
  155. this.photo = photo;
  156. }
  157. public String getProvince() {
  158. return province;
  159. }
  160. public void setProvince(String province) {
  161. this.province = province;
  162. }
  163. public String getCity() {
  164. return city;
  165. }
  166. public void setCity(String city) {
  167. this.city = city;
  168. }
  169. public String getTown() {
  170. return town;
  171. }
  172. public void setTown(String town) {
  173. this.town = town;
  174. }
  175. public String getStreet() {
  176. return street;
  177. }
  178. public void setStreet(String street) {
  179. this.street = street;
  180. }
  181. @Column(name = "province_name")
  182. public String getProvinceName() {
  183. return provinceName;
  184. }
  185. public void setProvinceName(String provinceName) {
  186. this.provinceName = provinceName;
  187. }
  188. @Column(name = "city_name")
  189. public String getCityName() {
  190. return cityName;
  191. }
  192. public void setCityName(String cityName) {
  193. this.cityName = cityName;
  194. }
  195. @Column(name = "town_name")
  196. public String getTownName() {
  197. return townName;
  198. }
  199. public void setTownName(String townName) {
  200. this.townName = townName;
  201. }
  202. @Column(name = "street_name")
  203. public String getStreetName() {
  204. return streetName;
  205. }
  206. public void setStreetName(String streetName) {
  207. this.streetName = streetName;
  208. }
  209. public static long getSerialversionuid() {
  210. return serialVersionUID;
  211. }
  212. public String getAddress() {
  213. return address;
  214. }
  215. public void setAddress(String address) {
  216. this.address = address;
  217. }
  218. public Integer getDisease() {
  219. return disease;
  220. }
  221. public void setDisease(Integer disease) {
  222. this.disease = disease;
  223. }
  224. @Column(name = "disease_condition")
  225. public Integer getDiseaseCondition() {
  226. return diseaseCondition;
  227. }
  228. public void setDiseaseCondition(Integer diseaseCondition) {
  229. this.diseaseCondition = diseaseCondition;
  230. }
  231. @Column(name = "record_amount")
  232. public Integer getRecordAmount() {
  233. return recordAmount;
  234. }
  235. public void setRecordAmount(Integer recordAmount) {
  236. this.recordAmount = recordAmount;
  237. }
  238. public Integer getPoints() {
  239. return points;
  240. }
  241. public void setPoints(Integer points) {
  242. this.points = points;
  243. }
  244. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
  245. public Date getCzrq() {
  246. return czrq;
  247. }
  248. public void setCzrq(Date czrq) {
  249. this.czrq = czrq;
  250. }
  251. public String getOpenid() {
  252. return openid;
  253. }
  254. public void setOpenid(String openid) {
  255. this.openid = openid;
  256. }
  257. @Override
  258. public String toString() {
  259. return ToStringBuilder.reflectionToString(this);
  260. }
  261. public Integer getStatus() {
  262. return status;
  263. }
  264. public void setStatus(Integer status) {
  265. this.status = status;
  266. }
  267. @Transient
  268. public List<SignPatientLabelInfo> getLabelInfos() {
  269. return labelInfos;
  270. }
  271. public void setLabelInfos(List<SignPatientLabelInfo> labelInfos) {
  272. this.labelInfos = labelInfos;
  273. }
  274. public String getMobileRemarks() {
  275. return mobileRemarks;
  276. }
  277. public void setMobileRemarks(String mobileRemarks) {
  278. this.mobileRemarks = mobileRemarks;
  279. }
  280. public Date getOpenidTime() {
  281. return openidTime;
  282. }
  283. public void setOpenidTime(Date openidTime) {
  284. this.openidTime = openidTime;
  285. }
  286. }