Commit 58f3f3d1cc88c4546e8d39090fd79204022e039b

Authored by yangfei
1 parent ab3ad5c3b5

诊断结果数据同步到转诊记录

Showing 4 changed files with 55 additions and 14 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/ReferralApplyOrderModel.java View file @ 58f3f3d
... ... @@ -49,8 +49,10 @@
49 49 private Date dueDate;
50 50 //高危分级
51 51 private List<String> rLevel;
52   - //高危风险因素
  52 + //高危风险因素名称
53 53 private List<String> rRisk;
  54 + //高危风险因素Id集合
  55 + private List<String> riskFactorId;
54 56 //高危评分
55 57 private Integer score;
56 58 //转入医院
57 59  
... ... @@ -93,7 +95,13 @@
93 95 //其他诊断
94 96 private String otherDiagn;
95 97  
  98 + public List<String> getRiskFactorId() {
  99 + return riskFactorId;
  100 + }
96 101  
  102 + public void setRiskFactorId(List<String> riskFactorId) {
  103 + this.riskFactorId = riskFactorId;
  104 + }
97 105  
98 106 public String getDiagnosis() {
99 107 return diagnosis;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentArchivesRegionController.java View file @ 58f3f3d
... ... @@ -60,7 +60,5 @@
60 60 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
61 61 residentsFacade.regionaResidentsExport(queryRequest,loginState.getId(),response);
62 62 }
63   -
64   -
65 63 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 58f3f3d
... ... @@ -455,14 +455,17 @@
455 455 referralApplyOrderModel.setOtherDiagn(antenatalExamination.getDiagnosisOther());
456 456 referralApplyOrderModel.setDiagnosis(antenatalExamination.getDiagnosis());
457 457 List<String> rlevel=Collections.emptyList();
  458 + //风险等级颜色
458 459 if(StringUtils.isNotEmpty(patients.getRiskLevelId())&&!"[]".equals(patients.getRiskLevelId())){
459 460 rlevel= JsonUtil.jkstr2Obj(patients.getRiskLevelId(), List.class);
460 461 com.lyms.platform.operate.web.utils.CollectionUtils.removeDuplicate(rlevel,true);
461 462 }
462 463 referralApplyOrderModel.setrLevel(rlevel);
463 464 try {
464   - List l = JsonUtil.toList(antenatalExamination.getRiskFactor(), List.class);
465   - referralApplyOrderModel.setrRisk(queryRiskName(l));
  465 + //风险名称
  466 + referralApplyOrderModel.setrRisk(queryRiskName(patients.getRiskFactorId()));
  467 + //高危集合ID
  468 + referralApplyOrderModel.setRiskFactorId(patients.getRiskFactorId());
466 469 System.out.println("待修改转诊信息:"+referralApplyOrderModel.toString());
467 470 } catch (Exception e) {
468 471 e.printStackTrace();
... ... @@ -634,6 +637,26 @@
634 637 referralApplyOrderQuery1.setPid(patients.getPid());
635 638  
636 639 ReferralApplyOrderModel model = new ReferralApplyOrderModel();
  640 +
  641 + model.setScore(patients.getRiskScore());
  642 + //其他诊断
  643 + model.setOtherDiagn(antExChuModel.getDiagnosisOther());
  644 + model.setDiagnosis(antExChuModel.getDiagnosis());
  645 + List<String> rlevel=Collections.emptyList();
  646 + if(StringUtils.isNotEmpty(patients.getRiskLevelId())&&!"[]".equals(patients.getRiskLevelId())){
  647 + rlevel= JsonUtil.jkstr2Obj(patients.getRiskLevelId(), List.class);
  648 + com.lyms.platform.operate.web.utils.CollectionUtils.removeDuplicate(rlevel,true);
  649 + }
  650 + model.setrLevel(rlevel);
  651 + try {
  652 + model.setrRisk(queryRiskName(patients.getRiskFactorId()));
  653 + //高危集合ID
  654 + model.setRiskFactorId(patients.getRiskFactorId());
  655 + } catch (Exception e) {
  656 + e.printStackTrace();
  657 + }
  658 +
  659 +
637 660 //设置接收时间
638 661 model.setReceived(antExChuModel.getCheckTime());
639 662 model.setRecDoctor(antExChuModel.getProdDoctor());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java View file @ 58f3f3d
... ... @@ -72,6 +72,7 @@
72 72 ReferralApplyOrderModel referralApplyOrderModel = applyOrderService.findByIdReferralApplyOrder(referralReceipt.getId());
73 73 referralReceipt.convertToDataModel(referralApplyOrderModel);
74 74 referralApplyOrderModel.setrRisk(queryRiskName(referralReceipt.getrRisk()));
  75 + referralApplyOrderModel.setRiskFactorId(referralReceipt.getrRisk());
75 76 if (StringUtils.isNotEmpty(referralApplyOrderModel.getId())) {
76 77 ReferralApplyOrderQuery referralApplyOrderQuery1 = new ReferralApplyOrderQuery();
77 78 referralApplyOrderQuery1.setId(referralReceipt.getId());
... ... @@ -496,6 +497,15 @@
496 497 map.put("name", users.getName());
497 498 }
498 499 }
  500 + try {
  501 + if (CollectionUtils.isNotEmpty(list.get(0).getRiskFactorId())) {
  502 + HighScoreResult highScoreResult = antenatalExaminationFacade.queryRisk(list.get(0).getRiskFactorId(), false);
  503 + referralApplyOrderResult.setRiskFactor(highScoreResult.getHighRisk());
  504 + }
  505 + } catch (Exception e) {
  506 + e.printStackTrace();
  507 + }
  508 +
499 509 referralApplyOrderResult.setApplyDoctor(map);
500 510 List<Map<String, Object>> screenList = antenatalExaminationFacade.getscreenResult(patients.getScreenResult());
501 511 referralApplyOrderResult.setScreenResult(screenList);
... ... @@ -875,15 +885,17 @@
875 885 }
876 886 applyOrderResult.setrLevel(rLevel);
877 887 Patients patients = patientsService.findOnePatientById(orderModel.getParentId());
878   - //筛查结果数据
879   - String screenStr = basicConfigService.getScreenResult(patients.getScreenResult());
880   - applyOrderResult.setScreenResult(screenStr);
881   - if (null != patients) {
882   - applyOrderResult.setIsGravida(patients.getType() == 3 ? "0" : "1");
883   - if (1 == patients.getDueStatus())
884   - applyOrderResult.setcDueWeek("终止妊娠");
885   - else if (patients.getType() == 3)
886   - applyOrderResult.setcDueWeek("已分娩");
  888 + if(patients!=null){
  889 + //筛查结果数据
  890 + String screenStr = basicConfigService.getScreenResult(patients.getScreenResult());
  891 + applyOrderResult.setScreenResult(screenStr);
  892 + if (null != patients) {
  893 + applyOrderResult.setIsGravida(patients.getType() == 3 ? "0" : "1");
  894 + if (1 == patients.getDueStatus())
  895 + applyOrderResult.setcDueWeek("终止妊娠");
  896 + else if (patients.getType() == 3)
  897 + applyOrderResult.setcDueWeek("已分娩");
  898 + }
887 899 }
888 900 data.add(applyOrderResult);
889 901 }