DevicePatientHealthIndex.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. package com.yihu.device.entity;
  2. import com.fasterxml.jackson.annotation.JsonFormat;
  3. import com.yihu.wlyy.entity.IdEntity;
  4. import javax.persistence.*;
  5. import java.util.Date;
  6. /**
  7. * 健康指标
  8. * @author George
  9. *
  10. */
  11. @Entity
  12. @Table(name = "wlyy_patient_health_index")
  13. @NamedNativeQueries({ @NamedNativeQuery(name = "findRecentByPatient", query = "select b.* from (SELECT a.* FROM wlyy_patient_health_index a where a.user = ?1 order by a.record_date desc) b GROUP BY b.type", resultClass = DevicePatientHealthIndex.class) })
  14. public class DevicePatientHealthIndex extends IdEntity {
  15. // 患者标志
  16. private String user;
  17. // 干预标志
  18. private String intervene;
  19. // 血糖/收缩压/体重/腰围/早餐前空腹
  20. private String value1;
  21. // 舒张压/早餐后空腹/身高
  22. private String value2;
  23. // 午餐空腹/BMI
  24. private String value3;
  25. // 午餐后/偏胖-1/正常0/偏瘦1
  26. private String value4;
  27. // 晚餐空腹
  28. private String value5;
  29. // 晚餐后
  30. private String value6;
  31. // 睡前
  32. private String value7;
  33. // 健康指标类型(1血糖,2血压,3体重/身高/BMI,4腰围)
  34. private int type;
  35. // 记录时间
  36. private Date recordDate;
  37. // 排序日期
  38. private Date sortDate;
  39. // 添加时间
  40. private Date czrq;
  41. // 是否作废,1正常,0作废
  42. private String del;
  43. //身份证号码
  44. private String idcard;
  45. //设备编号
  46. private String deviceSn;
  47. private Short status;//状态:0为标准,1为异常
  48. public String getUser() {
  49. return user;
  50. }
  51. public void setUser(String user) {
  52. this.user = user;
  53. }
  54. public String getIntervene() {
  55. return intervene;
  56. }
  57. public void setIntervene(String intervene) {
  58. this.intervene = intervene;
  59. }
  60. public String getValue1() {
  61. return value1;
  62. }
  63. public void setValue1(String value1) {
  64. this.value1 = value1;
  65. }
  66. public String getValue2() {
  67. return value2;
  68. }
  69. public void setValue2(String value2) {
  70. this.value2 = value2;
  71. }
  72. public String getValue3() {
  73. return value3;
  74. }
  75. public void setValue3(String value3) {
  76. this.value3 = value3;
  77. }
  78. public String getValue4() {
  79. return value4;
  80. }
  81. public void setValue4(String value4) {
  82. this.value4 = value4;
  83. }
  84. public String getValue5() {
  85. return value5;
  86. }
  87. public void setValue5(String value5) {
  88. this.value5 = value5;
  89. }
  90. public String getValue6() {
  91. return value6;
  92. }
  93. public void setValue6(String value6) {
  94. this.value6 = value6;
  95. }
  96. public String getValue7() {
  97. return value7;
  98. }
  99. public void setValue7(String value7) {
  100. this.value7 = value7;
  101. }
  102. @Column(name = "record_date")
  103. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
  104. public Date getRecordDate() {
  105. return recordDate;
  106. }
  107. public void setRecordDate(Date recordDate) {
  108. this.recordDate = recordDate;
  109. }
  110. public int getType() {
  111. return type;
  112. }
  113. public void setType(int type) {
  114. this.type = type;
  115. }
  116. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
  117. @Column(name = "sort_date")
  118. public Date getSortDate() {
  119. return sortDate;
  120. }
  121. public void setSortDate(Date sortDate) {
  122. this.sortDate = sortDate;
  123. }
  124. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
  125. public Date getCzrq() {
  126. return czrq;
  127. }
  128. public void setCzrq(Date czrq) {
  129. this.czrq = czrq;
  130. }
  131. public String getDel() {
  132. return del;
  133. }
  134. public void setDel(String del) {
  135. this.del = del;
  136. }
  137. @Column(name = "Idcard")
  138. public String getIdcard() {
  139. return idcard;
  140. }
  141. public void setIdcard(String idcard) {
  142. this.idcard = idcard;
  143. }
  144. @Column(name = "device_sn")
  145. public String getDeviceSn() {
  146. return deviceSn;
  147. }
  148. public void setDeviceSn(String deviceSn) {
  149. this.deviceSn = deviceSn;
  150. }
  151. public Short getStatus() {
  152. return status;
  153. }
  154. public void setStatus(Short status) {
  155. this.status = status;
  156. }
  157. }