Commit 8bf40b798c919669aee8e29eeec992fcc9307678
1 parent
d4bb649f15
Exists in
master
and in
1 other branch
诊断结果数据同步到转诊记录
Showing 5 changed files with 30 additions and 15 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IReferralApplyOrderDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/ReferralApplyOrderDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/ApplyOrderService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IReferralApplyOrderDao.java
View file @
8bf40b7
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/ReferralApplyOrderDaoImpl.java
View file @
8bf40b7
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/ApplyOrderService.java
View file @
8bf40b7
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public ReferralApplyOrderModel findByIdReferralApplyOrder(String id) { |
| 49 | - return iReferralApplyOrderDao.findById(id); | |
| 49 | + return iReferralApplyOrderDao.findOneReferral(id); | |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | public SieveApplyOrderModel addOneSieveApplyOrder(SieveApplyOrderModel obj) { |
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
8bf40b7
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
8bf40b7
| ... | ... | @@ -67,20 +67,35 @@ |
| 67 | 67 | @Autowired |
| 68 | 68 | private CommonService commonService; |
| 69 | 69 | |
| 70 | - public BaseResponse addReferralReceipt(ReferralReceiptRequest referralReceipt){ | |
| 70 | + public BaseResponse addReferralReceipt(ReferralReceiptRequest referralReceipt) { | |
| 71 | 71 | |
| 72 | 72 | ReferralApplyOrderModel referralApplyOrderModel = applyOrderService.findByIdReferralApplyOrder(referralReceipt.getId()); |
| 73 | 73 | referralReceipt.convertToDataModel(referralApplyOrderModel); |
| 74 | - if(StringUtils.isNotEmpty(referralApplyOrderModel.getId())){ | |
| 74 | + referralApplyOrderModel.setrRisk(queryRiskName(referralReceipt.getrRisk())); | |
| 75 | + if (StringUtils.isNotEmpty(referralApplyOrderModel.getId())) { | |
| 75 | 76 | ReferralApplyOrderQuery referralApplyOrderQuery1 = new ReferralApplyOrderQuery(); |
| 76 | 77 | referralApplyOrderQuery1.setId(referralReceipt.getId()); |
| 77 | - applyOrderService.updateByParentId(referralApplyOrderQuery1,referralApplyOrderModel); | |
| 78 | + applyOrderService.updateByParentId(referralApplyOrderQuery1, referralApplyOrderModel); | |
| 78 | 79 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 79 | - }else{ | |
| 80 | + } else { | |
| 80 | 81 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("错误"); |
| 81 | 82 | } |
| 82 | 83 | } |
| 83 | 84 | |
| 85 | + private List queryRiskName(List l) { | |
| 86 | + List data = new ArrayList(); | |
| 87 | + if (CollectionUtils.isNotEmpty(l)) { | |
| 88 | + for (int i = 0; i < l.size(); i++) { | |
| 89 | + String key = (String) l.get(i); | |
| 90 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(key); | |
| 91 | + if (null != basicConfig) { | |
| 92 | + data.add(basicConfig.getName()); | |
| 93 | + } | |
| 94 | + } | |
| 95 | + } | |
| 96 | + return data; | |
| 97 | + } | |
| 98 | + | |
| 84 | 99 | /** |
| 85 | 100 | * 增加转诊申请 |
| 86 | 101 | * |
| 87 | 102 | |
| ... | ... | @@ -149,13 +164,13 @@ |
| 149 | 164 | referralApplyOrderModel.setLastMenses(patients.getLastMenses()); |
| 150 | 165 | referralApplyOrderModel.setrRisk(Arrays.asList(commonService.resloveFactor(patients.getRiskFactorId()).split(","))); |
| 151 | 166 | referralApplyOrderModel.setOtherHighRisk(patients.getoRiskFactor()); |
| 152 | - List<String> rlevel=Collections.emptyList(); | |
| 153 | - if(StringUtils.isNotEmpty(patients.getRiskLevelId())&&!"[]".equals(patients.getRiskLevelId())){ | |
| 154 | - rlevel= JsonUtil.jkstr2Obj(patients.getRiskLevelId(), List.class); | |
| 155 | - com.lyms.platform.operate.web.utils.CollectionUtils.removeDuplicate(rlevel,true); | |
| 167 | + List<String> rlevel = Collections.emptyList(); | |
| 168 | + if (StringUtils.isNotEmpty(patients.getRiskLevelId()) && !"[]".equals(patients.getRiskLevelId())) { | |
| 169 | + rlevel = JsonUtil.jkstr2Obj(patients.getRiskLevelId(), List.class); | |
| 170 | + com.lyms.platform.operate.web.utils.CollectionUtils.removeDuplicate(rlevel, true); | |
| 156 | 171 | } |
| 157 | 172 | referralApplyOrderModel.setrLevel(rlevel); |
| 158 | - referralApplyOrderModel.setScore(patients.getRiskScore()); | |
| 173 | + referralApplyOrderModel.setScore(patients.getRiskScore()); | |
| 159 | 174 | /* List lsit = new ArrayList(); |
| 160 | 175 | List<Map> list = highScoreResult.filter(highScoreResult.getLevel()); |
| 161 | 176 | for (Map<String, String> map : list) { |
| ... | ... | @@ -318,7 +333,7 @@ |
| 318 | 333 | */ |
| 319 | 334 | public BaseResponse addOneSieveApplyOrder(SieveApplyOrderAddRequest sieveApplyOrderAddRequest, Integer userId) { |
| 320 | 335 | SieveApplyOrderModel sieveApplyOrderModel = sieveApplyOrderAddRequest.convertToDataModel(); |
| 321 | - String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 336 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 322 | 337 | |
| 323 | 338 | //表示区域的 |
| 324 | 339 | if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { |
| ... | ... | @@ -411,7 +426,7 @@ |
| 411 | 426 | sieveService.updateOneChanQianDiaSieve(sieveModel); |
| 412 | 427 | operateLogFacade.addModifyOptLog(userId, Integer.parseInt(hospitalId), sieveModels.get(0), sieveModel, OptActionEnums.UPDATE.getId(), "增加产前筛查"); |
| 413 | 428 | } |
| 414 | - }else{ | |
| 429 | + } else { | |
| 415 | 430 | System.out.println("已经有产筛申请单了"); |
| 416 | 431 | } |
| 417 | 432 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |