Commit 8be90d52cfc5a6fcd7d48f2f914830eba61975ee
1 parent
600addd964
Exists in
master
and in
6 other branches
听力诊断模块
Showing 3 changed files with 404 additions and 34 deletions
platform-common/src/main/java/com/lyms/platform/common/enums/AbortionEnums.java
View file @
8be90d5
| 1 | 1 | package com.lyms.platform.common.enums; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.common.utils.StringUtils; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * 流产方式 |
| 5 | 7 | * @Author: litao |
| ... | ... | @@ -16,6 +18,19 @@ |
| 16 | 18 | this.name = name; |
| 17 | 19 | } |
| 18 | 20 | |
| 21 | + | |
| 22 | + public static String getName(String id) { | |
| 23 | + if(StringUtils.isEmpty(id)) { | |
| 24 | + return null; | |
| 25 | + } | |
| 26 | + AbortionEnums[] values = AbortionEnums.values(); | |
| 27 | + for (AbortionEnums value : values) { | |
| 28 | + if (value.getId().equals(id)) { | |
| 29 | + return value.getName(); | |
| 30 | + } | |
| 31 | + } | |
| 32 | + return null; | |
| 33 | + } | |
| 19 | 34 | private String id; |
| 20 | 35 | private String name; |
| 21 | 36 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
8be90d5
| ... | ... | @@ -17,10 +17,7 @@ |
| 17 | 17 | import com.lyms.platform.common.utils.SystemConfig; |
| 18 | 18 | import com.lyms.platform.operate.web.request.*; |
| 19 | 19 | import com.lyms.platform.operate.web.result.*; |
| 20 | -import com.lyms.platform.operate.web.utils.CommonsHelper; | |
| 21 | -import com.lyms.platform.operate.web.utils.InitDataUtils; | |
| 22 | -import com.lyms.platform.operate.web.utils.MongoUtil; | |
| 23 | -import com.lyms.platform.operate.web.utils.ResolveUtils; | |
| 20 | +import com.lyms.platform.operate.web.utils.*; | |
| 24 | 21 | import com.lyms.platform.permission.model.*; |
| 25 | 22 | import com.lyms.platform.permission.service.*; |
| 26 | 23 | import com.lyms.platform.pojo.BabyModel; |
| ... | ... | @@ -90,6 +87,8 @@ |
| 90 | 87 | private MongoUtil mongoUtil; |
| 91 | 88 | @Autowired |
| 92 | 89 | private BasicConfigService basicConfigService; |
| 90 | + @Autowired | |
| 91 | + private AntenatalExaminationFacade examinationFacade; | |
| 93 | 92 | |
| 94 | 93 | //处理儿童person信息 |
| 95 | 94 | private PersonModel handBabyPerson(BabyModel baby) { |
| 96 | 95 | |
| ... | ... | @@ -238,14 +237,14 @@ |
| 238 | 237 | earQuery.setBabyPatientId(babyPatientId); |
| 239 | 238 | List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery); |
| 240 | 239 | |
| 241 | - if(CollectionUtils.isNotEmpty(babyPatientExtendEars)){//修改 | |
| 240 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEars)) {//修改 | |
| 242 | 241 | BabyPatientExtendEar babyPatientExtendEar1 = babyPatientExtendEars.get(0); |
| 243 | 242 | babyPatientExtendEar.setId(babyPatientExtendEar1.getId()); |
| 244 | 243 | babyPatientExtendEar.setLastUpdateDate(new Date()); |
| 245 | 244 | babyPatientExtendEar.setLastUpdateHospitalId(hId); |
| 246 | 245 | babyPatientExtendEar.setLastUpdateUserId(userId + ""); |
| 247 | 246 | babyPatientExtendEarService.updateBabyPatientExtendEar(babyPatientExtendEar); |
| 248 | - }else{ | |
| 247 | + } else { | |
| 249 | 248 | babyPatientExtendEar.setCreateDate(new Date()); |
| 250 | 249 | babyPatientExtendEar.setCreateHospitalId(hId); |
| 251 | 250 | babyPatientExtendEar.setCreateUserId(userId + ""); |
| 252 | 251 | |
| 253 | 252 | |
| 254 | 253 | |
| ... | ... | @@ -270,22 +269,22 @@ |
| 270 | 269 | BabyPatientExtendEarBirthQuery birthQuery = new BabyPatientExtendEarBirthQuery(); |
| 271 | 270 | birthQuery.setBabyPatientId(babyPatientId); |
| 272 | 271 | List<BabyPatientExtendEarBirth> babyPatientExtendEarBirths = babyPatientExtendEarBirthService.queryBabyPatientExtendEarBirth(birthQuery); |
| 273 | - if(CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)){ | |
| 272 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)) { | |
| 274 | 273 | BabyPatientExtendEarBirth babyPatientExtendEarBirth1 = babyPatientExtendEarBirths.get(0); |
| 275 | 274 | babyPatientExtendEarBirth.setId(babyPatientExtendEarBirth1.getId()); |
| 276 | 275 | babyPatientExtendEarBirthService.updateBabyPatientExtendEarBirth(babyPatientExtendEarBirth); |
| 277 | - }else{ | |
| 276 | + } else { | |
| 278 | 277 | babyPatientExtendEarBirth.setId(UUID.randomUUID().toString().replace("-", "")); |
| 279 | 278 | babyPatientExtendEarBirthService.addBabyPatientExtendEarBirth(babyPatientExtendEarBirth); |
| 280 | 279 | } |
| 281 | 280 | BabyPatientExtendEarFamilyQuery familyQuery = new BabyPatientExtendEarFamilyQuery(); |
| 282 | 281 | familyQuery.setBabyPatientId(babyPatientId); |
| 283 | 282 | List<BabyPatientExtendEarFamily> babyPatientExtendEarFamilies = babyPatientExtendEarFamilyService.queryBabyPatientExtendEarFamily(familyQuery); |
| 284 | - if(CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)){ | |
| 283 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)) { | |
| 285 | 284 | BabyPatientExtendEarFamily babyPatientExtendEarFamily1 = babyPatientExtendEarFamilies.get(0); |
| 286 | 285 | babyPatientExtendEarFamily.setId(babyPatientExtendEarFamily1.getId()); |
| 287 | 286 | babyPatientExtendEarFamilyService.updateBabyPatientExtendEarFamily(babyPatientExtendEarFamily); |
| 288 | - }else{ | |
| 287 | + } else { | |
| 289 | 288 | babyPatientExtendEarFamily.setId(UUID.randomUUID().toString().replace("-", "")); |
| 290 | 289 | babyPatientExtendEarFamilyService.addBabyPatientExtendEarFamily(babyPatientExtendEarFamily); |
| 291 | 290 | } |
| 292 | 291 | |
| ... | ... | @@ -293,11 +292,11 @@ |
| 293 | 292 | BabyPatientExtendEarMotherQuery motherQuery = new BabyPatientExtendEarMotherQuery(); |
| 294 | 293 | motherQuery.setBabyPatientId(babyPatientId); |
| 295 | 294 | List<BabyPatientExtendEarMother> babyPatientExtendEarMothers = babyPatientExtendEarMotherService.queryBabyPatientExtendEarMother(motherQuery); |
| 296 | - if(CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)){ | |
| 295 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)) { | |
| 297 | 296 | BabyPatientExtendEarMother babyPatientExtendEarMother1 = babyPatientExtendEarMothers.get(0); |
| 298 | 297 | babyPatientExtendEarMother.setId(babyPatientExtendEarMother1.getId()); |
| 299 | 298 | babyPatientExtendEarMotherService.updateBabyPatientExtendEarMother(babyPatientExtendEarMother); |
| 300 | - }else { | |
| 299 | + } else { | |
| 301 | 300 | babyPatientExtendEarMother.setId(UUID.randomUUID().toString().replace("-", "")); |
| 302 | 301 | babyPatientExtendEarMotherService.addBabyPatientExtendEarMother(babyPatientExtendEarMother); |
| 303 | 302 | } |
| 304 | 303 | |
| ... | ... | @@ -326,15 +325,17 @@ |
| 326 | 325 | babyEarBase.setAdmissNo(babyPatientExtendEar.getAdmissNo()); |
| 327 | 326 | babyEarBase.setBarCode(babyPatientExtendEar.getBarCode()); |
| 328 | 327 | babyEarBase.setCreateUserId(babyPatientExtendEar.getCreateUserId()); |
| 328 | + if(StringUtils.isNotEmpty(babyPatientExtendEar.getmHighRiskFactorId())){ | |
| 329 | + String[] dischargeDiagnosis = babyPatientExtendEar.getmHighRiskFactorId().split(","); | |
| 330 | + List<String> temp = Arrays.asList(dischargeDiagnosis); | |
| 331 | + babyEarBase.setDischargeDiagnosisList(examinationFacade.queryRisk(temp, false).getHighRisk()); | |
| 332 | + } | |
| 329 | 333 | //母亲孕期高危因素 |
| 330 | 334 | if (babyPatientExtendEar.getmHighRiskFactorId() != null) { |
| 331 | 335 | |
| 332 | 336 | String[] highFactors = babyPatientExtendEar.getmHighRiskFactorId().split(","); |
| 333 | 337 | List<String> ids = Arrays.asList(highFactors); |
| 334 | - | |
| 335 | - HighScoreResult highScoreResult = ResolveUtils.queryRisk(ids, true, basicConfigService); | |
| 336 | - List<Map<String, Object>> checkList = ResolveUtils.queryHighRisk(highScoreResult); | |
| 337 | - babyEarBase.setmHighRiskFactorList(checkList); | |
| 338 | + babyEarBase.setmHighRiskFactorList(examinationFacade.queryRisk(ids, false).getHighRisk()); | |
| 338 | 339 | } |
| 339 | 340 | //听力高危因素 |
| 340 | 341 | if (babyPatientExtendEar.getHighRiskCause() != null) { |
| 341 | 342 | |
| ... | ... | @@ -408,8 +409,39 @@ |
| 408 | 409 | BabyPatientExtendEar babyPatientExtendEar = babyPatientExtendEars.get(0); |
| 409 | 410 | babyEarBaseView.setAdmissNo(babyPatientExtendEar.getAdmissNo()); |
| 410 | 411 | babyEarBaseView.setDischargeDiagnosis(babyPatientExtendEar.getDischargeDiagnosis()); |
| 411 | - | |
| 412 | 412 | babyEarBaseView.setBarCode(babyPatientExtendEar.getBarCode()); |
| 413 | + babyEarBaseView.setBarCode(babyPatientExtendEar.getBarCode()); | |
| 414 | + babyEarBaseView.setRemark(babyModel.getMremark()); | |
| 415 | + if (babyModel.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId()) { | |
| 416 | + babyEarBaseView.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getName()); | |
| 417 | + } else if (babyModel.getServiceType() == ServiceTypeEnums.ADD_SERVICE.getId()) { | |
| 418 | + babyEarBaseView.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getName()); | |
| 419 | + } | |
| 420 | + babyEarBaseView.setServiceType(ServiceTypeEnums.getTitleById(babyModel.getServiceType())); | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + /* 诊断指导 */ | |
| 425 | + String diagnosis = ""; | |
| 426 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(babyPatientExtendEar.getDischargeDiagnosis())) { | |
| 427 | + String[] dischargeDiagnosis = babyPatientExtendEar.getmHighRiskFactorId().split(","); | |
| 428 | + List<String> temp = Arrays.asList(dischargeDiagnosis); | |
| 429 | + if (CollectionUtils.isNotEmpty(temp)) { | |
| 430 | + | |
| 431 | + StringBuilder sb = new StringBuilder(); | |
| 432 | + | |
| 433 | + for (String sId : temp) { | |
| 434 | + sb.append(FunvCommonUtil.getBaseicConfigByid(sId, basicConfigService)).append("、"); | |
| 435 | + } | |
| 436 | + if (sb.toString().endsWith("、")) { | |
| 437 | + diagnosis = sb.substring(0, sb.length() - 1); | |
| 438 | + } else { | |
| 439 | + diagnosis = sb.toString(); | |
| 440 | + } | |
| 441 | + } | |
| 442 | + } | |
| 443 | + babyEarBaseView.setDischargeDiagnosis(diagnosis); | |
| 444 | + | |
| 413 | 445 | //听力高危因素 |
| 414 | 446 | if (babyPatientExtendEar.getHighRiskCause() != null) { |
| 415 | 447 | String[] highFactors = babyPatientExtendEar.getHighRiskCause().split(","); |
| 416 | 448 | |
| 417 | 449 | |
| ... | ... | @@ -482,16 +514,37 @@ |
| 482 | 514 | } |
| 483 | 515 | |
| 484 | 516 | /** |
| 485 | - * 儿童出生信息-数据转换 | |
| 517 | + * 儿童家庭信息-数据转换 | |
| 486 | 518 | * |
| 487 | 519 | * @param babyPatientExtendEarFamily 儿童家庭信息 |
| 488 | 520 | * @return |
| 489 | 521 | */ |
| 490 | 522 | public BabyEarFamilyView convertToBabyEarFamilyView(BabyPatientExtendEarFamily babyPatientExtendEarFamily) { |
| 491 | 523 | BabyEarFamilyView babyEarFamilyView = new BabyEarFamilyView(); |
| 524 | + if (StringUtils.isNotEmpty(babyPatientExtendEarFamily.getBadLifeHistory())) { | |
| 525 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarFamily.getBadLifeHistory()); | |
| 526 | + StringBuffer historyStr = new StringBuffer(""); | |
| 527 | + if (historyJson.containsKey("yesOrNo")) { | |
| 528 | + int yesOrNo = historyJson.getIntValue("yesOrNo"); | |
| 529 | + if (yesOrNo == 1) { | |
| 530 | + historyStr.append("有、"); | |
| 531 | + if (historyJson.containsKey("type")) { | |
| 532 | + String type = historyJson.getString("type"); | |
| 533 | + if ("yinJiu".equals(type)) { | |
| 534 | + historyStr.append("饮酒、"); | |
| 535 | + } else if("xiYan".equals(type)){ | |
| 536 | + historyStr.append("吸烟、"); | |
| 537 | + }else if("xiDu".equals(type)){ | |
| 538 | + historyStr.append("吸毒"); | |
| 539 | + } | |
| 540 | + } | |
| 541 | + } else { | |
| 542 | + historyStr.append("无"); | |
| 543 | + } | |
| 544 | + babyEarFamilyView.setBadLifeHistory(historyStr.toString()); | |
| 545 | + } | |
| 546 | + } | |
| 492 | 547 | |
| 493 | - babyEarFamilyView.setBadLifeHistory(babyPatientExtendEarFamily.getBadLifeHistory()); | |
| 494 | - | |
| 495 | 548 | String deafType = "无"; |
| 496 | 549 | if (babyPatientExtendEarFamily.getDeafType() != null) { |
| 497 | 550 | if (babyPatientExtendEarFamily.getDeafType() == 1) { |
| 498 | 551 | |
| 499 | 552 | |
| ... | ... | @@ -501,14 +554,15 @@ |
| 501 | 554 | |
| 502 | 555 | babyEarFamilyView.setDeafType(deafType); |
| 503 | 556 | babyEarFamilyView.setDeatRelationship(babyPatientExtendEarFamily.getDeatRelationship()); |
| 557 | + | |
| 504 | 558 | String proximityType = "无"; |
| 505 | 559 | if (babyPatientExtendEarFamily.getProximityType() != null) { |
| 506 | 560 | if (babyPatientExtendEarFamily.getProximityType() == 1) { |
| 507 | 561 | proximityType = "有"; |
| 508 | 562 | } |
| 509 | 563 | } |
| 510 | - babyEarFamilyView.setProximityType(proximityType); | |
| 511 | 564 | |
| 565 | + babyEarFamilyView.setProximityType(proximityType); | |
| 512 | 566 | babyEarFamilyView.setProximityRelationship(babyPatientExtendEarFamily.getProximityRelationship()); |
| 513 | 567 | return babyEarFamilyView; |
| 514 | 568 | } |
| ... | ... | @@ -522,15 +576,295 @@ |
| 522 | 576 | public BabyEarMotherView convertToBabyEarMotherView(BabyPatientExtendEarMother babyPatientExtendEarMother) { |
| 523 | 577 | BabyEarMotherView babyEarMotherView = new BabyEarMotherView(); |
| 524 | 578 | babyEarMotherView.setGestationAge(babyPatientExtendEarMother.getGestationAge()); |
| 525 | - babyEarMotherView.setAbortionHistoryType(babyPatientExtendEarMother.getAbortionHistoryType()); | |
| 526 | - babyEarMotherView.setViralInfectionHistoryType(babyPatientExtendEarMother.getViralInfectionHistoryType()); | |
| 527 | - babyEarMotherView.setGenitalInfectionHistoryType(babyPatientExtendEarMother.getGenitalInfectionHistoryType()); | |
| 528 | - babyEarMotherView.setRadiationHistoryType(babyPatientExtendEarMother.getRadiationHistoryType()); | |
| 529 | - babyEarMotherView.setDrugAppName(babyPatientExtendEarMother.getDrugAppName()); | |
| 530 | - babyEarMotherView.setHarmfulSubstanceType(babyPatientExtendEarMother.getHarmfulSubstanceType()); | |
| 531 | - babyEarMotherView.setBadLifeHistoryType(babyPatientExtendEarMother.getBadLifeHistoryType()); | |
| 532 | - babyEarMotherView.setMedicalHistoryType(babyPatientExtendEarMother.getMedicalHistoryType()); | |
| 533 | - babyEarMotherView.setBnormalPregnancyHistoryType(babyPatientExtendEarMother.getBnormalPregnancyHistoryType()); | |
| 579 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getViralInfectionHistoryType())) { | |
| 580 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getViralInfectionHistoryType()); | |
| 581 | + StringBuffer historyStr = new StringBuffer(""); | |
| 582 | + if (historyJson.containsKey("fz")) { | |
| 583 | + boolean fz = historyJson.getBooleanValue("fz"); | |
| 584 | + if (fz) { | |
| 585 | + historyStr.append("风疹"); | |
| 586 | + if (historyJson.containsKey("fzSelected")) { | |
| 587 | + int fzSelected = historyJson.getIntValue("fzSelected"); | |
| 588 | + historyStr.append("(孕" + fzSelected + "周)、"); | |
| 589 | + } | |
| 590 | + } | |
| 591 | + } | |
| 592 | + if (historyJson.containsKey("gxc")) { | |
| 593 | + boolean gxc = historyJson.getBooleanValue("gxc"); | |
| 594 | + if (gxc) { | |
| 595 | + historyStr.append("弓形虫"); | |
| 596 | + if (historyJson.containsKey("gxcSelected")) { | |
| 597 | + int gxcSelected = historyJson.getIntValue("gxcSelected"); | |
| 598 | + historyStr.append("(孕" + gxcSelected + "周)、"); | |
| 599 | + } | |
| 600 | + } | |
| 601 | + } | |
| 602 | + | |
| 603 | + if (historyJson.containsKey("jxbbd")) { | |
| 604 | + boolean jxbbd = historyJson.getBooleanValue("jxbbd"); | |
| 605 | + if (jxbbd) { | |
| 606 | + historyStr.append("巨细胞病毒"); | |
| 607 | + if (historyJson.containsKey("jxbbdSelected")) { | |
| 608 | + int jxbbdSelected = historyJson.getIntValue("jxbbdSelected"); | |
| 609 | + historyStr.append("(孕" + jxbbdSelected + "周)、"); | |
| 610 | + } | |
| 611 | + } | |
| 612 | + } | |
| 613 | + if (historyJson.containsKey("pz")) { | |
| 614 | + boolean pz = historyJson.getBooleanValue("pz"); | |
| 615 | + if (pz) { | |
| 616 | + historyStr.append("疱疹"); | |
| 617 | + if (historyJson.containsKey("pzSelected")) { | |
| 618 | + int pzSelected = historyJson.getIntValue("pzSelected"); | |
| 619 | + historyStr.append("(孕" + pzSelected + "周)、"); | |
| 620 | + } | |
| 621 | + } | |
| 622 | + } | |
| 623 | + if (historyJson.containsKey("qt")) { | |
| 624 | + boolean qt = historyJson.getBooleanValue("qt"); | |
| 625 | + if (qt) { | |
| 626 | + historyStr.append("其他"); | |
| 627 | + if (historyJson.containsKey("qtSelected")) { | |
| 628 | + String qtSelected = historyJson.getString("qtSelected"); | |
| 629 | + historyStr.append("(" + qtSelected + ")、"); | |
| 630 | + } | |
| 631 | + } | |
| 632 | + } | |
| 633 | + babyEarMotherView.setViralInfectionHistoryType(historyStr.toString()); | |
| 634 | + } | |
| 635 | + | |
| 636 | + | |
| 637 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getGenitalInfectionHistoryType())) { | |
| 638 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getGenitalInfectionHistoryType()); | |
| 639 | + StringBuffer historyStr = new StringBuffer(""); | |
| 640 | + if (historyJson.containsKey("lb")) { | |
| 641 | + boolean lb = historyJson.getBooleanValue("lb"); | |
| 642 | + if (lb) { | |
| 643 | + historyStr.append("淋病"); | |
| 644 | + if (historyJson.containsKey("lbSelected")) { | |
| 645 | + int lbSelected = historyJson.getIntValue("lbSelected"); | |
| 646 | + historyStr.append("(孕" + lbSelected + "周)、"); | |
| 647 | + } | |
| 648 | + } | |
| 649 | + } | |
| 650 | + if (historyJson.containsKey("gxc")) { | |
| 651 | + boolean gxc = historyJson.getBooleanValue("gxc"); | |
| 652 | + if (gxc) { | |
| 653 | + historyStr.append("弓形虫"); | |
| 654 | + if (historyJson.containsKey("gxcSelected")) { | |
| 655 | + int gxcSelected = historyJson.getIntValue("gxcSelected"); | |
| 656 | + historyStr.append("(孕" + gxcSelected + "周)、"); | |
| 657 | + } | |
| 658 | + } | |
| 659 | + } | |
| 660 | + | |
| 661 | + if (historyJson.containsKey("md")) { | |
| 662 | + boolean md = historyJson.getBooleanValue("md"); | |
| 663 | + if (md) { | |
| 664 | + historyStr.append("梅毒"); | |
| 665 | + if (historyJson.containsKey("mdSelected")) { | |
| 666 | + int mdSelected = historyJson.getIntValue("mdSelected"); | |
| 667 | + historyStr.append("(孕" + mdSelected + "周)、"); | |
| 668 | + } | |
| 669 | + } | |
| 670 | + } | |
| 671 | + if (historyJson.containsKey("jrsz")) { | |
| 672 | + boolean jrsz = historyJson.getBooleanValue("jrsz"); | |
| 673 | + if (jrsz) { | |
| 674 | + historyStr.append("尖锐湿疹"); | |
| 675 | + if (historyJson.containsKey("jrszSelected")) { | |
| 676 | + int jrszSelected = historyJson.getIntValue("jrszSelected"); | |
| 677 | + historyStr.append("(孕" + jrszSelected + "周)、"); | |
| 678 | + } | |
| 679 | + } | |
| 680 | + } | |
| 681 | + | |
| 682 | + if (historyJson.containsKey("qt")) { | |
| 683 | + boolean qt = historyJson.getBooleanValue("qt"); | |
| 684 | + if (qt) { | |
| 685 | + historyStr.append("其他"); | |
| 686 | + if (historyJson.containsKey("qtSelected")) { | |
| 687 | + String qtSelected = historyJson.getString("qtSelected"); | |
| 688 | + historyStr.append("(" + qtSelected + ")、"); | |
| 689 | + } | |
| 690 | + } | |
| 691 | + } | |
| 692 | + babyEarMotherView.setGenitalInfectionHistoryType(historyStr.toString()); | |
| 693 | + } | |
| 694 | + | |
| 695 | + | |
| 696 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getRadiationHistoryType())) { | |
| 697 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getRadiationHistoryType()); | |
| 698 | + StringBuffer historyStr = new StringBuffer(""); | |
| 699 | + if (historyJson.containsKey("yesOrNo")) { | |
| 700 | + int yesOrNo = historyJson.getIntValue("yesOrNo"); | |
| 701 | + if (yesOrNo == 1) { | |
| 702 | + historyStr.append("有、"); | |
| 703 | + if (historyJson.containsKey("other")) { | |
| 704 | + int other = historyJson.getIntValue("other"); | |
| 705 | + historyStr.append("(孕" + other + "周)、"); | |
| 706 | + } | |
| 707 | + } else { | |
| 708 | + historyStr.append("无"); | |
| 709 | + } | |
| 710 | + } | |
| 711 | + babyEarMotherView.setRadiationHistoryType(historyStr.toString()); | |
| 712 | + } | |
| 713 | + | |
| 714 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getDrugAppName())) { | |
| 715 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getDrugAppName()); | |
| 716 | + if (historyJson.containsKey("yesOrNo")) { | |
| 717 | + int yesOrNo = historyJson.getIntValue("yesOrNo"); | |
| 718 | + if (1 == yesOrNo) { | |
| 719 | + historyJson.put("yesOrNo", "有"); | |
| 720 | + } else { | |
| 721 | + historyJson.put("yesOrNo", "无"); | |
| 722 | + } | |
| 723 | + } | |
| 724 | + babyEarMotherView.setDrugAppName(historyJson.toJSONString()); | |
| 725 | + } | |
| 726 | + | |
| 727 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getAbortionHistoryType())) { | |
| 728 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getAbortionHistoryType()); | |
| 729 | + if (historyJson.containsKey("yesOrNo")) { | |
| 730 | + int yesOrNo = historyJson.getIntValue("yesOrNo"); | |
| 731 | + if (1 == yesOrNo) { | |
| 732 | + historyJson.put("yesOrNo", "有"); | |
| 733 | + } else { | |
| 734 | + historyJson.put("yesOrNo", "无"); | |
| 735 | + } | |
| 736 | + } | |
| 737 | + | |
| 738 | + if (historyJson.containsKey("abortionType")) { | |
| 739 | + String abortionType = historyJson.getString("abortionType"); | |
| 740 | + historyJson.put("abortionType",AbortionEnums.getName(abortionType)); | |
| 741 | + } | |
| 742 | + babyEarMotherView.setAbortionHistoryType(historyJson.toJSONString()); | |
| 743 | + } | |
| 744 | + | |
| 745 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getHarmfulSubstanceType())) { | |
| 746 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getHarmfulSubstanceType()); | |
| 747 | + if (historyJson.containsKey("yesOrNo")) { | |
| 748 | + int yesOrNo = historyJson.getIntValue("yesOrNo"); | |
| 749 | + if (1 == yesOrNo) { | |
| 750 | + historyJson.put("yesOrNo", "有"); | |
| 751 | + } else { | |
| 752 | + historyJson.put("yesOrNo", "无"); | |
| 753 | + } | |
| 754 | + } | |
| 755 | + babyEarMotherView.setHarmfulSubstanceType(historyJson.toJSONString()); | |
| 756 | + } | |
| 757 | + | |
| 758 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getBadLifeHistoryType())) { | |
| 759 | + StringBuffer historyStr = new StringBuffer(""); | |
| 760 | + | |
| 761 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getBadLifeHistoryType()); | |
| 762 | + if (historyJson.containsKey("yesOrNo")) { | |
| 763 | + int yesOrNo = historyJson.getIntValue("yesOrNo"); | |
| 764 | + if (1 == yesOrNo) { | |
| 765 | + historyStr.append("有、"); | |
| 766 | + } else { | |
| 767 | + historyStr.append("无"); | |
| 768 | + } | |
| 769 | + } | |
| 770 | + if (historyJson.containsKey("type")) { | |
| 771 | + String type = historyJson.getString("type"); | |
| 772 | + if ("yinJiu".equals(type)) { | |
| 773 | + historyStr.append("饮酒、"); | |
| 774 | + } else if("xiYan".equals(type)){ | |
| 775 | + historyStr.append("吸烟、"); | |
| 776 | + }else if("xiDu".equals(type)){ | |
| 777 | + historyStr.append("吸毒"); | |
| 778 | + } | |
| 779 | + } | |
| 780 | + babyEarMotherView.setBadLifeHistoryType(historyStr.toString()); | |
| 781 | + } | |
| 782 | + | |
| 783 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getMedicalHistoryType())) { | |
| 784 | + StringBuffer historyStr = new StringBuffer(""); | |
| 785 | + | |
| 786 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getMedicalHistoryType()); | |
| 787 | + if (historyJson.containsKey("yesOrNo")) { | |
| 788 | + int yesOrNo = historyJson.getIntValue("yesOrNo"); | |
| 789 | + if (1 == yesOrNo) { | |
| 790 | + historyStr.append("有、"); | |
| 791 | + } else { | |
| 792 | + historyStr.append("无"); | |
| 793 | + } | |
| 794 | + } | |
| 795 | + | |
| 796 | + if (historyJson.containsKey("sy")) { | |
| 797 | + boolean sy = historyJson.getBooleanValue("sy"); | |
| 798 | + if (sy) { | |
| 799 | + historyStr.append("肾炎"); | |
| 800 | + } | |
| 801 | + } | |
| 802 | + if (historyJson.containsKey("jzxgnjt")) { | |
| 803 | + boolean jzxgnjt = historyJson.getBooleanValue("jzxgnjt"); | |
| 804 | + if (jzxgnjt) { | |
| 805 | + historyStr.append("甲状腺功能减退、"); | |
| 806 | + } | |
| 807 | + } | |
| 808 | + if (historyJson.containsKey("bxz")) { | |
| 809 | + boolean bxz = historyJson.getBooleanValue("bxz"); | |
| 810 | + if (bxz) { | |
| 811 | + historyStr.append("败血症、"); | |
| 812 | + } | |
| 813 | + } | |
| 814 | + if (historyJson.containsKey("qt")) { | |
| 815 | + boolean qt = historyJson.getBooleanValue("qt"); | |
| 816 | + if (qt) { | |
| 817 | + historyStr.append("其他:"); | |
| 818 | + } | |
| 819 | + } | |
| 820 | + if (historyJson.containsKey("qtText")) { | |
| 821 | + historyStr.append(historyJson.getString("qtText")); | |
| 822 | + } | |
| 823 | + babyEarMotherView.setMedicalHistoryType(historyStr.toString()); | |
| 824 | + } | |
| 825 | + | |
| 826 | + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getBnormalPregnancyHistoryType())) { | |
| 827 | + StringBuffer historyStr = new StringBuffer(""); | |
| 828 | + | |
| 829 | + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getBnormalPregnancyHistoryType()); | |
| 830 | + if (historyJson.containsKey("yesOrNo")) { | |
| 831 | + int yesOrNo = historyJson.getIntValue("yesOrNo"); | |
| 832 | + if (1 == yesOrNo) { | |
| 833 | + historyStr.append("有"); | |
| 834 | + } else { | |
| 835 | + historyStr.append("无"); | |
| 836 | + } | |
| 837 | + } | |
| 838 | + | |
| 839 | + if (historyJson.containsKey("rgz")) { | |
| 840 | + boolean rgz = historyJson.getBooleanValue("rgz"); | |
| 841 | + if (rgz) { | |
| 842 | + historyStr.append("妊高症"); | |
| 843 | + } | |
| 844 | + } | |
| 845 | + if (historyJson.containsKey("myxxbh")) { | |
| 846 | + boolean myxxbh = historyJson.getBooleanValue("myxxbh"); | |
| 847 | + if (myxxbh) { | |
| 848 | + historyStr.append("母音血型不和"); | |
| 849 | + } | |
| 850 | + } | |
| 851 | + if (historyJson.containsKey("tegnfych")) { | |
| 852 | + boolean tegnfych = historyJson.getBooleanValue("tegnfych"); | |
| 853 | + if (tegnfych) { | |
| 854 | + historyStr.append("胎儿宫内发育迟缓"); | |
| 855 | + } | |
| 856 | + } | |
| 857 | + if (historyJson.containsKey("qt")) { | |
| 858 | + boolean qt = historyJson.getBooleanValue("qt"); | |
| 859 | + if (qt) { | |
| 860 | + historyStr.append("其他:"); | |
| 861 | + } | |
| 862 | + } | |
| 863 | + if (historyJson.containsKey("qtText")) { | |
| 864 | + historyStr.append(historyJson.getString("qtText")); | |
| 865 | + } | |
| 866 | + babyEarMotherView.setBnormalPregnancyHistoryType(historyStr.toString()); | |
| 867 | + } | |
| 534 | 868 | return babyEarMotherView; |
| 535 | 869 | } |
| 536 | 870 | |
| ... | ... | @@ -547,7 +881,10 @@ |
| 547 | 881 | babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight()); |
| 548 | 882 | babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber() + ""); |
| 549 | 883 | babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight()); |
| 550 | - babyEarBirthView.setParturitionType(babyPatientExtendEarBirth.getParturitionType() + ""); | |
| 884 | + if(babyPatientExtendEarBirth.getParturitionType()!=null){ | |
| 885 | + String parturitionType = CZFmTypeEnums.getTitle(babyPatientExtendEarBirth.getParturitionType()); | |
| 886 | + babyEarBirthView.setParturitionType(parturitionType); | |
| 887 | + } | |
| 551 | 888 | babyEarBirthView.setTireNumber(babyPatientExtendEarBirth.getTireNumber()); |
| 552 | 889 | babyEarBirthView.setBirthDefectDesc(babyPatientExtendEarBirth.getBirthDefectDesc()); |
| 553 | 890 | babyEarBirthView.setBirthInjuryPosition(babyPatientExtendEarBirth.getBirthInjuryPosition()); |
| ... | ... | @@ -678,6 +1015,11 @@ |
| 678 | 1015 | if (babyEarBase.getNation() != null) { |
| 679 | 1016 | babyEarBaseView.setNation(mongoUtil.findName(babyEarBase.getNation())); |
| 680 | 1017 | } |
| 1018 | + String docotorId = babyEarBase.getCreateUserId(); | |
| 1019 | + Users users = usersService.getUsers(Integer.parseInt(docotorId == null ? "0" : docotorId)); | |
| 1020 | + if (users != null) { | |
| 1021 | + babyEarBaseView.setCreateUser(users.getName() == null ? "-" : users.getName()); | |
| 1022 | + } | |
| 681 | 1023 | |
| 682 | 1024 | babyEarBaseView.setBirth(babyEarBase.getBirth()); |
| 683 | 1025 | babyEarBaseView.setResidence(CommonsHelper.getResidence(babyEarBase.getProvinceId(), babyEarBase.getCityId(), |
| ... | ... | @@ -699,7 +1041,6 @@ |
| 699 | 1041 | babyEarBaseView.setfLevel(getBasicConfig(babyEarBase.getfLevelId())); |
| 700 | 1042 | babyEarBaseView.setFproType(getBasicConfig(babyEarBase.getFproTypeId())); |
| 701 | 1043 | babyEarBaseView.setFphone(babyEarBase.getFphone()); |
| 702 | - babyEarBaseView.setCreateUser(babyEarBase.getCreateUserId()); | |
| 703 | 1044 | babyEarBaseView.setCreateTime(babyEarBase.getCreateTime()); |
| 704 | 1045 | babyEarBaseView.setVcCardNo(babyEarBase.getVcCardNo()); |
| 705 | 1046 | babyEarBaseView.setServiceType(ServiceStatusEnums.getNameById(babyEarBase.getServiceType())); |
| ... | ... | @@ -802,7 +1143,7 @@ |
| 802 | 1143 | } |
| 803 | 1144 | data.put("screenDate", DateUtil.getYyyyMmDd(babyPatientExtendEarScreen.getScreenDate())); |
| 804 | 1145 | data.put("nextCheckTime", DateUtil.getYyyyMmDd(babyPatientExtendEarScreen.getNextCheckTime())); |
| 805 | - data.put("highRiskCause", babyPatientExtendEarScreen.getHighRiskCause()); | |
| 1146 | + // data.put("highRiskCause", babyPatientExtendEarScreen.getHighRiskCause()); | |
| 806 | 1147 | if (StringUtils.isNotEmpty(babyPatientExtendEarScreen.getHighRiskCause()))//听力高危因素文字 HighRiskEnum |
| 807 | 1148 | { |
| 808 | 1149 | StringBuffer hfBuff = new StringBuffer(); |
| ... | ... | @@ -1018,7 +1359,9 @@ |
| 1018 | 1359 | screenResult.setSrcResult(srcResult); |
| 1019 | 1360 | screenResult.setBabyId(earScreen.getBabyId()); |
| 1020 | 1361 | screenResult.setSrcType(earScreen.getScreenType() == 1 ? "初筛" : "复筛"); |
| 1021 | - screenResult.setSrcDoctor(usersService.getUsers(Integer.valueOf(earScreen.getCheckDoctorId())).getName()); | |
| 1362 | + if(StringUtils.isNotEmpty(earScreen.getCheckDoctorId())){ | |
| 1363 | + screenResult.setSrcDoctor(usersService.getUsers(Integer.valueOf(earScreen.getCheckDoctorId())).getName()); | |
| 1364 | + } | |
| 1022 | 1365 | screenResult.setSrcTime(DateUtil.getyyyy_MM_dd(earScreen.getScreenDate())); |
| 1023 | 1366 | earScreenResults.add(screenResult); |
| 1024 | 1367 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java
View file @
8be90d5
| ... | ... | @@ -97,6 +97,8 @@ |
| 97 | 97 | //新生儿出院诊断 |
| 98 | 98 | private String dischargeDiagnosis; |
| 99 | 99 | //听力高危因素 |
| 100 | + private List dischargeDiagnosisList; | |
| 101 | + //听力高危因素 | |
| 100 | 102 | private String highRiskCause; |
| 101 | 103 | //听力高危因素 |
| 102 | 104 | private List highRiskCauseList; |
| ... | ... | @@ -149,6 +151,7 @@ |
| 149 | 151 | setmLevelId(babyModel.getmLevelId()); |
| 150 | 152 | setmAge(DateUtil.getAge(babyModel.getMbirth(),babyModel.getBuildDate())+""); |
| 151 | 153 | setfAge(DateUtil.getAge(babyModel.getFbirth(),babyModel.getBuildDate())+""); |
| 154 | + setCreateTime(DateUtil.getyyyy_MM_dd(babyModel.getBuildDate())); | |
| 152 | 155 | setPostCode(""); |
| 153 | 156 | setSex(babyModel.getSex()); |
| 154 | 157 | setFname(babyModel.getFname()); |
| ... | ... | @@ -157,6 +160,7 @@ |
| 157 | 160 | setfLevelId(babyModel.getfLevelId()); |
| 158 | 161 | setFproTypeId(babyModel.getFproTypeId()); |
| 159 | 162 | setHighRiskCause(babyModel.getHighRiskReason()); |
| 163 | + setCreateUserId(babyModel.getBuildDoctor()); | |
| 160 | 164 | } |
| 161 | 165 | |
| 162 | 166 | @Override |
| ... | ... | @@ -222,6 +226,14 @@ |
| 222 | 226 | |
| 223 | 227 | public String getFcertTypeId() { |
| 224 | 228 | return fcertTypeId; |
| 229 | + } | |
| 230 | + | |
| 231 | + public List getDischargeDiagnosisList() { | |
| 232 | + return dischargeDiagnosisList; | |
| 233 | + } | |
| 234 | + | |
| 235 | + public void setDischargeDiagnosisList(List dischargeDiagnosisList) { | |
| 236 | + this.dischargeDiagnosisList = dischargeDiagnosisList; | |
| 225 | 237 | } |
| 226 | 238 | |
| 227 | 239 | public void setFcertTypeId(String fcertTypeId) { |