Commit b5edb494932b1905dd85876098992e99aa11a64f
1 parent
93a1091f20
Exists in
master
and in
6 other branches
回执单医生ID和name
Showing 2 changed files with 9 additions and 21 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
b5edb49
... | ... | @@ -69,23 +69,19 @@ |
69 | 69 | |
70 | 70 | //添加回执单 |
71 | 71 | public BaseResponse addReferralReceipt(ReferralReceiptRequest referralReceipt) { |
72 | - ReferralApplyOrderModel referralApplyOrderModel = applyOrderService.findByIdReferralApplyOrder(referralReceipt.getId()); | |
72 | + ReferralApplyOrderModel referralApplyOrderModel = new ReferralApplyOrderModel(); | |
73 | 73 | referralReceipt.convertToDataModel(referralApplyOrderModel); |
74 | 74 | referralApplyOrderModel.setrRisk(queryRiskName(referralReceipt.getrRisk())); |
75 | 75 | referralApplyOrderModel.setRiskFactorId(referralReceipt.getrRisk()); |
76 | 76 | int score = antenatalExaminationFacade.queryRisk(referralReceipt.getrRisk(), false).getScore(); |
77 | 77 | //高危评分 |
78 | 78 | referralApplyOrderModel.setScore(score); |
79 | - if (StringUtils.isNotEmpty(referralApplyOrderModel.getId())) { | |
80 | - updataReferral(referralReceipt.getPatientId(),referralApplyOrderModel); | |
81 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
82 | - } else { | |
83 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("错误"); | |
84 | - } | |
79 | + updataReferral(referralReceipt.getPatientId(), referralApplyOrderModel); | |
80 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
85 | 81 | } |
86 | 82 | |
87 | 83 | //同步更新两条转诊记录信息 |
88 | - public void updataReferral(String patientId,ReferralApplyOrderModel referralApplyModel){ | |
84 | + public void updataReferral(String patientId, ReferralApplyOrderModel referralApplyModel) { | |
89 | 85 | Patients patients = patientsService.findOnePatientById(patientId); |
90 | 86 | ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery(); |
91 | 87 | referralApplyOrderQuery.setParentId(patientId); |
... | ... | @@ -102,13 +98,6 @@ |
102 | 98 | referralApplyOrderQuery1.setTransferredHospital(patients.getHospitalId()); |
103 | 99 | referralApplyOrderQuery1.setPid(patients.getPid()); |
104 | 100 | applyOrderService.updateByParentId(referralApplyOrderQuery1, referralApplyModel); |
105 | - | |
106 | - //查询转出申请单 | |
107 | - ReferralApplyOrderQuery referralApplyOrderQuery2 = new ReferralApplyOrderQuery(); | |
108 | - referralApplyOrderQuery2.setOutHospitalId(patients.getHospitalId()); | |
109 | - referralApplyOrderQuery2.setTransferredHospital(outHospitalId); | |
110 | - referralApplyOrderQuery2.setPid(patients.getPid()); | |
111 | - applyOrderService.updateByParentId(referralApplyOrderQuery2, referralApplyModel); | |
112 | 101 | } |
113 | 102 | } |
114 | 103 | |
115 | 104 | |
116 | 105 | |
... | ... | @@ -522,14 +511,14 @@ |
522 | 511 | referralApplyOrderResult.setScreenResult(screenList); |
523 | 512 | |
524 | 513 | |
525 | - Map<String,Object> recDoctorMap = new HashMap<>(); | |
514 | + Map<String, Object> recDoctorMap = new HashMap<>(); | |
526 | 515 | //接诊医生 |
527 | 516 | if (NumberUtils.isNumber(referralApplyOrderModel.getRecDoctor())) { |
528 | - recDoctorMap.put("id",referralApplyOrderModel.getRecDoctor()); | |
517 | + recDoctorMap.put("id", referralApplyOrderModel.getRecDoctor()); | |
529 | 518 | Users users = usersService.getUsers(NumberUtils.toInt(referralApplyOrderModel.getRecDoctor())); |
530 | 519 | if (null != users) { |
531 | - recDoctorMap.put("id",users.getId()); | |
532 | - recDoctorMap.put("name",users.getName()); | |
520 | + recDoctorMap.put("id", users.getId()); | |
521 | + recDoctorMap.put("name", users.getName()); | |
533 | 522 | referralApplyOrderResult.setRecDoctor(recDoctorMap); |
534 | 523 | } |
535 | 524 | } |
... | ... | @@ -908,7 +897,7 @@ |
908 | 897 | } |
909 | 898 | applyOrderResult.setrLevel(rLevel); |
910 | 899 | Patients patients = patientsService.findOnePatientById(orderModel.getParentId()); |
911 | - if(patients!=null){ | |
900 | + if (patients != null) { | |
912 | 901 | //筛查结果数据 |
913 | 902 | String screenStr = basicConfigService.getScreenResult(patients.getScreenResult()); |
914 | 903 | applyOrderResult.setScreenResult(screenStr); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ReferralReceiptRequest.java
View file @
b5edb49
... | ... | @@ -77,7 +77,6 @@ |
77 | 77 | * @return 转换后的model |
78 | 78 | */ |
79 | 79 | public void convertToDataModel(ReferralApplyOrderModel referralApplyOrderModel) { |
80 | - referralApplyOrderModel.setId(id); | |
81 | 80 | referralApplyOrderModel.setrRisk(rRisk); |
82 | 81 | if (null != diagnosis) { |
83 | 82 | referralApplyOrderModel.setDiagnosis(JsonUtil.array2JsonString(diagnosis)); |