Commit ade8e02c3495a70b2d2389c459941f99a6bd10ea

Authored by jiangjiazhi
1 parent 627a6a4130

修改新电子病历

Showing 3 changed files with 21 additions and 10 deletions

platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ ade8e02
... ... @@ -530,11 +530,12 @@
530 530 }
531 531 if (null != hScore) {
532 532 condition = condition.and("riskScore", hScore, MongoOper.IS);
  533 + }else if (null != isHighRisk) {
  534 + condition = condition.and("riskScore", 0, MongoOper.GT);
533 535 }
  536 +
534 537 if (StringUtils.isNotEmpty( rLevel)) {
535 538 condition = condition.and("riskLevelId", rLevel, MongoOper.LIKE);
536   - }else if (null != isHighRisk) {
537   - condition = condition.and("riskLevelId", null, MongoOper.NE);
538 539 }
539 540 if (null != areaId) {
540 541 condition = condition.and("areaId", areaId, MongoOper.IS);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ ade8e02
... ... @@ -74,7 +74,9 @@
74 74 //修改孕妇高危等级
75 75 Patients patients = patientsService.findOnePatientById(antExAddRequest.getParentId());
76 76 patients.setLastCheckEmployeeId(antExAddRequest.getCheckDoctor());
77   - updatePatientRiskLevel(antenatalExamination, patients);
  77 +// updatePatientRiskLevel(antenatalExamination, patients);
  78 + patientsService.updatePatient(patients);
  79 + updateLastRisk(antExAddRequest.getParentId());
78 80 } else {
79 81 AntenatalExaminationModel model = antExAddRequest.convertToDataModel();
80 82 model.setYn(YnEnums.YES.getId());
81 83  
... ... @@ -93,11 +95,12 @@
93 95 Patients patients = patientsService.findOnePatientById(antExAddRequest.getParentId());
94 96 patients.setLastCheckEmployeeId(antExAddRequest.getCheckDoctor());
95 97 model.setPid(patients.getPid());
  98 + patientsService.updatePatient(patients);
96 99 antenatalExaminationService.addOneBabyAnt(model);
97 100 //修改申请单状态
98 101 updateApplyOrder(model, antExAddRequest.getParentId());
99 102 //修改孕妇高危等级
100   - updatePatientRiskLevel(model, patients);
  103 +// updatePatientRiskLevel(model, patients);
101 104  
102 105  
103 106 if (null != patients.getBuildType() && patients.getBuildType() == 3) {
... ... @@ -1249,10 +1252,13 @@
1249 1252  
1250 1253 HighScoreResult highScoreResult= findLastRisk(patients.getPid(),true);
1251 1254 patients1.setRiskScore(highScoreResult.getScore());
1252   - patients1.setRiskFactorId(highScoreResult.getHighId());
1253   - patients1.setRiskLevelId(JsonUtil.array2JsonString(highScoreResult.getLevelId()));
1254   -
1255   - patientsService.findAndModify(patientsQuery1,patients1);
  1255 + if(CollectionUtils.isNotEmpty(highScoreResult.getHighId())) {
  1256 + patients1.setRiskFactorId(highScoreResult.getHighId());
  1257 + }
  1258 + if(CollectionUtils.isNotEmpty(highScoreResult.getLevelId())){
  1259 + patients1.setRiskLevelId(JsonUtil.array2JsonString(highScoreResult.getLevelId()));
  1260 + }
  1261 + patientsService.findAndModify(patientsQuery1, patients1);
1256 1262 }
1257 1263 /**
1258 1264 * 根据身份证号或者就诊卡号查询产妇
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ ade8e02
... ... @@ -204,9 +204,13 @@
204 204 {
205 205 patient.setPid(resperson.getId());
206 206 HighScoreResult highScoreResult= antenatalExaminationFacade.findLastRisk(resperson.getId(), true);
207   - patient.setRiskFactorId(highScoreResult.getHighId());
  207 + if(CollectionUtils.isNotEmpty(highScoreResult.getHighId())){
  208 + patient.setRiskFactorId(highScoreResult.getHighId());
  209 + }
208 210 patient.setRiskScore(highScoreResult.getScore());
209   - patient.setRiskLevelId(JsonUtil.array2JsonString(highScoreResult.getLevelId()));
  211 + if(CollectionUtils.isNotEmpty(highScoreResult.getLevelId())){
  212 + patient.setRiskLevelId(JsonUtil.array2JsonString(highScoreResult.getLevelId()));
  213 + }
210 214 }
211 215  
212 216 patient.setCreated(new Date());