Commit 25796dca76c88277b1e88508eb4565532c98d377
1 parent
e91f87c4b7
Exists in
master
and in
1 other branch
孕妇分娩后 变成产妇
Showing 3 changed files with 60 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
25796dc
... | ... | @@ -66,7 +66,9 @@ |
66 | 66 | //修改申请单状态 |
67 | 67 | updateApplyOrder(antenatalExamination, antExAddRequest.getParentId()); |
68 | 68 | //修改孕妇高危等级 |
69 | - updatePatientRiskLevel(antenatalExamination,patientsService.findOnePatientById(antExAddRequest.getParentId())); | |
69 | + Patients patients =patientsService.findOnePatientById(antExAddRequest.getParentId()); | |
70 | + patients.setLastCheckEmployeeId(userId+""); | |
71 | + updatePatientRiskLevel(antenatalExamination,patients); | |
70 | 72 | } else { |
71 | 73 | AntenatalExaminationModel model = antExAddRequest.convertToDataModel(); |
72 | 74 | model.setYn(YnEnums.YES.getId()); |
... | ... | @@ -83,6 +85,7 @@ |
83 | 85 | return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("同一天只能建一次复诊"); |
84 | 86 | } |
85 | 87 | Patients patients = patientsService.findOnePatientById(antExAddRequest.getParentId()); |
88 | + patients.setLastCheckEmployeeId(userId+""); | |
86 | 89 | model.setPid(patients.getPid()); |
87 | 90 | antenatalExaminationService.addOneBabyAnt(model); |
88 | 91 | //修改申请单状态 |
... | ... | @@ -122,6 +125,7 @@ |
122 | 125 | antenatalExaminationService.updateAntExChu(antExChuModel, antExChuModel.getId()); |
123 | 126 | |
124 | 127 | Patients patients = patientsService.findOnePatientById(excAddRequest.getParentId()); |
128 | + patients.setLastCheckEmployeeId(userId+""); | |
125 | 129 | //修改患者风险等级 |
126 | 130 | updatePatientRiskLevel(antExChuModel, patients); |
127 | 131 | } else { |
... | ... | @@ -148,6 +152,7 @@ |
148 | 152 | antExChuModel.setYn(YnEnums.YES.getId()); |
149 | 153 | antenatalExaminationService.addOneAntEx(antExChuModel); |
150 | 154 | //修改患者风险等级 |
155 | + patients.setLastCheckEmployeeId(userId+""); | |
151 | 156 | updatePatientRiskLevel(antExChuModel, patients); |
152 | 157 | } |
153 | 158 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
25796dc
... | ... | @@ -12,6 +12,8 @@ |
12 | 12 | import com.lyms.platform.operate.web.request.*; |
13 | 13 | import com.lyms.platform.operate.web.result.*; |
14 | 14 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
15 | +import com.lyms.platform.permission.model.Users; | |
16 | +import com.lyms.platform.permission.service.UsersService; | |
15 | 17 | import com.lyms.platform.pojo.AntenatalExaminationModel; |
16 | 18 | import com.lyms.platform.pojo.BabyModel; |
17 | 19 | import com.lyms.platform.pojo.CommunityConfig; |
... | ... | @@ -22,6 +24,7 @@ |
22 | 24 | import com.lyms.platform.query.PatientsQuery; |
23 | 25 | import org.apache.commons.collections.CollectionUtils; |
24 | 26 | import org.apache.commons.lang.StringUtils; |
27 | +import org.apache.commons.lang.math.NumberUtils; | |
25 | 28 | import org.springframework.beans.factory.annotation.Autowired; |
26 | 29 | import org.springframework.data.domain.Sort; |
27 | 30 | import org.springframework.stereotype.Component; |
... | ... | @@ -52,6 +55,8 @@ |
52 | 55 | private AntenatalExaminationService antExService; |
53 | 56 | @Autowired |
54 | 57 | private AntenatalExaminationFacade antenatalExaminationFacade; |
58 | + @Autowired | |
59 | + private UsersService usersService; | |
55 | 60 | |
56 | 61 | |
57 | 62 | /** |
... | ... | @@ -265,7 +270,22 @@ |
265 | 270 | chanResult.convertToResult(patients); |
266 | 271 | antExQuery.setParentId(patients.getId()); |
267 | 272 | antExQuery.setYn(YnEnums.YES.getId()); |
268 | - | |
273 | + if(StringUtils.isNotEmpty(patients.getBookbuildingDoctor())){ | |
274 | + if(NumberUtils.isNumber(patients.getBookbuildingDoctor())){ | |
275 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getBookbuildingDoctor())); | |
276 | + chanResult.setlName(users.getName()); | |
277 | + }else{ | |
278 | + chanResult.setlName(patients.getBookbuildingDoctor()); | |
279 | + } | |
280 | + } | |
281 | + if(StringUtils.isNotEmpty(patients.getLastCheckEmployeeId())){ | |
282 | + if(NumberUtils.isNumber(patients.getLastCheckEmployeeId())){ | |
283 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId())); | |
284 | + chanResult.setCheckDoctor(users.getName()); | |
285 | + }else{ | |
286 | + chanResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
287 | + } | |
288 | + } | |
269 | 289 | //复诊次数 |
270 | 290 | int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); |
271 | 291 | chanResult.setcTimes(i); |
... | ... | @@ -292,6 +312,22 @@ |
292 | 312 | quanPatientsResult.convertToResult(patients); |
293 | 313 | antExQuery.setParentId(patients.getId()); |
294 | 314 | antExQuery.setYn(YnEnums.YES.getId()); |
315 | + if(StringUtils.isNotEmpty(patients.getBookbuildingDoctor())){ | |
316 | + if(NumberUtils.isNumber(patients.getBookbuildingDoctor())){ | |
317 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getBookbuildingDoctor())); | |
318 | + quanPatientsResult.setlName(users.getName()); | |
319 | + }else{ | |
320 | + quanPatientsResult.setlName(patients.getBookbuildingDoctor()); | |
321 | + } | |
322 | + } | |
323 | + if(StringUtils.isNotEmpty(patients.getLastCheckEmployeeId())){ | |
324 | + if(NumberUtils.isNumber(patients.getLastCheckEmployeeId())){ | |
325 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId())); | |
326 | + quanPatientsResult.setCheckDoctor(users.getName()); | |
327 | + }else{ | |
328 | + quanPatientsResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
329 | + } | |
330 | + } | |
295 | 331 | //复诊次数 |
296 | 332 | int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); |
297 | 333 | antExChuQuery.setParentId(patients.getId()); |
... | ... | @@ -317,6 +353,23 @@ |
317 | 353 | for (Patients patients : patientses) { |
318 | 354 | RiskPatientsResult riskPatientsResult = new RiskPatientsResult(); |
319 | 355 | riskPatientsResult.convertToResult(patients); |
356 | + if(StringUtils.isNotEmpty(patients.getBookbuildingDoctor())){ | |
357 | + if(NumberUtils.isNumber(patients.getBookbuildingDoctor())){ | |
358 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getBookbuildingDoctor())); | |
359 | + riskPatientsResult.setlName(users.getName()); | |
360 | + }else{ | |
361 | + riskPatientsResult.setlName(patients.getBookbuildingDoctor()); | |
362 | + } | |
363 | + } | |
364 | + if(StringUtils.isNotEmpty(patients.getLastCheckEmployeeId())){ | |
365 | + if(NumberUtils.isNumber(patients.getLastCheckEmployeeId())){ | |
366 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId())); | |
367 | + riskPatientsResult.setCheckDoctor(users.getName()); | |
368 | + }else{ | |
369 | + riskPatientsResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
370 | + } | |
371 | + } | |
372 | + | |
320 | 373 | //复诊次数 |
321 | 374 | int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); |
322 | 375 | antExChuQuery.setParentId(patients.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java
View file @
25796dc
... | ... | @@ -172,12 +172,10 @@ |
172 | 172 | setcTime(DateUtil.getyyyy_MM_dd(destModel.getNextCheckTime())); |
173 | 173 | setDueDate(DateUtil.getyyyy_MM_dd(destModel.getDueDate())); |
174 | 174 | setPhone(StringUtils.encryPhone(destModel.getPhone())); |
175 | - setCheckDoctor(destModel.getLastReportDoctorName()); | |
176 | 175 | if(null!=destModel.getLastMenses()){ |
177 | 176 | int days= DateUtil.daysBetween(destModel.getLastMenses(),new Date()); |
178 | 177 | this.dueWeek=StringUtils.dueWeek(days); |
179 | 178 | } |
180 | - setlName(destModel.getPublishName()); | |
181 | 179 | setPid(destModel.getPid()); |
182 | 180 | return this; |
183 | 181 | } |