Commit 5e825f2a575d6fd0cef21b8edc79a69d344e5fca

Authored by liquanyu
1 parent 30049c8123

his lis开发

Showing 1 changed file with 18 additions and 7 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 5e825f2
... ... @@ -238,20 +238,31 @@
238 238 }
239 239 if (resperson != null) {
240 240 patient.setPid(resperson.getId());
  241 + }
  242 +
  243 + patient.setCreated(new Date());
  244 + patient.setModified(new Date());
  245 + patient.setOperator(userId);
  246 + Patients p = yunBookbuildingService.addPregnantBookbuilding(patient);
  247 +
  248 +
  249 +
  250 + if (resperson != null) {
  251 + Patients p1 =new Patients();
  252 +
  253 + p1.setId(p.getId());
241 254 HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(resperson.getId(), true);
242 255 if (CollectionUtils.isNotEmpty(highScoreResult.getHighId())) {
243   - patient.setRiskFactorId(highScoreResult.getHighId());
  256 + p1.setRiskFactorId(highScoreResult.getHighId());
244 257 }
245   - patient.setRiskScore(highScoreResult.getScore());
  258 + p1.setRiskScore(highScoreResult.getScore());
246 259 if (CollectionUtils.isNotEmpty(highScoreResult.getLevelId())) {
247   - patient.setRiskLevelId(JsonUtil.array2JsonString(highScoreResult.getLevelId()));
  260 + p1.setRiskLevelId(JsonUtil.array2JsonString(highScoreResult.getLevelId()));
248 261 }
  262 + yunBookbuildingService.updatePregnant(p1,p.getId());
  263 +
249 264 }
250 265  
251   - patient.setCreated(new Date());
252   - patient.setModified(new Date());
253   - patient.setOperator(userId);
254   - Patients p = yunBookbuildingService.addPregnantBookbuilding(patient);
255 266  
256 267 if (p == null || p.getId() == null) {
257 268 br.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);