Commit a0cb7e9fbeeca213a1cfed4ef94145433ac84353
1 parent
e86cb35494
Exists in
master
and in
6 other branches
转诊单数据又两条数据更改为一条数据
Showing 2 changed files with 14 additions and 46 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
a0cb7e9
| ... | ... | @@ -416,8 +416,8 @@ |
| 416 | 416 | model1.setStatus(2); |
| 417 | 417 | model1.setModified(new Date()); |
| 418 | 418 | } |
| 419 | - | |
| 420 | - model1.setScore(NumberUtils.toInt(antenatalExamination.getRiskScore())); | |
| 419 | + //高危评分 | |
| 420 | + model1.setScore(patients.getRiskScore()); | |
| 421 | 421 | //其他诊断 |
| 422 | 422 | model1.setOtherDiagn(antenatalExamination.getDiagnosisOther()); |
| 423 | 423 | model1.setDiagnosis(antenatalExamination.getDiagnosis()); |
| 424 | 424 | |
| 425 | 425 | |
| ... | ... | @@ -493,18 +493,15 @@ |
| 493 | 493 | commonThreadPool.execute(new Runnable() { |
| 494 | 494 | @Override |
| 495 | 495 | public void run() { |
| 496 | - | |
| 497 | 496 | Patients patients = patientsService.findOnePatientById(excAddRequest.getParentId()); |
| 498 | 497 | patients.setLastCheckEmployeeId(excAddRequest.getProdDoctor()); |
| 499 | 498 | |
| 500 | 499 | if (StringUtils.isNotEmpty(patients.getEnable()) && "0".equals(patients.getEnable())) { |
| 501 | 500 | patients.setEnable("1"); |
| 502 | 501 | } |
| 503 | - | |
| 504 | 502 | patientsService.updateNextCheckTime(excAddRequest.getNextCheckTime(), patients.getId()); |
| 505 | 503 | patientsService.updatePatient(patients); |
| 506 | 504 | |
| 507 | - | |
| 508 | 505 | //修改本系统最后的高危 |
| 509 | 506 | updateLastRisk(patients.getId()); |
| 510 | 507 | //修改本院最后一次定义高危 |
| 511 | 508 | |
| 512 | 509 | |
| 513 | 510 | |
| 514 | 511 | |
| 515 | 512 | |
| ... | ... | @@ -513,27 +510,20 @@ |
| 513 | 510 | setLashCTimes(excAddRequest.getParentId()); |
| 514 | 511 | //冗余到产检表 |
| 515 | 512 | antenatalExaminationService.updateAntExRecord(excAddRequest.getId(), 1); |
| 516 | - | |
| 517 | 513 | //修改数据 |
| 518 | 514 | syncMaster(excAddRequest.getParentId(), excAddRequest.getNextCheckTime()); |
| 519 | 515 | } |
| 520 | 516 | }); |
| 521 | - | |
| 522 | - | |
| 523 | 517 | AntExChuQuery antExChuQuery = new AntExChuQuery(); |
| 524 | 518 | antExChuQuery.setYn(YnEnums.YES.getId()); |
| 525 | 519 | antExChuQuery.setId(antExChuModel.getId()); |
| 526 | 520 | List<AntExChuModel> list = antenatalExaminationService.queryAntExChu(antExChuQuery); |
| 527 | - | |
| 528 | 521 | operateLogFacade.addModifyOptLog(userId, Integer.parseInt(hospitalId), list.get(0), antExChuModel, OptActionEnums.UPDATE.getId(), "修改初诊"); |
| 529 | - | |
| 530 | 522 | } else { |
| 531 | 523 | AntExChuQuery antExChuQuery1 = new AntExChuQuery(); |
| 532 | 524 | antExChuQuery1.setParentId(excAddRequest.getParentId()); |
| 533 | 525 | antExChuQuery1.setYn(YnEnums.YES.getId()); |
| 534 | - stopWatch.start("queryAntExChu"); | |
| 535 | 526 | List<AntExChuModel> data1 = antenatalExaminationService.queryAntExChu(antExChuQuery1); |
| 536 | - stopWatch.stop(); | |
| 537 | 527 | |
| 538 | 528 | if (CollectionUtils.isEmpty(data1)) { |
| 539 | 529 | final Patients patients = patientsService.findOnePatientById(excAddRequest.getParentId()); |
| 540 | 530 | |
| 541 | 531 | |
| 542 | 532 | |
| 543 | 533 | |
| 544 | 534 | |
| 545 | 535 | |
| 546 | 536 | |
| 547 | 537 | |
| 548 | 538 | |
| ... | ... | @@ -569,31 +559,28 @@ |
| 569 | 559 | commonThreadPool.execute(new Runnable() { |
| 570 | 560 | @Override |
| 571 | 561 | public void run() { |
| 572 | - // stopWatch.stop(); | |
| 562 | + //查询最后一次产检筛查结果冗余到patient表 | |
| 563 | + Map<String, Object> map = getPatLastScreenResult(patients.getId()); | |
| 564 | + if (map != null && map.containsKey("screenResult")) { | |
| 565 | + patients.setScreenResult((List<String>) map.get("screenResult")); | |
| 566 | + } | |
| 567 | + patients.setLastCheckEmployeeId(excAddRequest.getProdDoctor()); | |
| 568 | + patientsService.updatePatient(patients); | |
| 569 | + | |
| 573 | 570 | /** 把优惠券设置为已使用状态 */ |
| 574 | - //stopWatch.start("couponService.use"); | |
| 575 | 571 | couponService.use(hospitalId, excAddRequest.getCouponCode(), userId, chuId); |
| 576 | - //stopWatch.stop(); | |
| 577 | 572 | //修改患者风险等级 |
| 578 | - | |
| 579 | - patients.setLastCheckEmployeeId(excAddRequest.getProdDoctor()); | |
| 580 | 573 | patientsService.updateNextCheckTime(excAddRequest.getNextCheckTime(), patients.getId()); |
| 581 | - patientsService.updatePatient(patients); | |
| 582 | 574 | |
| 583 | 575 | updateLastRisk(patients.getId()); |
| 584 | - | |
| 585 | 576 | //修改本院最后一次定义高危 |
| 586 | 577 | updateLastRhTime(patients.getId(), hospitalId); |
| 587 | 578 | setLashCTimes(chuParentId); |
| 588 | - //stopWatch.start("updateAntExRecord"); | |
| 589 | 579 | antenatalExaminationService.updateAntExRecord(chuId, 1); |
| 590 | - //stopWatch.stop(); | |
| 591 | 580 | syncMaster(excAddRequest.getParentId(), excAddRequest.getNextCheckTime()); |
| 592 | 581 | } |
| 593 | 582 | }); |
| 594 | - | |
| 595 | 583 | operateLogFacade.addAddOptLog(userId, Integer.parseInt(hospitalId), antExChuModel, OptActionEnums.ADD.getId(), "添加初诊"); |
| 596 | - | |
| 597 | 584 | if (null != patients.getBuildType() && patients.getBuildType() == 3) { |
| 598 | 585 | Patients patients1 = new Patients(); |
| 599 | 586 | patients1.setEnable("1"); |
| ... | ... | @@ -630,8 +617,6 @@ |
| 630 | 617 | } catch (Exception e) { |
| 631 | 618 | e.printStackTrace(); |
| 632 | 619 | } |
| 633 | - | |
| 634 | - | |
| 635 | 620 | //设置接收时间 |
| 636 | 621 | model.setReceived(antExChuModel.getCheckTime()); |
| 637 | 622 | model.setRecDoctor(antExChuModel.getProdDoctor()); |
| ... | ... | @@ -640,7 +625,6 @@ |
| 640 | 625 | model.setDiagnosis(antExChuModel.getDiagnosis()); |
| 641 | 626 | model.setOtherDiagn(antExChuModel.getDiagnosisOther()); |
| 642 | 627 | applyOrderService.updateByParentId(referralApplyOrderQuery1, model); |
| 643 | - | |
| 644 | 628 | ReferralApplyOrderQuery referralApplyOrderQuery2 = new ReferralApplyOrderQuery(); |
| 645 | 629 | referralApplyOrderQuery2.setOutHospitalId(hospitalId); |
| 646 | 630 | referralApplyOrderQuery2.setTransferredHospital(outHospitalId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
a0cb7e9
| ... | ... | @@ -135,10 +135,6 @@ |
| 135 | 135 | referralApplyOrderModel.setTransferredHospital(organization.get(0).getId() + ""); |
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | - | |
| 139 | - | |
| 140 | - /* List<ReferralApplyOrderModel> list = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery); | |
| 141 | - if (CollectionUtils.isEmpty(list)) {*/ | |
| 142 | 138 | String id = ""; |
| 143 | 139 | if (2 == type) { |
| 144 | 140 | //查询产妇信息 |
| ... | ... | @@ -159,9 +155,6 @@ |
| 159 | 155 | referralApplyOrderModel.setBirth(patients.getBirth()); |
| 160 | 156 | referralApplyOrderModel.setExpVip(patients.getExpVip()); |
| 161 | 157 | int days = -1; |
| 162 | - if (patients.getType() == 1) { | |
| 163 | - days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); | |
| 164 | - } | |
| 165 | 158 | referralApplyOrderModel.setLastMenses(patients.getLastMenses()); |
| 166 | 159 | referralApplyOrderModel.setrRisk(Arrays.asList(commonService.resloveFactor(patients.getRiskFactorId()).split(","))); |
| 167 | 160 | referralApplyOrderModel.setOtherHighRisk(patients.getoRiskFactor()); |
| ... | ... | @@ -172,15 +165,6 @@ |
| 172 | 165 | } |
| 173 | 166 | referralApplyOrderModel.setrLevel(rlevel); |
| 174 | 167 | referralApplyOrderModel.setScore(patients.getRiskScore()); |
| 175 | - /* List lsit = new ArrayList(); | |
| 176 | - List<Map> list = highScoreResult.filter(highScoreResult.getLevel()); | |
| 177 | - for (Map<String, String> map : list) { | |
| 178 | - String name = map.get("name"); | |
| 179 | - if (!lsit.contains(name)) { | |
| 180 | - lsit.add(name); | |
| 181 | - } | |
| 182 | - } | |
| 183 | - referralApplyOrderModel.setrLevel(lsit);*/ | |
| 184 | 168 | referralApplyOrderModel.setPid(patients.getPid()); |
| 185 | 169 | referralApplyOrderModel.setDueWeek(new Date()); |
| 186 | 170 | days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); |
| ... | ... | @@ -200,7 +184,7 @@ |
| 200 | 184 | patientsQuery1.setHospitalId(referralApplyOrderModel.getTransferredHospital()); |
| 201 | 185 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery1); |
| 202 | 186 | |
| 203 | - List<Organization> organization = null; | |
| 187 | + List<Organization> organization; | |
| 204 | 188 | try { |
| 205 | 189 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
| 206 | 190 | organizationQuery.setId(Integer.valueOf(referralApplyOrderModel.getTransferredHospital())); |
| ... | ... | @@ -226,7 +210,7 @@ |
| 226 | 210 | patientsService.updatePatient(patients1); |
| 227 | 211 | } |
| 228 | 212 | } catch (Exception e) { |
| 229 | - | |
| 213 | + e.printStackTrace(); | |
| 230 | 214 | } |
| 231 | 215 | } |
| 232 | 216 | } |
| ... | ... | @@ -275,7 +259,7 @@ |
| 275 | 259 | babyModelQuery.setYn(YnEnums.YES.getId()); |
| 276 | 260 | List<BabyModel> babyModels = babyService.queryBabyWithQuery(babyModelQuery); |
| 277 | 261 | |
| 278 | - List<Organization> organization = null; | |
| 262 | + List<Organization> organization; | |
| 279 | 263 | try { |
| 280 | 264 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
| 281 | 265 | organizationQuery.setId(Integer.valueOf(referralApplyOrderModel.getTransferredHospital())); |
| ... | ... | @@ -303,7 +287,7 @@ |
| 303 | 287 | babyService.updateOneBaby(babyModel1, babyModel1.getId()); |
| 304 | 288 | } |
| 305 | 289 | } catch (Exception e) { |
| 306 | - | |
| 290 | + e.printStackTrace(); | |
| 307 | 291 | } |
| 308 | 292 | } |
| 309 | 293 | } |