Commit 68f122d956b417929386ef930df14a655b1e95c1

Authored by yangfei
1 parent 6197bc0dea

多产程,电子病历

Showing 2 changed files with 90 additions and 122 deletions

platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 68f122d
... ... @@ -478,7 +478,7 @@
478 478 private String hospitalId;
479 479  
480 480 private String hcertificateNum;
481   -
  481 + //3-转诊建档
482 482 private Integer buildType = -1;
483 483 private Integer buildTypeNot = -1;
484 484  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 68f122d
... ... @@ -270,7 +270,7 @@
270 270 * @param antExAddRequest
271 271 * @return
272 272 */
273   - public BaseResponse addOneAntEx(final AntExAddRequest antExAddRequest, Integer userId) {
  273 + public BaseResponse addOneAntEx(final AntExAddRequest antExAddRequest, Integer userId) {
274 274 final String hospitalId = autoMatchFacade.getHospitalId(userId);
275 275 AntenatalExaminationModel model = antExAddRequest.convertToDataModel();
276 276 //表示区域的
... ... @@ -336,7 +336,6 @@
336 336 }
337 337  
338 338  
339   -
340 339 //修改申请单状态
341 340 updateApplyOrder(model, antExAddRequest.getParentId());
342 341  
... ... @@ -346,7 +345,6 @@
346 345 antenatalExaminationService.addOneBabyAnt(model);
347 346  
348 347  
349   -
350 348 /** 验证产检券是否可用 可用就改为已使用状态 */
351 349 if (StringUtils.isNotBlank(antExAddRequest.getCouponCode()) && antExAddRequest.getCouponType() != null) {
352 350 BaseObjectResponse resp = couponService.validate(antExAddRequest.getCouponCode(), antExAddRequest.getCouponType(), autoMatchFacade.getHospitalId(userId));
... ... @@ -396,7 +394,6 @@
396 394 });
397 395  
398 396  
399   -
400 397 operateLogFacade.addAddOptLog(userId, Integer.parseInt(hospitalId), model, OptActionEnums.ADD.getId(), "添加复诊");
401 398  
402 399 if (null != patients.getBuildType() && patients.getBuildType() == 3) {
... ... @@ -428,7 +425,7 @@
428 425 }
429 426 }
430 427 //添加复诊时添加追访信息
431   - addTrackDownInfo(userId,patients);
  428 + addTrackDownInfo(userId, patients);
432 429 }
433 430 //处理自定义高危状态为已使用状态
434 431 highRiskFacade.dispHospHighRiskUse(model.getOtherRisk());
... ... @@ -466,7 +463,7 @@
466 463 * @param excAddRequest
467 464 * @return
468 465 */
469   - public BaseResponse addOneAnetExChu(final AntExcAddRequest excAddRequest, final Integer userId) {
  466 + public BaseResponse addOneAnetExChu(final AntExcAddRequest excAddRequest, final Integer userId) {
470 467 StopWatch stopWatch = new StopWatch("addOneAnetExChu");
471 468  
472 469 final String hospitalId = autoMatchFacade.getHospitalId(userId);
... ... @@ -634,7 +631,7 @@
634 631 }
635 632 }
636 633 //初诊是添加追访记录
637   - addTrackDownInfo(userId,patients);
  634 + addTrackDownInfo(userId, patients);
638 635 } else {
639 636 return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("您已经做过初诊");
640 637 }
... ... @@ -646,6 +643,7 @@
646 643  
647 644 /**
648 645 * 初诊、复诊添加或更新追访信息
  646 + *
649 647 * @param userId
650 648 * @param patient
651 649 */
... ... @@ -929,6 +927,7 @@
929 927 if (null != groupsFacade.findByCurrentUserId(autoMatchFacade.getHospitalId(userId))) {
930 928 patientsQuery.setExtEnable(false);
931 929 }
  930 + System.out.println("查询孕妇档案:" + patientsQuery.convertToQuery().convertToMongoQuery());
