Commit d27c21ac243357e6cad29c56a828a698c50a6e87

Authored by litao

Merge remote-tracking branch 'origin/master'

Showing 1 changed file

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