Commit 6eb3cb218c7a995d05b25f172fe2abfb1ce447dd

Authored by liquanyu
1 parent 6056036bad

孕妇记录添加妊娠状态

Showing 3 changed files with 39 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 6eb3cb2
... ... @@ -254,6 +254,7 @@
254 254 result.setBookbuildDate(DateUtil.getyyyy_MM_dd(pat.getBookbuildingDate()));
255 255 result.setId(pat.getId());
256 256 result.setType(pat.getType());
  257 + result.setDueStatus(pat.getDueStatus());
257 258 results.add(result);
258 259 }
259 260 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java View file @ 6eb3cb2
1 1 package com.lyms.platform.operate.web.facade;
2 2  
3   -import com.lyms.platform.biz.service.AntenatalExaminationService;
4   -import com.lyms.platform.biz.service.BasicConfigService;
5   -import com.lyms.platform.biz.service.PatientsService;
6   -import com.lyms.platform.biz.service.StopPregnancyService;
  3 +import com.lyms.platform.biz.service.*;
7 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
8 5 import com.lyms.platform.common.enums.StopPregEnums;
9 6 import com.lyms.platform.common.enums.YnEnums;
... ... @@ -51,6 +48,9 @@
51 48 @Autowired
52 49 private BasicConfigService basicConfigService;
53 50  
  51 + @Autowired
  52 + private YunBookbuildingService yunBookbuildingService;
  53 +
54 54 /**
55 55 * 更新终止妊娠
56 56 * @param request
... ... @@ -60,7 +60,7 @@
60 60 StopPregModel model = getStopPregModel(request);
61 61 model.setModified(new Date());
62 62  
63   - stopPregnancyService.updateStopPreg(model,request.getId());
  63 + stopPregnancyService.updateStopPreg(model, request.getId());
64 64 BaseResponse objectResponse = new BaseResponse();
65 65 objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
66 66 objectResponse.setErrormsg("成功");
... ... @@ -73,6 +73,27 @@
73 73 * @return
74 74 */
75 75 public BaseResponse addStopPreg(StopPregRequest request) {
  76 +
  77 +
  78 + PatientsQuery patientsQuery = new PatientsQuery();
  79 + patientsQuery.setYn(YnEnums.YES.getId());
  80 + patientsQuery.setType(1);
  81 + patientsQuery.setId(request.getId());
  82 + patientsQuery.setHospitalId(request.getHospitalId());
  83 +
  84 + List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
  85 + if (CollectionUtils.isNotEmpty(patients))
  86 + {
  87 + Patients patient = patients.get(0);
  88 + if (patient != null)
  89 + {
  90 + patient.setModified(new Date());
  91 + patient.setDueStatus(1);
  92 + //分娩状态 0未终止妊娠 1终止妊娠
  93 + yunBookbuildingService.updatePregnant(patient, request.getPid());
  94 + }
  95 +
  96 + }
76 97  
77 98 StopPregModel model = getStopPregModel(request);
78 99 model.setCreated(new Date());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BookbuildingRecordResult.java View file @ 6eb3cb2
... ... @@ -16,6 +16,18 @@
16 16 //1孕妇 3产妇
17 17 private Integer type;
18 18  
  19 +
  20 + //分娩状态 0未终止妊娠 1终止妊娠
  21 + private Integer dueStatus;
  22 +
  23 + public Integer getDueStatus() {
  24 + return dueStatus;
  25 + }
  26 +
  27 + public void setDueStatus(Integer dueStatus) {
  28 + this.dueStatus = dueStatus;
  29 + }
  30 +
19 31 public Integer getType() {
20 32 return type;
21 33 }