932 931 //获取所有的建档记录
933 932 List<Patients> list = patientsService.queryPatient(patientsQuery);
934 933 AntexListResult antexListResult = new AntexListResult();
935 934  
... ... @@ -1429,14 +1428,23 @@
1429 1428 //分娩记录
1430 1429 MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
1431 1430 matDeliverQuery.setYn(YnEnums.YES.getId());
1432   - matDeliverQuery.setParentId(patientId);
  1431 +
  1432 + PatientsQuery patientsQuery = new PatientsQuery();
  1433 + patientsQuery.setSource(patients.getId());
  1434 + patientsQuery.setBuildType(1);
  1435 + List<Patients> patients1 = patientsService.queryPatient(patientsQuery);
  1436 + if (CollectionUtils.isNotEmpty(patients1)) {
  1437 + Patients patients2 = patients1.get(0);
  1438 + matDeliverQuery.setParentId(patients2.getId());
  1439 + } else {
  1440 + matDeliverQuery.setParentId(patientId);
  1441 + }
1433 1442 List<MaternalDeliverModel> l = matDeliverService.query(matDeliverQuery);
1434 1443 if (CollectionUtils.isNotEmpty(l)) {
1435 1444 MaternalDeliverModel model = l.get(0);
1436 1445 if (null != model.getHospitalId()) {
1437 1446 organization = organizationService.getOrganization(Integer.valueOf(model.getHospitalId()));
1438 1447 }
1439   -
1440 1448 listData.add(new AntData(model, patients.getLastMenses(), null != organization ? organization.getName() : ""));
1441 1449 }
1442 1450 //出院小结
... ... @@ -1645,7 +1653,6 @@
1645 1653 }
1646 1654  
1647 1655  
1648   -
1649 1656 public class SortIn {
1650 1657  
1651 1658 public SortIn(Patients patients) {
... ... @@ -1952,8 +1959,8 @@
1952 1959 HighScoreResult highScoreResult = findLastRisk(patients.getPid(), true);
1953 1960 patients1.setRiskScore(highScoreResult.getScore());
1954 1961 patients1.setRiskFactorId(highScoreResult.getHighId());
1955   - List list =highScoreResult.getLevelId();
1956   - com.lyms.platform.operate.web.utils.CollectionUtils.removeDuplicate(list,true);
  1962 + List list = highScoreResult.getLevelId();
  1963 + com.lyms.platform.operate.web.utils.CollectionUtils.removeDuplicate(list, true);
1957 1964 patients1.setRiskLevelId(JsonUtil.array2JsonString(list));
1958 1965 //设置其他的高危因素
1959 1966 patients1.setoRiskFactor(StringUtils.isNotEmpty(highScoreResult.getOtherRisk()) ? highScoreResult.getOtherRisk() : "");
... ... @@ -2136,7 +2143,7 @@
2136 2143 Patients fmPatient = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, currentGroupHospital, 3, false, null, og.getbStatus() == 1);
2137 2144  
2138 2145 List<SortIn> sortList = new ArrayList<>();
2139   - if(fmPatient!=null){
  2146 + if (fmPatient != null) {
2140 2147 fmPatient.setBookbuildingDate(fmPatient.getFmDate());
2141 2148 sortList.add(new SortIn(fmPatient));
2142 2149 }
2143 2150  
... ... @@ -2253,11 +2260,10 @@
2253 2260 }
2254 2261  
2255 2262  
2256   - if (patients != null)
2257   - {
  2263 + if (patients != null) {
2258 2264  
2259 2265 //测量数据
2260   - antexListResult.setMeasureData(measureInfoFacade.getMeasureInfo(patients.getPcerteTypeId(),patients.getCardNo(),hospitalId));
  2266 + antexListResult.setMeasureData(measureInfoFacade.getMeasureInfo(patients.getPcerteTypeId(), patients.getCardNo(), hospitalId));
2261 2267  
2262 2268 //产筛状态
2263 2269 antexListResult.setSieveStatus(sieveFacade.getSieveStatus(patients.getId(), hospitalId));
2264 2270  
... ... @@ -2265,15 +2271,12 @@
2265 2271 DiagnoseConfigQuery diagnoseConfigQuery = new DiagnoseConfigQuery();
2266 2272 diagnoseConfigQuery.setHospitalId(hospitalId);
2267 2273 List<DiagnoseConfigModel> configModels = diagnoseConfigService.queryDiagnoseConfigs(diagnoseConfigQuery);
2268   - if (CollectionUtils.isNotEmpty(configModels) && StringUtils.isNotEmpty(configModels.get(0).getEnable()))
2269   - {
  2274 + if (CollectionUtils.isNotEmpty(configModels) && StringUtils.isNotEmpty(configModels.get(0).getEnable())) {
2270 2275 antexListResult.setEnableConfig(configModels.get(0).getEnable());
2271 2276 }
2272 2277 }
2273 2278  
2274 2279  
2275   -
2276   -
2277 2280 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(antexListResult);
2278 2281 }
2279 2282  
2280 2283  
2281 2284  
2282 2285  
2283 2286  
2284 2287  
2285 2288  
... ... @@ -2726,41 +2729,35 @@
2726 2729  
2727 2730 public BaseResponse getGongGaoLine(String patientId, Integer id) {
2728 2731  
2729   - Map<String,Object> map = new HashMap<>();
  2732 + Map<String, Object> map = new HashMap<>();
2730 2733  
2731 2734 List<String> titles = new ArrayList<>();
2732 2735 List<String> values = new ArrayList<>();
2733 2736  
2734 2737  
2735   - List<Map<String,String>> tables = new LinkedList<>();
  2738 + List<Map<String, String>> tables = new LinkedList<>();
2736 2739  
2737 2740 AntExChuQuery antExChuQuery = new AntExChuQuery();
2738 2741 antExChuQuery.setYn(YnEnums.YES.getId());
2739 2742 antExChuQuery.setParentId(patientId);
2740 2743 List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery);
2741   - if (CollectionUtils.isNotEmpty(antExChuModels))
2742   - {
  2744 + if (CollectionUtils.isNotEmpty(antExChuModels)) {
2743 2745 AntExChuModel chumodel = antExChuModels.get(0);
2744   - if (StringUtils.isNotEmpty(chumodel.getGonggao()) || StringUtils.isNotEmpty(chumodel.getGonggaoSelect()))
2745   - {
2746   - Map<String,String> item = new HashMap<>();
  2746 + if (StringUtils.isNotEmpty(chumodel.getGonggao()) || StringUtils.isNotEmpty(chumodel.getGonggaoSelect())) {
  2747 + Map<String, String> item = new HashMap<>();
2747 2748 String value = "";
2748   - if (StringUtils.isNotEmpty(chumodel.getGonggaoSelect()) )
2749   - {
  2749 + if (StringUtils.isNotEmpty(chumodel.getGonggaoSelect())) {
2750 2750 if (StringUtils.isNotEmpty(chumodel.getGonggaoType())) {
2751 2751 value = GongJingEnums.getGongGaoNameById(chumodel.getGonggaoSelect()) + "," + GongJingEnums.getHengZhiNameById(chumodel.getGonggaoType());
2752 2752 } else {
2753 2753 value = GongJingEnums.getGongGaoNameById(chumodel.getGonggaoSelect());
2754 2754 }
2755   - }
2756   - else if (StringUtils.isNotEmpty(chumodel.getGonggao()))
2757   - {
  2755 + } else if (StringUtils.isNotEmpty(chumodel.getGonggao())) {
2758 2756 value = chumodel.getGonggao();
2759 2757 }
2760 2758 item.put("value", value);
2761 2759 item.put("time", DateUtil.getyyyy_MM_dd(chumodel.getCheckTime()));
2762   - if (StringUtils.isNotEmpty(chumodel.getGonggao()) && (StringUtils.isNumeric(chumodel.getGonggao()) || Pattern.compile("^[-\\+]?[.\\d]*$").matcher(chumodel.getGonggao()).matches()))
2763   - {
  2760 + if (StringUtils.isNotEmpty(chumodel.getGonggao()) && (StringUtils.isNumeric(chumodel.getGonggao()) || Pattern.compile("^[-\\+]?[.\\d]*$").matcher(chumodel.getGonggao()).matches())) {
2764 2761 titles.add(DateUtil.getyyyy_MM_dd(chumodel.getCheckTime()));
2765 2762 values.add(chumodel.getGonggao());
2766 2763 }
2767 2764  
2768 2765  
2769 2766  
... ... @@ -2773,32 +2770,25 @@
2773 2770 antExQuery.setParentId(patientId);
2774 2771 antExQuery.setYn(YnEnums.YES.getId());
2775 2772 List<AntenatalExaminationModel> examinationModelList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.ASC, "created"));
2776   - if (CollectionUtils.isNotEmpty(examinationModelList))
2777   - {
2778   - for (AntenatalExaminationModel anmodel : examinationModelList)
2779   - {
2780   - if (StringUtils.isNotEmpty(anmodel.getGongGao()) || StringUtils.isNotEmpty(anmodel.getGongGaoSelect()))
2781   - {
2782   - Map<String,String> item = new HashMap<>();
  2773 + if (CollectionUtils.isNotEmpty(examinationModelList)) {
  2774 + for (AntenatalExaminationModel anmodel : examinationModelList) {
  2775 + if (StringUtils.isNotEmpty(anmodel.getGongGao()) || StringUtils.isNotEmpty(anmodel.getGongGaoSelect())) {
  2776 + Map<String, String> item = new HashMap<>();
2783 2777  
2784 2778 String value = "";
2785   - if (StringUtils.isNotEmpty(anmodel.getGongGaoSelect()) )
2786   - {
  2779 + if (StringUtils.isNotEmpty(anmodel.getGongGaoSelect())) {
2787 2780 if (StringUtils.isNotEmpty(anmodel.getGongGaoType())) {
2788 2781 value = GongJingEnums.getGongGaoNameById(anmodel.getGongGaoSelect()) + "," + GongJingEnums.getHengZhiNameById(anmodel.getGongGaoType());
2789 2782 } else {
2790 2783 value = GongJingEnums.getGongGaoNameById(anmodel.getGongGaoSelect());
2791 2784 }
2792   - }
2793   - else if (StringUtils.isNotEmpty(anmodel.getGongGao()))
2794   - {
  2785 + } else if (StringUtils.isNotEmpty(anmodel.getGongGao())) {
2795 2786 value = anmodel.getGongGao();
2796 2787 }
2797 2788  
2798 2789 item.put("value", value);
2799 2790 item.put("time", DateUtil.getyyyy_MM_dd(anmodel.getCheckDate()));
2800   - if (StringUtils.isNotEmpty(anmodel.getGongGao()) && (StringUtils.isNumeric(anmodel.getGongGao()) || Pattern.compile("^[-\\+]?[.\\d]*$").matcher(anmodel.getGongGao()).matches()))
2801   - {
  2791 + if (StringUtils.isNotEmpty(anmodel.getGongGao()) && (StringUtils.isNumeric(anmodel.getGongGao()) || Pattern.compile("^[-\\+]?[.\\d]*$").matcher(anmodel.getGongGao()).matches())) {
2802 2792 titles.add(DateUtil.getyyyy_MM_dd(anmodel.getCheckDate()));
2803 2793 values.add(anmodel.getGongGao());
2804 2794 }
... ... @@ -2825,7 +2815,7 @@
2825 2815 diagnoseConfigQuery.setHospitalId(patients.getHospitalId());
2826 2816 List<DiagnoseConfigModel> configModels = diagnoseConfigService.queryDiagnoseConfigs(diagnoseConfigQuery);
2827 2817  
2828   - Map<Integer,List<DiagnoseItemModel>> mapItems = getRiskConfig(configModels);
  2818 + Map<Integer, List<DiagnoseItemModel>> mapItems = getRiskConfig(configModels);
2829 2819 if (mapItems != null && mapItems.size() > 0) {
2830 2820 if (patients != null && patients.getBirth() != null) {
2831 2821 String age = String.valueOf(DateUtil.getAge(patients.getBirth(), new Date()));
2832 2822  
... ... @@ -2840,20 +2830,17 @@
2840 2830 }
2841 2831 }
2842 2832 }
2843   - List<Map<String,String>> riskList = diagnoseConfigFacde.getRiskName(list);
  2833 + List<Map<String, String>> riskList = diagnoseConfigFacde.getRiskName(list);
2844 2834  
2845 2835 return new BaseObjectResponse().setData(riskList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
2846 2836 }
2847 2837  
2848 2838 //每一项是否启用
2849   - private boolean isEnableItem(Map<String,String> status,Integer id)
2850   - {
2851   - if (status != null && status.size() > 0)
2852   - {
2853   - if ("true".equals(status.get(String.valueOf(id))))
2854   - {
2855   - return true;
2856   - }
  2839 + private boolean isEnableItem(Map<String, String> status, Integer id) {
  2840 + if (status != null && status.size() > 0) {
  2841 + if ("true".equals(status.get(String.valueOf(id)))) {
  2842 + return true;
  2843 + }
2857 2844 }
2858 2845 return false;
2859 2846 }
2860 2847  
2861 2848  
2862 2849  
2863 2850  
2864 2851  
... ... @@ -2869,27 +2856,25 @@
2869 2856 diagnoseConfigQuery.setHospitalId(hospitalId);
2870 2857 List<DiagnoseConfigModel> configModels = diagnoseConfigService.queryDiagnoseConfigs(diagnoseConfigQuery);
2871 2858  
2872   - List<Map<String,String>> riskList = new ArrayList<>();
  2859 + List<Map<String, String>> riskList = new ArrayList<>();
2873 2860  
2874   - Map<String,String> status = new HashMap<>();
2875   - if (CollectionUtils.isNotEmpty(configModels))
2876   - {
  2861 + Map<String, String> status = new HashMap<>();
  2862 + if (CollectionUtils.isNotEmpty(configModels)) {
2877 2863 DiagnoseConfigModel model = configModels.get(0);
2878 2864  
2879   - List<Map<String, String>> configs = model.getConfigs();
  2865 + List<Map<String, String>> configs = model.getConfigs();
2880 2866  
2881   - if (model == null || "0".equals(model.getEnable()) || configs == null || configs.size() == 0)
2882   - {
  2867 + if (model == null || "0".equals(model.getEnable()) || configs == null || configs.size() == 0) {
2883 2868 return new BaseObjectResponse().setData(riskList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
2884 2869 }
2885 2870 if (CollectionUtils.isNotEmpty(configs)) {
2886 2871 for (Map<String, String> map : configs) {
2887   - status.put(map.get("id"),map.get("status"));
  2872 + status.put(map.get("id"), map.get("status"));
2888 2873 }
2889 2874 }
2890 2875 }
2891 2876  
2892   - Map<Integer,List<DiagnoseItemModel>> mapItems = getRiskConfig(configModels);
  2877 + Map<Integer, List<DiagnoseItemModel>> mapItems = getRiskConfig(configModels);
2893 2878 if (mapItems != null && mapItems.size() > 0) {
2894 2879 if (isEnableItem(status, DiagnoseEnums.DiagnoseItemEnums.age.getId())) {
2895 2880 Patients patients = patientsService.findOnePatientById(antExcAddRequest.getParentId());
2896 2881  
... ... @@ -3891,11 +3876,9 @@
3891 3876 }
3892 3877 }
3893 3878  
3894   - if (list.size() > 0)
3895   - {
  3879 + if (list.size() > 0) {
3896 3880 List<String> ids = new ArrayList<>();
3897   - for (String id : list)
3898   - {
  3881 + for (String id : list) {
3899 3882 ids.add(id);
3900 3883 }
3901 3884 riskList = diagnoseConfigFacde.getRiskName(ids);
3902 3885  
3903 3886  
3904 3887  
3905 3888  
3906 3889  
3907 3890  
3908 3891  
3909 3892  
... ... @@ -3905,50 +3888,44 @@
3905 3888 }
3906 3889  
3907 3890  
3908   - private boolean contain(String value,String content)
3909   - {
  3891 + private boolean contain(String value, String content) {
3910 3892 return content.contains(value);
3911 3893 }
3912 3894  
3913 3895 /**
3914   - *
3915   - * @param expId 表达式id
3916   - * @param value 计算值
  3896 + * @param expId 表达式id
  3897 + * @param value 计算值
3917 3898 * @param calValue 被计算值
3918 3899 * @return
3919 3900 */
3920   - private boolean compare(String expId,String value,String calValue)
3921   - {
3922   - try
3923   - {
  3901 + private boolean compare(String expId, String value, String calValue) {
  3902 + try {
3924 3903 Double compareValue = Double.parseDouble(calValue);
3925 3904  
3926 3905 Integer id = Integer.parseInt(expId);
3927   - switch (id)
3928   - {
3929   - case 1 :
  3906 + switch (id) {
  3907 + case 1:
3930 3908 return compareValue > Double.parseDouble(value);
3931   - case 2 :
3932   - return compareValue >= Double.parseDouble(value);
3933   - case 3 :
3934   - return compareValue < Double.parseDouble(value);
3935   - case 4 :
3936   - return compareValue <= Double.parseDouble(value) ;
3937   - case 5 :
  3909 + case 2:
  3910 + return compareValue >= Double.parseDouble(value);
  3911 + case 3:
  3912 + return compareValue < Double.parseDouble(value);
  3913 + case 4:
  3914 + return compareValue <= Double.parseDouble(value);
  3915 + case 5:
3938 3916 return compareValue == Double.parseDouble(value);
3939   - case 6 :
  3917 + case 6:
3940 3918 return compareValue != Double.parseDouble(value);
3941   - default: return false;
  3919 + default:
  3920 + return false;
3942 3921 }
3943   - }catch (Exception e)
3944   - {
3945   - ExceptionUtils.catchException(e,"risk compare error");
  3922 + } catch (Exception e) {
  3923 + ExceptionUtils.catchException(e, "risk compare error");
3946 3924 }
3947 3925 return false;
3948 3926 }
3949 3927  
3950   - private boolean compare(DiagnoseItemModel item,String calValue)
3951   - {
  3928 + private boolean compare(DiagnoseItemModel item, String calValue) {
3952 3929 String expId1 = item.getValueOne();
3953 3930 String value1 = item.getValueTwo();
3954 3931 String logic = item.getValueThree();
3955 3932  
3956 3933  
3957 3934  
3958 3935  
3959 3936  
3960 3937  
3961 3938  
3962 3939  
3963 3940  
... ... @@ -3959,52 +3936,43 @@
3959 3936 StringUtils.isNotEmpty(value1) &&
3960 3937 StringUtils.isNotEmpty(expId2) &&
3961 3938 StringUtils.isNotEmpty(value2) &&
3962   - StringUtils.isNotEmpty(logic))
3963   - {
  3939 + StringUtils.isNotEmpty(logic)) {
3964 3940 Integer logicId = Integer.parseInt(logic);
3965   - switch (logicId)
3966   - {
3967   - case 1 :
  3941 + switch (logicId) {
  3942 + case 1:
3968 3943 return compare(expId1, value1, calValue) && compare(expId2, value2, calValue);
3969   - case 2 :
  3944 + case 2:
3970 3945 return compare(expId1, value1, calValue) || compare(expId2, value2, calValue);
3971   - default: return false;
  3946 + default:
  3947 + return false;
3972 3948 }
3973   - }
3974   - else if (StringUtils.isNotEmpty(expId1) && StringUtils.isNotEmpty(value1))
3975   - {
  3949 + } else if (StringUtils.isNotEmpty(expId1) && StringUtils.isNotEmpty(value1)) {
3976 3950 return compare(expId1, value1, calValue);
3977 3951 }
3978 3952 return false;
3979 3953 }
3980 3954  
3981 3955  
3982   - private Map<Integer,List<DiagnoseItemModel>> getRiskConfig(List<DiagnoseConfigModel> configModels)
3983   - {
3984   - Map<Integer,List<DiagnoseItemModel>> mapItems = new HashMap<>();
  3956 + private Map<Integer, List<DiagnoseItemModel>> getRiskConfig(List<DiagnoseConfigModel> configModels) {
  3957 + Map<Integer, List<DiagnoseItemModel>> mapItems = new HashMap<>();
3985 3958  
3986   - if (CollectionUtils.isNotEmpty(configModels))
3987   - {
  3959 + if (CollectionUtils.isNotEmpty(configModels)) {
3988 3960 DiagnoseConfigModel configModel = configModels.get(0);
3989 3961  
3990 3962 DiagnoseItemsQuery diagnoseItemsQuery = new DiagnoseItemsQuery();
3991 3963 diagnoseItemsQuery.setConfigId(configModel.getId());
3992 3964  
3993 3965 List<DiagnoseItemModel> diagnoseItemModels = diagnoseConfigService.queryDiagnoseItems(diagnoseItemsQuery);
3994   - if (CollectionUtils.isNotEmpty(diagnoseItemModels))
3995   - {
3996   - for (DiagnoseEnums.DiagnoseItemEnums diagnoses : DiagnoseEnums.DiagnoseItemEnums.values())
3997   - {
  3966 + if (CollectionUtils.isNotEmpty(diagnoseItemModels)) {
  3967 + for (DiagnoseEnums.DiagnoseItemEnums diagnoses : DiagnoseEnums.DiagnoseItemEnums.values()) {
3998 3968  
3999 3969 List<DiagnoseItemModel> diagnoseItemList = new ArrayList<>();
4000   - for (DiagnoseItemModel item : diagnoseItemModels)
4001   - {
4002   - if (diagnoses.getId() == Integer.parseInt(item.getParentId()))
4003   - {
  3970 + for (DiagnoseItemModel item : diagnoseItemModels) {
  3971 + if (diagnoses.getId() == Integer.parseInt(item.getParentId())) {
4004 3972 diagnoseItemList.add(item);
4005 3973 }
4006 3974 }
4007   - mapItems.put(diagnoses.getId(),diagnoseItemList);
  3975 + mapItems.put(diagnoses.getId(), diagnoseItemList);
4008 3976 }
4009 3977 }
4010 3978 }