Commit 4dc7d3be58310345b86ff009752fa4d7c5d39f93
1 parent
ac03d92007
Exists in
master
and in
6 other branches
妇女健康管理-追访管理-孕期检查-导出表格需增加高危风险素列
Showing 2 changed files with 36 additions and 28 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
4dc7d3b
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
View file @
4dc7d3b
| ... | ... | @@ -50,14 +50,14 @@ |
| 50 | 50 | public class TrackDownFacade { |
| 51 | 51 | |
| 52 | 52 | |
| 53 | - public void export(TrackDownQueryRequest downQueryRequest, Integer userId,HttpServletResponse response) { | |
| 53 | + public void export(TrackDownQueryRequest downQueryRequest, Integer userId, HttpServletResponse response) { | |
| 54 | 54 | //转换为本地的查询条件 |
| 55 | 55 | //转换为本地的查询条件 |
| 56 | 56 | TrackDownRecordQuery downRecordQuery; |
| 57 | 57 | try { |
| 58 | 58 | downRecordQuery = convertNaviteQuery(downQueryRequest, userId); |
| 59 | - }catch (Exception e){ | |
| 60 | - return ; | |
| 59 | + } catch (Exception e) { | |
| 60 | + return; | |
| 61 | 61 | } |
| 62 | 62 | //不分页 |
| 63 | 63 | downRecordQuery.setNeed(null); |
| 64 | 64 | |
| ... | ... | @@ -105,11 +105,13 @@ |
| 105 | 105 | cnames.put("yyTime", "预约时间"); |
| 106 | 106 | } else if (downQueryRequest.getTrackType() == 3) { // 产前检查 |
| 107 | 107 | cnames.put("week", "孕周"); |
| 108 | + cnames.put("rFactor", "高危因素"); | |
| 108 | 109 | cnames.put("checkCount", "本院产检次数"); |
| 109 | 110 | cnames.put("yyTime", "产检日期"); |
| 110 | 111 | cnames.put("yycjDate", "预约产检日期"); |
| 111 | 112 | cnames.put("cjzfDate", "产检追访时间"); |
| 112 | 113 | cnames.put("result", "产检追访结果"); |
| 114 | + | |
| 113 | 115 | } else if (downQueryRequest.getTrackType() == 4) { // 产前筛查 |
| 114 | 116 | cnames.put("week", "孕周"); |
| 115 | 117 | cnames.put("yycsDate", "预约产筛日期"); |
| ... | ... | @@ -151,6 +153,7 @@ |
| 151 | 153 | result.put("yyTime", data.get("yyTime")); |
| 152 | 154 | } else if (downQueryRequest.getTrackType() == 3) { // 产前检查 |
| 153 | 155 | result.put("week", data.get("week")); |
| 156 | + result.put("rFactor", data.get("rFactor")); | |
| 154 | 157 | result.put("checkCount", data.get("checkCount")); |
| 155 | 158 | result.put("yyTime", data.get("yyTime")); |
| 156 | 159 | result.put("yycjDate", data.get("yycjDate")); |
| ... | ... | @@ -276,7 +279,7 @@ |
| 276 | 279 | * @param downQueryRequest |
| 277 | 280 | * @return |
| 278 | 281 | */ |
| 279 | - private TrackDownRecordQuery convertNaviteQuery(TrackDownQueryRequest downQueryRequest, Integer userId) throws Exception{ | |
| 282 | + private TrackDownRecordQuery convertNaviteQuery(TrackDownQueryRequest downQueryRequest, Integer userId) throws Exception { | |
| 280 | 283 | |
| 281 | 284 | boolean isPatient = false; |
| 282 | 285 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 283 | 286 | |
| ... | ... | @@ -299,12 +302,12 @@ |
| 299 | 302 | isPatient = true; |
| 300 | 303 | } |
| 301 | 304 | |
| 302 | - if(downQueryRequest.getStartNextCheckTime()!=null){//下次产检开始日期 | |
| 305 | + if (downQueryRequest.getStartNextCheckTime() != null) {//下次产检开始日期 | |
| 303 | 306 | patientsQuery.setNextCheckTimeStart(downQueryRequest.getStartNextCheckTime()); |
| 304 | 307 | isPatient = true; |
| 305 | 308 | } |
| 306 | 309 | |
| 307 | - if(downQueryRequest.getEndNextCheckTime()!=null){//下次产检结束日期 | |
| 310 | + if (downQueryRequest.getEndNextCheckTime() != null) {//下次产检结束日期 | |
| 308 | 311 | patientsQuery.setNextCheckTimeEnd(downQueryRequest.getEndNextCheckTime()); |
| 309 | 312 | isPatient = true; |
| 310 | 313 | } |
| 311 | 314 | |
| ... | ... | @@ -355,9 +358,9 @@ |
| 355 | 358 | patientsQuery.setHospitalId(hospitalId); |
| 356 | 359 | patientsQuery.setType(1); |
| 357 | 360 | patientsQuery.setQueryNo(downQueryRequest.getKey()); |
| 358 | - System.out.println("过滤条件:"+patientsQuery.convertToQuery().convertToMongoQuery()); | |
| 361 | + System.out.println("过滤条件:" + patientsQuery.convertToQuery().convertToMongoQuery()); | |
| 359 | 362 | List<Patients> patientses = patientsService.queryPatient(patientsQuery); |
| 360 | - if(CollectionUtils.isEmpty(patientses)){ | |
| 363 | + if (CollectionUtils.isEmpty(patientses)) { | |
| 361 | 364 | throw new Exception("没有找到数据"); |
| 362 | 365 | } |
| 363 | 366 | List<String> pids = new ArrayList<>(); |
| ... | ... | @@ -545,7 +548,7 @@ |
| 545 | 548 | TrackDownRecordQuery downRecordQuery; |
| 546 | 549 | try { |
| 547 | 550 | downRecordQuery = convertNaviteQuery(downQueryRequest, userId); |
| 548 | - }catch (Exception e){ | |
| 551 | + } catch (Exception e) { | |
| 549 | 552 | BaseObjectResponse baseObjectResponse = new BaseObjectResponse(); |
| 550 | 553 | baseObjectResponse.setData(new ArrayList<>()); |
| 551 | 554 | return new BaseObjectResponse(); |
| ... | ... | @@ -611,8 +614,8 @@ |
| 611 | 614 | |
| 612 | 615 | |
| 613 | 616 | Patients patients = patientsService.findOnePatientById(downRecord.getParentId()); |
| 614 | - if(patients==null){ | |
| 615 | - System.out.println("产后复查未找到parent:"+downRecord.getParentId()); | |
| 617 | + if (patients == null) { | |
| 618 | + System.out.println("产后复查未找到parent:" + downRecord.getParentId()); | |
| 616 | 619 | return temp; |
| 617 | 620 | } |
| 618 | 621 | //分娩时间 |
| 619 | 622 | |
| 620 | 623 | |
| ... | ... | @@ -777,14 +780,14 @@ |
| 777 | 780 | Patients patients = patientsService.findOnePatientById(downRecord.getParentId()); |
| 778 | 781 | |
| 779 | 782 | Map<String, Object> temp = new HashMap<>(); |
| 780 | - if(patients==null){ | |
| 781 | - System.out.println("产检追访未找到parent:"+downRecord.getParentId()); | |
| 783 | + if (patients == null) { | |
| 784 | + System.out.println("产检追访未找到parent:" + downRecord.getParentId()); | |
| 782 | 785 | downRecord.setStatus(0); |
| 783 | - trackDownRecordService.updateTrackDown(downRecord,downRecord.getId()); | |
| 786 | + trackDownRecordService.updateTrackDown(downRecord, downRecord.getId()); | |
| 784 | 787 | return temp; |
| 785 | 788 | } |
| 786 | 789 | //完善高危数据 |
| 787 | - handHightRisk(patients,temp); | |
| 790 | + handHightRisk(patients, temp); | |
| 788 | 791 | temp.put("username", downRecord.getUsername()); |
| 789 | 792 | temp.put("age", DateUtil.getAge(downRecord.getBirth())); |
| 790 | 793 | temp.put("cardNo", StringUtils.encryCardNo(downRecord.getCardNo())); |
| ... | ... | @@ -798,6 +801,13 @@ |
| 798 | 801 | temp.put("week", DateUtil.getWeekDesc(patients.getLastMenses(), new Date())); /** 孕周 */ |
| 799 | 802 | } |
| 800 | 803 | } |
| 804 | + //高危因素 | |
| 805 | + if (CollectionUtils.isNotEmpty(patients.getRiskFactorId())) { | |
| 806 | + for (String risl : patients.getRiskFactorId()) { | |
| 807 | + | |
| 808 | + } | |
| 809 | + } | |
| 810 | + | |
| 801 | 811 | //产检次数 |
| 802 | 812 | temp.put("checkCount", getChuzhenCount(parentId)); |
| 803 | 813 | Criteria criteria = Criteria.where("yn").is(1).and("parentId").is(downRecord.getParentId()); |
| ... | ... | @@ -858,7 +868,7 @@ |
| 858 | 868 | } |
| 859 | 869 | } |
| 860 | 870 | |
| 861 | - public void handHightRisk(Patients patients,Map map){ | |
| 871 | + public void handHightRisk(Patients patients, Map map) { | |
| 862 | 872 | //高危因素 |
| 863 | 873 | List<String> factor = patients.getRiskFactorId(); |
| 864 | 874 | |
| 865 | 875 | |
| 866 | 876 | |
| 867 | 877 | |
| 868 | 878 | |
| ... | ... | @@ -873,22 +883,19 @@ |
| 873 | 883 | } |
| 874 | 884 | } |
| 875 | 885 | if (sb.toString().endsWith(",")) { |
| 876 | - map.put("rFactor",sb.substring(0, sb.length() - 1)); | |
| 886 | + map.put("rFactor", sb.substring(0, sb.length() - 1)); | |
| 877 | 887 | } else { |
| 878 | - map.put("rFactor",sb.toString()); | |
| 888 | + map.put("rFactor", sb.toString()); | |
| 879 | 889 | } |
| 880 | 890 | |
| 881 | 891 | if (!"-".equals(map.get("rFactor")) && org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { |
| 882 | - map.put("rFactor",map.get("rFactor")+","+patients.getoRiskFactor()); | |
| 883 | - }else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) | |
| 884 | - { | |
| 885 | - map.put("rFactor",patients.getoRiskFactor()); | |
| 892 | + map.put("rFactor", map.get("rFactor") + "," + patients.getoRiskFactor()); | |
| 893 | + } else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { | |
| 894 | + map.put("rFactor", patients.getoRiskFactor()); | |
| 886 | 895 | } |
| 896 | + } else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { | |
| 897 | + map.put("rFactor", patients.getoRiskFactor()); | |
| 887 | 898 | } |
| 888 | - else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) | |
| 889 | - { | |
| 890 | - map.put("rFactor",patients.getoRiskFactor()); | |
| 891 | - } | |
| 892 | 899 | List level = new ArrayList(); |
| 893 | 900 | if (StringUtils.isNotEmpty(patients.getRiskLevelId())) { |
| 894 | 901 | try { |
| ... | ... | @@ -904,7 +911,7 @@ |
| 904 | 911 | } catch (Exception e) { |
| 905 | 912 | ExceptionUtils.catchException(e, "patients.getRiskLevelId error."); |
| 906 | 913 | } |
| 907 | - map.put("rLevel",HighScoreResult.filter(level)); | |
| 914 | + map.put("rLevel", HighScoreResult.filter(level)); | |
| 908 | 915 | } |
| 909 | 916 | } |
| 910 | 917 | } |