Commit 4429ca51b88e2cf7b1ae9547b05c37caecfd7305
1 parent
6f0a8979cb
Exists in
master
and in
8 other branches
修改新电子病历
Showing 1 changed file with 28 additions and 14 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
View file @
4429ca5
... | ... | @@ -30,7 +30,17 @@ |
30 | 30 | private String remarks; |
31 | 31 | //末次月经 |
32 | 32 | private String lastMenses; |
33 | + //1 孕妇 0 产妇 | |
34 | + private String isGravida; | |
33 | 35 | |
36 | + public String getIsGravida() { | |
37 | + return isGravida; | |
38 | + } | |
39 | + | |
40 | + public void setIsGravida(String isGravida) { | |
41 | + this.isGravida = isGravida; | |
42 | + } | |
43 | + | |
34 | 44 | public Integer getAge() { |
35 | 45 | return age; |
36 | 46 | } |
... | ... | @@ -96,7 +106,7 @@ |
96 | 106 | } |
97 | 107 | |
98 | 108 | public String getRiskScore() { |
99 | - if(null==riskScore){ | |
109 | + if (null == riskScore) { | |
100 | 110 | return "0"; |
101 | 111 | } |
102 | 112 | return riskScore; |
103 | 113 | |
104 | 114 | |
105 | 115 | |
106 | 116 | |
107 | 117 | |
... | ... | @@ -113,31 +123,35 @@ |
113 | 123 | public void setyChanQi(String yChanQi) { |
114 | 124 | this.yChanQi = yChanQi; |
115 | 125 | } |
116 | - public PatientBaseResult convert(Patients patients){ | |
126 | + | |
127 | + public PatientBaseResult convert(Patients patients) { | |
117 | 128 | setId(patients.getId()); |
118 | 129 | try { |
119 | - if(null!=patients.getBirth()){ | |
130 | + if (null != patients.getBirth()) { | |
120 | 131 | setAge(DateUtil.getAge(patients.getBirth())); |
121 | 132 | } |
122 | - }catch (Exception e){ | |
133 | + } catch (Exception e) { | |
123 | 134 | } |
124 | - if(null!=patients.getDueDate()){ | |
135 | + if (null != patients.getDueDate()) { | |
125 | 136 | setyChanQi(DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
126 | 137 | } |
127 | 138 | setName(patients.getUsername()); |
128 | 139 | setPhone(patients.getPhone()); |
129 | 140 | setRemarks(patients.getMremark()); |
130 | 141 | |
131 | - if (null!=patients.getDueStatus() && 1 == patients.getDueStatus()) { | |
132 | - this.dueWeek = "终止妊娠"; | |
133 | - } else if (3 == patients.getType()) { | |
134 | - this.dueWeek = "已分娩"; | |
135 | - } else { | |
136 | - if (null != patients.getLastMenses()) { | |
137 | - int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); | |
138 | - this.dueWeek = StringUtils.dueWeek(days); | |
139 | - } | |
142 | + if(null!=patients.getFmDate()){ | |
143 | + //1 孕妇 0 产妇 | |
144 | + setIsGravida("0"); | |
145 | + }else{ | |
146 | + setIsGravida("1"); | |
140 | 147 | } |
148 | + | |
149 | + | |
150 | + if (null != patients.getLastMenses()) { | |
151 | + int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); | |
152 | + this.dueWeek = StringUtils.dueWeek(days); | |
153 | + } | |
154 | + | |
141 | 155 | return this; |
142 | 156 | } |
143 | 157 | } |