Commit 218282c5dad0017e464ec6131b3685004fd308b5
1 parent
f872fb9a31
Exists in
master
and in
6 other branches
听力诊断模块
Showing 3 changed files with 53 additions and 28 deletions
platform-common/src/main/java/com/lyms/platform/common/enums/HearingDiagnosisEnums.java
View file @
218282c
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
218282c
| ... | ... | @@ -150,7 +150,7 @@ |
| 150 | 150 | behd.setConfirmTimeStr(DateUtil.getyyyy_MM_dd(behd.getConfirmTime())); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - if (StringUtils.isNotEmpty(behd.getHighFactor()))//听力高危因素文字 HighRiskEnum | |
| 153 | + if (StringUtils.isNotEmpty(behd.getHighFactor()))//听力高危因素文字 HighRiskEnum | |
| 154 | 154 | { |
| 155 | 155 | StringBuffer hfBuff = new StringBuffer(); |
| 156 | 156 | List highArr = new ArrayList(); |
| ... | ... | @@ -161,8 +161,8 @@ |
| 161 | 161 | String name = HighRiskEnum.getTitle(Integer.parseInt(hf)); |
| 162 | 162 | hfBuff.append(name + "、"); |
| 163 | 163 | JSONObject confiJo = new JSONObject(); |
| 164 | - confiJo.put("id",hf); | |
| 165 | - confiJo.put("name",name); | |
| 164 | + confiJo.put("id", hf); | |
| 165 | + confiJo.put("name", name); | |
| 166 | 166 | highArr.add(confiJo); |
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | |
| ... | ... | @@ -192,15 +192,15 @@ |
| 192 | 192 | if (StringUtils.isNotEmpty(hf)) { |
| 193 | 193 | String name = ConfirmedEnums.getTitle(Integer.parseInt(hf)); |
| 194 | 194 | JSONObject confiJo = new JSONObject(); |
| 195 | - confiJo.put("id",hf); | |
| 196 | - confiJo.put("name",name); | |
| 195 | + confiJo.put("id", hf); | |
| 196 | + confiJo.put("name", name); | |
| 197 | 197 | confiArr.add(confiJo); |
| 198 | 198 | hfBuff.append(name + "、"); |
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | behd.setConfirmResults(confiArr); |
| 202 | 202 | behd.setConfirmResultStr(hfBuff.toString()); |
| 203 | - }else{ | |
| 203 | + } else { | |
| 204 | 204 | behd.setConfirmResults(new ArrayList()); |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | |
| 208 | 208 | |
| ... | ... | @@ -213,19 +213,19 @@ |
| 213 | 213 | if (StringUtils.isNotEmpty(hf)) { |
| 214 | 214 | String name = HearingDiagnosisEnums.getTitle(Integer.parseInt(hf)); |
| 215 | 215 | JSONObject confiJo = new JSONObject(); |
| 216 | - confiJo.put("id",hf); | |
| 217 | - confiJo.put("name",name); | |
| 216 | + confiJo.put("id", hf); | |
| 217 | + confiJo.put("name", name); | |
| 218 | 218 | diagnArr.add(confiJo); |
| 219 | 219 | hfBuff.append(name + "、"); |
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | behd.setDiagnResultStr(hfBuff.toString()); |
| 223 | 223 | behd.setDiagnResults(diagnArr); |
| 224 | - }else{ | |
| 224 | + } else { | |
| 225 | 225 | behd.setConfirmResults(new ArrayList()); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - if(behd.getDiagnHandSugge()!=null){ | |
| 228 | + if (behd.getDiagnHandSugge() != null) { | |
| 229 | 229 | behd.setDiagnHandSuggeStr(HdEnums.getHsTitle(behd.getDiagnHandSugge())); |
| 230 | 230 | } |
| 231 | 231 | |
| ... | ... | @@ -291,6 +291,7 @@ |
| 291 | 291 | |
| 292 | 292 | /** |
| 293 | 293 | * 获取听力诊断记录列表 |
| 294 | + * | |
| 294 | 295 | * @param hdReq 听力诊断记录对象 多条件查询 |
| 295 | 296 | * @param request |
| 296 | 297 | * @return |
| 297 | 298 | |
| 298 | 299 | |
| ... | ... | @@ -356,19 +357,19 @@ |
| 356 | 357 | babyQuery.setQueryNo(hdReq.getKeyWord()); |
| 357 | 358 | babyQuery.setHospitalId(hospitalId); |
| 358 | 359 | List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery); |
| 359 | - if(CollectionUtils.isNotEmpty(models)){ | |
| 360 | - List<String> babyIds = new ArrayList<>(); | |
| 361 | - for(BabyPatientExtendEarBaby babyModel:models){ | |
| 360 | + if (CollectionUtils.isNotEmpty(models)) { | |
| 361 | + List<String> babyIds = new ArrayList<>(); | |
| 362 | + for (BabyPatientExtendEarBaby babyModel : models) { | |
| 362 | 363 | babyIds.add(babyModel.getBabyPatientId()); |
| 363 | 364 | } |
| 364 | 365 | scrQuery.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |
| 365 | - }else{ | |
| 366 | + } else { | |
| 366 | 367 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); |
| 367 | 368 | } |
| 368 | 369 | } |
| 369 | 370 | |
| 370 | 371 | scrQuery.setCheckHospitalIds((String[]) outOrgids.toArray(new String[outOrgids.size()])); |
| 371 | - if(scrQuery.getCheckHospitalIds()==null||scrQuery.getCheckHospitalIds().length==0){ | |
| 372 | + if (scrQuery.getCheckHospitalIds() == null || scrQuery.getCheckHospitalIds().length == 0) { | |
| 372 | 373 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); |
| 373 | 374 | } |
| 374 | 375 | //主数据 |
| ... | ... | @@ -505,7 +506,7 @@ |
| 505 | 506 | hea.setId(hd.getId()); |
| 506 | 507 | hea.setDiagnoseTime(DateUtil.getyyyy_MM_dd(hd.getDiagnoseTime())); |
| 507 | 508 | String docotorId = hd.getDiagnDoctorId(); |
| 508 | - Users users = usersService.getUsers(Integer.parseInt(docotorId==null?"0":docotorId)); | |
| 509 | + Users users = usersService.getUsers(Integer.parseInt(docotorId == null ? "0" : docotorId)); | |
| 509 | 510 | if (users != null) { |
| 510 | 511 | hea.setDoctorName(users.getName() == null ? "-" : users.getName()); |
| 511 | 512 | } |
| ... | ... | @@ -520,7 +521,7 @@ |
| 520 | 521 | String title = HighRiskEnum.getTitle(Integer.parseInt(hf[b])); |
| 521 | 522 | map.put(Integer.parseInt(hf[b]), title); |
| 522 | 523 | // highRiskEnums.add(map); |
| 523 | - hrSb.append(title+","); | |
| 524 | + hrSb.append(title + ","); | |
| 524 | 525 | } |
| 525 | 526 | } |
| 526 | 527 | // hea.setHighRiskEnums(highRiskEnums); |
| 527 | 528 | |
| 528 | 529 | |
| 529 | 530 | |
| ... | ... | @@ -529,22 +530,36 @@ |
| 529 | 530 | //确诊结果 |
| 530 | 531 | if (hd.getConfirmResult() != null) { |
| 531 | 532 | String cr[] = hd.getConfirmResult().split(","); |
| 532 | - // List<Map<Integer, String>> hdEnums = new ArrayList<>(); | |
| 533 | 533 | StringBuffer hdSb = new StringBuffer(); |
| 534 | 534 | for (int b = 0; b < cr.length; b++) { |
| 535 | 535 | if (StringUtils.isNotEmpty(cr[b])) { |
| 536 | 536 | Map<Integer, String> map = new HashMap<>(); |
| 537 | 537 | String title = ConfirmedEnums.getTitle(Integer.parseInt(cr[b])); |
| 538 | 538 | map.put(Integer.parseInt(cr[b]), title); |
| 539 | - // hdEnums.add(map); | |
| 540 | - hdSb.append(title+","); | |
| 539 | + hdSb.append(title + ","); | |
| 541 | 540 | } |
| 542 | 541 | } |
| 543 | 542 | // hea.setDiagnResult(hdEnums); |
| 543 | + hea.setConfirmResult(hdSb.toString()); | |
| 544 | + } | |
| 545 | + | |
| 546 | + //诊断结果 | |
| 547 | + if (hd.getDiagnResult() != null) { | |
| 548 | + String cr[] = hd.getDiagnResult().split(","); | |
| 549 | + StringBuffer hdSb = new StringBuffer(); | |
| 550 | + for (int b = 0; b < cr.length; b++) { | |
| 551 | + if (StringUtils.isNotEmpty(cr[b])) { | |
| 552 | + Map<Integer, String> map = new HashMap<>(); | |
| 553 | + String title = HearingDiagnosisEnums.getTitle(Integer.parseInt(cr[b])); | |
| 554 | + map.put(Integer.parseInt(cr[b]), title); | |
| 555 | + hdSb.append(title + ","); | |
| 556 | + } | |
| 557 | + } | |
| 544 | 558 | hea.setDiagnResult(hdSb.toString()); |
| 545 | 559 | } |
| 546 | 560 | } |
| 547 | 561 | |
| 562 | + | |
| 548 | 563 | //诊断结果,肯定是有诊断记录 |
| 549 | 564 | if (hdReq.getConfirmResult() != null || hdReq.getConfirmDegree() != null) { |
| 550 | 565 | // 1、已诊断、2、待诊断、0、全部 |
| ... | ... | @@ -626,7 +641,7 @@ |
| 626 | 641 | //医院id |
| 627 | 642 | String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); |
| 628 | 643 | BabyPatientExtendEarHearingDiagnose hearDiag = hearingDiagnoseService.getBabyPatientExtendEarHearingDiagnose(obj.getId()); |
| 629 | - if (hearDiag == null||hearDiag.getIfdel()!=0) {//没有找到数据 | |
| 644 | + if (hearDiag == null || hearDiag.getIfdel() != 0) {//没有找到数据 | |
| 630 | 645 | return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("没有找到要删除的数据"); |
| 631 | 646 | } |
| 632 | 647 | |
| 633 | 648 | |
| 634 | 649 | |
| ... | ... | @@ -635,18 +650,18 @@ |
| 635 | 650 | earHearingDiagnoseQuery.setBabyId(hearDiag.getBabyId()); |
| 636 | 651 | earHearingDiagnoseQuery.setSort("diagnose_time"); |
| 637 | 652 | List<BabyPatientExtendEarHearingDiagnose> earHearingDiagnoseList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(earHearingDiagnoseQuery); |
| 638 | - if(CollectionUtils.isNotEmpty(earHearingDiagnoseList)){ | |
| 639 | - BabyPatientExtendEarHearingDiagnose earHearingDiagnose = earHearingDiagnoseList.get(earHearingDiagnoseList.size()-1); | |
| 640 | - if(earHearingDiagnose.getId().equals(obj.getId())){ | |
| 653 | + if (CollectionUtils.isNotEmpty(earHearingDiagnoseList)) { | |
| 654 | + BabyPatientExtendEarHearingDiagnose earHearingDiagnose = earHearingDiagnoseList.get(earHearingDiagnoseList.size() - 1); | |
| 655 | + if (earHearingDiagnose.getId().equals(obj.getId())) { | |
| 641 | 656 | obj.setModifyId(String.valueOf(loginState.getId())); |
| 642 | 657 | obj.setModifyTime(new Date()); |
| 643 | 658 | obj.setIfdel(1); |
| 644 | 659 | hearingDiagnoseService.updateBabyPatientExtendEarHearingDiagnose(obj); |
| 645 | 660 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("删除成功"); |
| 646 | - }else{ | |
| 661 | + } else { | |
| 647 | 662 | return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("删除失败!只能删除最后一次听诊记录"); |
| 648 | 663 | } |
| 649 | - }else{ | |
| 664 | + } else { | |
| 650 | 665 | return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("没有找到要删除的数据"); |
| 651 | 666 | } |
| 652 | 667 | } |
| ... | ... | @@ -743,7 +758,7 @@ |
| 743 | 758 | } |
| 744 | 759 | //听力筛查-当某个儿童在同一院组内某家医院完成了的听筛建档后去院组内其他医院做了听筛、听诊或随访,应该要在对应的医院下创建一个隐藏档案 |
| 745 | 760 | //建立隐藏档案 |
| 746 | - babyEarFacade.addhideBabyEar(obj.getBabyId(),hospitalId); | |
| 761 | + babyEarFacade.addhideBabyEar(obj.getBabyId(), hospitalId); | |
| 747 | 762 | |
| 748 | 763 | BaseResponse result = new BaseResponse(); |
| 749 | 764 | result.setErrorcode(ErrorCodeConstants.SUCCESS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/HearingDiagnoseListResult.java
View file @
218282c
| ... | ... | @@ -25,6 +25,8 @@ |
| 25 | 25 | private String diagnResult; |
| 26 | 26 | //是否确诊 0-待确诊,1-确诊 |
| 27 | 27 | private String isconfirm; |
| 28 | + //确诊结果 | |
| 29 | + private String confirmResult; | |
| 28 | 30 | //创建时间 |
| 29 | 31 | private String diagnoseTime; |
| 30 | 32 | //医生名称 |
| ... | ... | @@ -35,6 +37,14 @@ |
| 35 | 37 | private String mommnyEncryptPhone; |
| 36 | 38 | //听力高危集合 |
| 37 | 39 | private String highRiskEnums; |
| 40 | + | |
| 41 | + public String getConfirmResult() { | |
| 42 | + return confirmResult; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setConfirmResult(String confirmResult) { | |
| 46 | + this.confirmResult = confirmResult; | |
| 47 | + } | |
| 38 | 48 | |
| 39 | 49 | public String getBabyId() { |
| 40 | 50 | return babyId; |