Commit 7eda0cbe9af7d4a81de1c3a063d1491c59f6a741
1 parent
415220ba88
Exists in
master
and in
6 other branches
听力诊断模块
Showing 5 changed files with 137 additions and 34 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientMarkHospitalQuery.java
- platform-biz-service/src/main/resources/mainOrm/master/PatientMarkHospital.xml
- platform-common/src/main/java/com/lyms/platform/common/enums/MakeHospitalEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatienMarkHospResult.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientMarkHospitalQuery.java
View file @
7eda0cb
... | ... | @@ -40,6 +40,14 @@ |
40 | 40 | */ |
41 | 41 | private Date backDate; |
42 | 42 | /** |
43 | + * 回院操作开始时间 | |
44 | + */ | |
45 | + private Date backStartDate; | |
46 | + /** | |
47 | + * 回院操作结束时间 | |
48 | + */ | |
49 | + private Date backEndDate; | |
50 | + /** | |
43 | 51 | * 回院预约时间 |
44 | 52 | */ |
45 | 53 | private Date backMakeDate; |
... | ... | @@ -68,6 +76,14 @@ |
68 | 76 | */ |
69 | 77 | private Date inHospitDate; |
70 | 78 | /** |
79 | + * 住院操作开始时间 | |
80 | + */ | |
81 | + private Date inHospitStartDate; | |
82 | + /** | |
83 | + * 住院操作结束时间 | |
84 | + */ | |
85 | + private Date inHospitEndDate; | |
86 | + /** | |
71 | 87 | * 住院预约时间 |
72 | 88 | */ |
73 | 89 | private Date inHospitMakeDate; |
... | ... | @@ -119,6 +135,38 @@ |
119 | 135 | * 住院类型(1-分娩住院、2-其他住院) |
120 | 136 | */ |
121 | 137 | private Integer hospitType; |
138 | + | |
139 | + public Date getBackStartDate() { | |
140 | + return backStartDate; | |
141 | + } | |
142 | + | |
143 | + public void setBackStartDate(Date backStartDate) { | |
144 | + this.backStartDate = backStartDate; | |
145 | + } | |
146 | + | |
147 | + public Date getBackEndDate() { | |
148 | + return backEndDate; | |
149 | + } | |
150 | + | |
151 | + public void setBackEndDate(Date backEndDate) { | |
152 | + this.backEndDate = backEndDate; | |
153 | + } | |
154 | + | |
155 | + public Date getInHospitStartDate() { | |
156 | + return inHospitStartDate; | |
157 | + } | |
158 | + | |
159 | + public void setInHospitStartDate(Date inHospitStartDate) { | |
160 | + this.inHospitStartDate = inHospitStartDate; | |
161 | + } | |
162 | + | |
163 | + public Date getInHospitEndDate() { | |
164 | + return inHospitEndDate; | |
165 | + } | |
166 | + | |
167 | + public void setInHospitEndDate(Date inHospitEndDate) { | |
168 | + this.inHospitEndDate = inHospitEndDate; | |
169 | + } | |
122 | 170 | |
123 | 171 | public Integer getHospitType() { |
124 | 172 | return hospitType; |
platform-biz-service/src/main/resources/mainOrm/master/PatientMarkHospital.xml
View file @
7eda0cb
... | ... | @@ -168,6 +168,18 @@ |
168 | 168 | <if test="backDate != null"> |
169 | 169 | and back_date = #{backDate,jdbcType=TIMESTAMP} |
170 | 170 | </if> |
171 | + <if test="backStartDate != null"> | |
172 | + AND | |
173 | + <![CDATA[ | |
174 | + DATEDIFF(#{backStartDate},back_date)<=0 | |
175 | + ]]> | |
176 | + </if> | |
177 | + <if test="backEndDate != null"> | |
178 | + AND | |
179 | + <![CDATA[ | |
180 | + DATEDIFF(#{backEndDate},back_date)>=0 | |
181 | + ]]> | |
182 | + </if> | |
171 | 183 | <if test="backMakeDate != null"> |
172 | 184 | and back_make_date = #{backMakeDate,jdbcType=TIMESTAMP} |
173 | 185 | </if> |
... | ... | @@ -188,6 +200,18 @@ |
188 | 200 | </if> |
189 | 201 | <if test="inHospitDate != null"> |
190 | 202 | and in_hospit_date = #{inHospitDate,jdbcType=TIMESTAMP} |
203 | + </if> | |
204 | + <if test="inHospitStartDate != null"> | |
205 | + AND | |
206 | + <![CDATA[ | |
207 | + DATEDIFF(#{inHospitStartDate},in_hospit_date)<=0 | |
208 | + ]]> | |
209 | + </if> | |
210 | + <if test="inHospitEndDate != null"> | |
211 | + AND | |
212 | + <![CDATA[ | |
213 | + DATEDIFF(#{inHospitEndDate},in_hospit_date)>=0 | |
214 | + ]]> | |
191 | 215 | </if> |
192 | 216 | <if test="inHospitMakeDate != null"> |
193 | 217 | and in_hospit_make_date = #{inHospitMakeDate,jdbcType=TIMESTAMP} |
platform-common/src/main/java/com/lyms/platform/common/enums/MakeHospitalEnums.java
View file @
7eda0cb
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java
View file @
7eda0cb
... | ... | @@ -103,6 +103,8 @@ |
103 | 103 | |
104 | 104 | ps.setId(UUID.randomUUID().toString().replace("-", "")); |
105 | 105 | ps.setHospitalId(hospitalId); |
106 | + ps.setMakeDoctor(String.valueOf(id)); | |
107 | + ps.setMakeDate(new Date()); | |
106 | 108 | ps.setBackStatus(1); |
107 | 109 | ps.setInHospitStatus(1); |
108 | 110 | patientMarkHospitalService.addPatientMarkHospital(ps); |
109 | 111 | |
... | ... | @@ -125,9 +127,8 @@ |
125 | 127 | public BaseResponse updatePatientMarkHospital(PatientMarkHospital ps, int type, Integer id) { |
126 | 128 | //根据用户id获取医院ID |
127 | 129 | String hospitalId = autoMatchFacade.getHospitalId(id); |
128 | - //根据用户id获取医院ID | |
129 | - patientMarkHospitalService.updatePatientMarkHospital(ps); | |
130 | 130 | |
131 | + | |
131 | 132 | PatientMarkHospitalLog markHospitalLog = new PatientMarkHospitalLog(); |
132 | 133 | markHospitalLog.setId(UUID.randomUUID().toString().replace("-", "")); |
133 | 134 | markHospitalLog.setHospitalId(hospitalId); |
... | ... | @@ -139,6 +140,8 @@ |
139 | 140 | markHospitalLog.setMarkeDoctor(ps.getMakeDoctor()); |
140 | 141 | markHospitalLog.setMarkeDate(ps.getMakeDate()); |
141 | 142 | markHospitalLog.setMarkeType(1); |
143 | + ps.setMakeDoctor(String.valueOf(id)); | |
144 | + ps.setMakeDate(new Date()); | |
142 | 145 | } else if (type == 2) {//回院提醒 |
143 | 146 | markHospitalLog.setRemResult(ps.getBackResult()); |
144 | 147 | markHospitalLog.setMakeDate(ps.getBackMakeDate()); |
... | ... | @@ -147,6 +150,9 @@ |
147 | 150 | markHospitalLog.setMarkeDoctor(ps.getBackDoctor()); |
148 | 151 | markHospitalLog.setMarkeDate(ps.getBackDate()); |
149 | 152 | markHospitalLog.setMarkeType(2); |
153 | + ps.setBackDoctor(String.valueOf(id)); | |
154 | + ps.setBackDate(new Date()); | |
155 | + ps.setBackStatus(2); | |
150 | 156 | } else if (type == 3) {//住院提醒 |
151 | 157 | markHospitalLog.setRemResult(ps.getInHospitResult()); |
152 | 158 | markHospitalLog.setMakeDate(ps.getInHospitMakeDate()); |
153 | 159 | |
... | ... | @@ -155,7 +161,12 @@ |
155 | 161 | markHospitalLog.setMarkeDoctor(ps.getInHospitDoctor()); |
156 | 162 | markHospitalLog.setMarkeDate(ps.getInHospitDate()); |
157 | 163 | markHospitalLog.setMarkeType(3); |
164 | + ps.setInHospitDoctor(String.valueOf(id)); | |
165 | + ps.setInHospitDate(new Date()); | |
166 | + ps.setInHospitStatus(2); | |
158 | 167 | } |
168 | + //根据用户id获取医院ID | |
169 | + patientMarkHospitalService.updatePatientMarkHospital(ps); | |
159 | 170 | patientMarkHospitalLogService.addPatientMarkHospitalLog(markHospitalLog); |
160 | 171 | BaseResponse baseResponse = new BaseResponse(); |
161 | 172 | baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
... | ... | @@ -199,6 +210,8 @@ |
199 | 210 | result.setBackResult(ps.getBackResult()); |
200 | 211 | if (ps.getBackResult() != null) { |
201 | 212 | result.setBackResultStr(ps.getBackResult() == 1 ? "成功" : "失败"); |
213 | + }else{ | |
214 | + result.setBackResultStr("--"); | |
202 | 215 | } |
203 | 216 | if (ps.getBackDoctor() != null) { |
204 | 217 | Users users = usersService.getUsers(Integer.parseInt(ps.getBackDoctor())); |
... | ... | @@ -222,7 +235,8 @@ |
222 | 235 | if (ps.getInHospitResult() != null) { |
223 | 236 | result.setInHospitResult(ps.getInHospitResult()); |
224 | 237 | result.setInHospitResultStr(ps.getInHospitResult() == 1 ? "成功" : "失败"); |
225 | - | |
238 | + }else{ | |
239 | + result.setInHospitResultStr("--"); | |
226 | 240 | } |
227 | 241 | if(ps.getInHospitDoctor()!=null){ |
228 | 242 | Users users = usersService.getUsers(Integer.parseInt(ps.getInHospitDoctor())); |
229 | 243 | |
230 | 244 | |
231 | 245 | |
... | ... | @@ -242,13 +256,22 @@ |
242 | 256 | } |
243 | 257 | |
244 | 258 | if (ps.getHospitStatus() != null) { |
245 | - result.setConfirmStatus(ps.getHospitStatus()); | |
246 | - result.setConfirmStatusStr(ps.getHospitStatus() == 1 ? "待住院" : "已住院"); | |
259 | + result.setHospitStatus(ps.getHospitStatus()); | |
260 | + result.setHospitStatusStr(ps.getHospitStatus() == 1 ? "待住院" : "已住院"); | |
261 | + }else{ | |
262 | + result.setHospitStatusStr("--"); | |
247 | 263 | } |
248 | - result.setConfirmDate(DateUtil.getyyyy_MM_dd(ps.getHospitDate())); | |
264 | + if(ps.getHospitDate()!=null){ | |
265 | + result.setHospitDate(DateUtil.getyyyy_MM_dd(ps.getHospitDate())); | |
266 | + }else{ | |
267 | + result.setHospitDate("--"); | |
268 | + } | |
249 | 269 | if (ps.getHospitType() != null) { |
250 | - result.setConfirmType(ps.getHospitType() == 1 ? "分娩住院" : "其他住院"); | |
270 | + result.setHospitTypeStr(ps.getHospitType() == 1 ? "分娩住院" : "其他住院"); | |
271 | + }else{ | |
272 | + result.setHospitTypeStr("--"); | |
251 | 273 | } |
274 | + result.setHospitType(ps.getHospitType()); | |
252 | 275 | result.setMakeInHospitDate(DateUtil.getyyyy_MM_dd(ps.getMakeInHospitDate())); |
253 | 276 | result.setMakeDate(DateUtil.getyyyy_MM_dd(ps.getMakeDate())); |
254 | 277 | if(ps.getMakeDoctor()!=null){ |
255 | 278 | |
... | ... | @@ -306,16 +329,16 @@ |
306 | 329 | patientMarkHospQuery.setBackStatus(patientMarkRequest.getStatus()); |
307 | 330 | patientMarkHospQuery.setBackResult(patientMarkRequest.getResult()); |
308 | 331 | patientMarkHospQuery.setBackFailure(patientMarkRequest.getFailure()); |
309 | - patientMarkHospQuery.setMakeStartDate(patientMarkRequest.getMakeStartDate()); | |
310 | - patientMarkHospQuery.setMakeEndDate(patientMarkRequest.getMakeEndDate()); | |
332 | + patientMarkHospQuery.setBackStartDate(patientMarkRequest.getMakeStartDate()); | |
333 | + patientMarkHospQuery.setBackEndDate(patientMarkRequest.getMakeEndDate()); | |
311 | 334 | } else if (patientMarkRequest.getType() == 3) {//3-住院提醒 |
312 | 335 | //回院提醒状态为已提醒 |
313 | 336 | patientMarkHospQuery.setBackStatus(2); |
314 | 337 | patientMarkHospQuery.setInHospitStatus(patientMarkRequest.getStatus()); |
315 | 338 | patientMarkHospQuery.setInHospitResult(patientMarkRequest.getResult()); |
316 | 339 | patientMarkHospQuery.setInHospitFailure(patientMarkRequest.getFailure()); |
317 | - patientMarkHospQuery.setMakeStartDate(patientMarkRequest.getMakeStartDate()); | |
318 | - patientMarkHospQuery.setMakeEndDate(patientMarkRequest.getMakeEndDate()); | |
340 | + patientMarkHospQuery.setInHospitStartDate(patientMarkRequest.getMakeStartDate()); | |
341 | + patientMarkHospQuery.setInHospitEndDate(patientMarkRequest.getMakeEndDate()); | |
319 | 342 | } |
320 | 343 | |
321 | 344 | patientMarkHospQuery.setSort("hospit_date"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatienMarkHospResult.java
View file @
7eda0cb
... | ... | @@ -127,22 +127,34 @@ |
127 | 127 | /** |
128 | 128 | * 住院状态 1-待住院、2-已住院 |
129 | 129 | */ |
130 | - private Integer confirmStatus; | |
131 | - private String confirmStatusStr; | |
130 | + private Integer hospitStatus; | |
131 | + private String hospitStatusStr; | |
132 | 132 | /** |
133 | 133 | * 住院时间 |
134 | 134 | */ |
135 | - private String confirmDate; | |
135 | + private String hospitDate; | |
136 | 136 | /** |
137 | 137 | * 住院类型 (分娩住院/其他住院) |
138 | 138 | */ |
139 | - private String confirmType; | |
139 | + private Integer hospitType; | |
140 | + private String hospitTypeStr; | |
140 | 141 | |
141 | 142 | public String getId() { |
142 | 143 | return id; |
143 | 144 | } |
144 | 145 | |
146 | + public void setHospitType(Integer hospitType) { | |
147 | + this.hospitType = hospitType; | |
148 | + } | |
145 | 149 | |
150 | + public String getHospitTypeStr() { | |
151 | + return hospitTypeStr; | |
152 | + } | |
153 | + | |
154 | + public void setHospitTypeStr(String hospitTypeStr) { | |
155 | + this.hospitTypeStr = hospitTypeStr; | |
156 | + } | |
157 | + | |
146 | 158 | public void setId(String id) { |
147 | 159 | this.id = id; |
148 | 160 | } |
149 | 161 | |
150 | 162 | |
151 | 163 | |
152 | 164 | |
153 | 165 | |
154 | 166 | |
... | ... | @@ -379,36 +391,32 @@ |
379 | 391 | this.makeRemark = makeRemark; |
380 | 392 | } |
381 | 393 | |
382 | - public Integer getConfirmStatus() { | |
383 | - return confirmStatus; | |
394 | + public Integer getHospitStatus() { | |
395 | + return hospitStatus; | |
384 | 396 | } |
385 | 397 | |
386 | - public void setConfirmStatus(Integer confirmStatus) { | |
387 | - this.confirmStatus = confirmStatus; | |
398 | + public void setHospitStatus(Integer hospitStatus) { | |
399 | + this.hospitStatus = hospitStatus; | |
388 | 400 | } |
389 | 401 | |
390 | - public String getConfirmStatusStr() { | |
391 | - return confirmStatusStr; | |
402 | + public String getHospitStatusStr() { | |
403 | + return hospitStatusStr; | |
392 | 404 | } |
393 | 405 | |
394 | - public void setConfirmStatusStr(String confirmStatusStr) { | |
395 | - this.confirmStatusStr = confirmStatusStr; | |
406 | + public void setHospitStatusStr(String hospitStatusStr) { | |
407 | + this.hospitStatusStr = hospitStatusStr; | |
396 | 408 | } |
397 | 409 | |
398 | - public String getConfirmDate() { | |
399 | - return confirmDate; | |
410 | + public String getHospitDate() { | |
411 | + return hospitDate; | |
400 | 412 | } |
401 | 413 | |
402 | - public void setConfirmDate(String confirmDate) { | |
403 | - this.confirmDate = confirmDate; | |
414 | + public void setHospitDate(String hospitDate) { | |
415 | + this.hospitDate = hospitDate; | |
404 | 416 | } |
405 | 417 | |
406 | - public String getConfirmType() { | |
407 | - return confirmType; | |
408 | - } | |
409 | - | |
410 | - public void setConfirmType(String confirmType) { | |
411 | - this.confirmType = confirmType; | |
418 | + public Integer getHospitType() { | |
419 | + return hospitType; | |
412 | 420 | } |
413 | 421 | |
414 | 422 | public String getDueDate() { |