Commit 8914a8c2d47f30abb0d78e50e86e3315bee9d367
1 parent
9d34540222
Exists in
dev
#fix:针对大同市第一人民医院修改高危统计逻辑
Showing 6 changed files with 130 additions and 36 deletions
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/HiskCountTask.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
8914a8c
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
8914a8c
... | ... | @@ -256,7 +256,7 @@ |
256 | 256 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
257 | 257 | } |
258 | 258 | |
259 | - private PatientsQuery complayRequest(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) { | |
259 | + private PatientsQuery complayRequest(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion,String hospitalId) { | |
260 | 260 | PatientsQuery patientsQuery = new PatientsQuery(); |
261 | 261 | patientsQuery.setPhone(riskPatientsQueryRequest.getPhone()); |
262 | 262 | patientsQuery.setCardNo(riskPatientsQueryRequest.getCardNo()); |
263 | 263 | |
... | ... | @@ -272,7 +272,11 @@ |
272 | 272 | |
273 | 273 | //设置为孕妇 |
274 | 274 | patientsQuery.setType(type); |
275 | + if ("2100002419".equals(hospitalId)){ | |
276 | + patientsQuery.setHospitalId(hospitalId); | |
277 | + } | |
275 | 278 | |
279 | + | |
276 | 280 | //add lqy 高危孕产妇统计需求 |
277 | 281 | if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getType())) { |
278 | 282 | if ("2".equals(riskPatientsQueryRequest.getType())) { |
279 | 283 | |
280 | 284 | |
... | ... | @@ -706,10 +710,11 @@ |
706 | 710 | * @return |
707 | 711 | */ |
708 | 712 | public BaseResponse queryHighRisk(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) { |
713 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
709 | 714 | //组合请求 |
710 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
715 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
711 | 716 | patientsQuery.setGcdfDoctorId(riskPatientsQueryRequest.getGcdfDoctorId());//分娩记录加住院管床大夫 |
712 | - String hospital = autoMatchFacade.getHospitalId(userId); | |
717 | + | |
713 | 718 | //查询符合条件的孕妇 |
714 | 719 | StopWatch stopWatch = new StopWatch("queryPatient1 -" + hospital); |
715 | 720 | stopWatch.start(); |
... | ... | @@ -747,7 +752,7 @@ |
747 | 752 | if (CollectionUtils.isNotEmpty(patientses)) { |
748 | 753 | //如果是查高危孕妇 |
749 | 754 | if (null != isHighRisk && Boolean.TRUE.equals(isHighRisk)) { |
750 | - data = convertToHighRisk(patientses, userId, hospital); | |
755 | + data = convertToHighRisk(patientses, userId, hospital,null,null); | |
751 | 756 | } else if (type == 1) { |
752 | 757 | //处理全部孕妇的情况 |
753 | 758 | data = convertToQuanPatient(patientses, userId, hospital); |
... | ... | @@ -1288,7 +1293,7 @@ |
1288 | 1293 | String hospital = autoMatchFacade.getHospitalId(userId); |
1289 | 1294 | |
1290 | 1295 | //组合请求 |
1291 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
1296 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
1292 | 1297 | |
1293 | 1298 | |
1294 | 1299 | //查询符合条件的孕妇 |
... | ... | @@ -1361,7 +1366,7 @@ |
1361 | 1366 | riskPatientsQueryRequest.setLastCheckDoctorId(String.valueOf(userId)); |
1362 | 1367 | }*/ |
1363 | 1368 | //组合请求 |
1364 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
1369 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
1365 | 1370 | |
1366 | 1371 | //查询符合条件的孕妇 |
1367 | 1372 | StopWatch stopWatch = new StopWatch("queryPatient1 -" + hospital); |
... | ... | @@ -1466,7 +1471,7 @@ |
1466 | 1471 | }*/ |
1467 | 1472 | |
1468 | 1473 | //组合请求 |
1469 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
1474 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
1470 | 1475 | |
1471 | 1476 | |
1472 | 1477 | //查询符合条件的孕妇 |
... | ... | @@ -1544,7 +1549,7 @@ |
1544 | 1549 | }*/ |
1545 | 1550 | |
1546 | 1551 | //组合请求 |
1547 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
1552 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
1548 | 1553 | |
1549 | 1554 | |
1550 | 1555 | //查询符合条件的孕妇 |
... | ... | @@ -1599,7 +1604,7 @@ |
1599 | 1604 | }*/ |
1600 | 1605 | |
1601 | 1606 | //组合请求 |
1602 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
1607 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
1603 | 1608 | |
1604 | 1609 | |
1605 | 1610 | //查询符合条件的孕妇 |
... | ... | @@ -1696,7 +1701,7 @@ |
1696 | 1701 | }*/ |
1697 | 1702 | |
1698 | 1703 | //组合请求 |
1699 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
1704 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
1700 | 1705 | |
1701 | 1706 | |
1702 | 1707 | //查询符合条件的孕妇 |
... | ... | @@ -1790,7 +1795,7 @@ |
1790 | 1795 | }*/ |
1791 | 1796 | //riskPatientsQueryRequest.sethId(hospital); |
1792 | 1797 | //组合请求 |
1793 | - PatientsQuery patientsQuery= complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion);/*= new PatientsQuery();*/ | |
1798 | + PatientsQuery patientsQuery= complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital);/*= new PatientsQuery();*/ | |
1794 | 1799 | /*patientsQuery.setHospitalId(hospital); |
1795 | 1800 | patientsQuery.setNeed(needPage); |
1796 | 1801 | patientsQuery.setType(type); |
... | ... | @@ -1877,7 +1882,7 @@ |
1877 | 1882 | }*/ |
1878 | 1883 | |
1879 | 1884 | //组合请求 |
1880 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
1885 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
1881 | 1886 | |
1882 | 1887 | //查询符合条件的孕妇 |
1883 | 1888 | StopWatch stopWatch = new StopWatch("queryPatient1 -" + hospital); |
... | ... | @@ -1978,7 +1983,7 @@ |
1978 | 1983 | riskPatientsQueryRequest.setLastCheckDoctorId(String.valueOf(userId)); |
1979 | 1984 | }*/ |
1980 | 1985 | //组合请求 |
1981 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
1986 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
1982 | 1987 | |
1983 | 1988 | //查询符合条件的孕妇 |
1984 | 1989 | StopWatch stopWatch = new StopWatch("queryPatient1 -" + hospital); |
1985 | 1990 | |
1986 | 1991 | |
1987 | 1992 | |
1988 | 1993 | |
1989 | 1994 | |
1990 | 1995 | |
... | ... | @@ -2036,23 +2041,25 @@ |
2036 | 2041 | |
2037 | 2042 | |
2038 | 2043 | public BaseResponse queryHighRisk1(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) { |
2044 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
2039 | 2045 | //组合请求 |
2040 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
2046 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
2041 | 2047 | |
2042 | - String hospital = autoMatchFacade.getHospitalId(userId); | |
2043 | 2048 | //查询符合条件的孕妇 |
2044 | 2049 | StopWatch stopWatch = new StopWatch("queryPatient2 -" + hospital); |
2045 | 2050 | stopWatch.start(); |
2046 | 2051 | List <Patients> patientses = patientsService.queryPatient1(patientsQuery, "modified"); |
2047 | 2052 | stopWatch.stop(); |
2048 | 2053 | |
2049 | - logger.info(stopWatch.toString()); | |
2054 | + //logger.info(stopWatch.toString()); | |
2050 | 2055 | List data = new ArrayList <>(); |
2056 | + PageInfo pageInfo= patientsQuery.getPageInfo(); | |
2051 | 2057 | if (CollectionUtils.isNotEmpty(patientses)) { |
2052 | 2058 | //如果是查高危孕妇 |
2053 | - data = convertToHighRisk(patientses, userId, hospital); | |
2059 | + data = convertToHighRisk(patientses, userId, hospital,riskPatientsQueryRequest.getrLevel(),pageInfo); | |
2060 | + // pageInfo.setCount(data.size()); | |
2054 | 2061 | } |
2055 | - return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data).setPageInfo(patientsQuery.getPageInfo()); | |
2062 | + return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data).setPageInfo(pageInfo); | |
2056 | 2063 | } |
2057 | 2064 | |
2058 | 2065 | public BaseResponse findPatient(PatientQueryRequest patientQueryRequest, Integer userId) { |
... | ... | @@ -2373,7 +2380,7 @@ |
2373 | 2380 | * @param patientses |
2374 | 2381 | * @return |
2375 | 2382 | */ |
2376 | - private List convertToHighRisk(List <Patients> patientses, Integer userId, String hospital) { | |
2383 | + private List convertToHighRisk(List <Patients> patientses, Integer userId, String hospital,String level,PageInfo pageInfo) { | |
2377 | 2384 | List<RiskPatientsResult> data = new ArrayList <>(); |
2378 | 2385 | int batchSize = 4; |
2379 | 2386 | int end = 0; |
... | ... | @@ -2383,7 +2390,8 @@ |
2383 | 2390 | if (end > patientses.size()) { |
2384 | 2391 | end = patientses.size(); |
2385 | 2392 | } |
2386 | - listFuture.add(commonThreadPool.submit(new WorkHR(patientses.subList(i, end), usersService, hospital, basicConfigService, antExService, patientsService, organizationService,couponService))); | |
2393 | + listFuture.add(commonThreadPool.submit(new WorkHR(patientses.subList(i, end), usersService, hospital, basicConfigService, antExService, patientsService, organizationService, | |
2394 | + couponService,level,pageInfo))); | |
2387 | 2395 | } |
2388 | 2396 | for (Future f : listFuture) { |
2389 | 2397 | try { |
... | ... | @@ -2398,7 +2406,6 @@ |
2398 | 2406 | result.setRealPhone(StringUtils.encryPhone(result.getRealPhone())); |
2399 | 2407 | } |
2400 | 2408 | } |
2401 | - | |
2402 | 2409 | return data; |
2403 | 2410 | } |
2404 | 2411 | |
... | ... | @@ -4123,7 +4130,7 @@ |
4123 | 4130 | private CouponService couponService; |
4124 | 4131 | |
4125 | 4132 | public BaseResponse queryAnxtchuCount(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) { |
4126 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
4133 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,null); | |
4127 | 4134 | patientsQuery.setGcdfDoctorId(riskPatientsQueryRequest.getGcdfDoctorId());//分娩记录加住院管床大夫 |
4128 | 4135 | |
4129 | 4136 | if ("lp".equals(riskPatientsQueryRequest.getHstart())) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
8914a8c
... | ... | @@ -467,7 +467,7 @@ |
467 | 467 | //包含国家高危的自定义高危人数 |
468 | 468 | int otherPatientCount = patientsService.queryPatientCount(query); |
469 | 469 | |
470 | - System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString()); | |
470 | + // System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString()); | |
471 | 471 | //总的孕妇条数(国家标准高危) |
472 | 472 | int allPatientCount = patientsService.queryPatientCount(patientsQuery); |
473 | 473 | // allPatientCount += riskPatientCount; |
... | ... | @@ -502,7 +502,7 @@ |
502 | 502 | Callable c = new HiskCountTask(basicConfigService, |
503 | 503 | patientsService, levelConfig, |
504 | 504 | patientsQuery, |
505 | - allPatientCount); | |
505 | + allPatientCount,hospitalId); | |
506 | 506 | Future f = commonThreadPool.submit(c); |
507 | 507 | futures.add(f); |
508 | 508 | } |
... | ... | @@ -533,7 +533,7 @@ |
533 | 533 | } |
534 | 534 | } |
535 | 535 | for (RiskReportResult bs : mainRiskReportResults) { |
536 | - System.out.println(bs); | |
536 | + //System.out.println(bs); | |
537 | 537 | configData(bs, slaveBasicConfigMap, allPatientCount); |
538 | 538 | } |
539 | 539 | } |
... | ... | @@ -676,8 +676,8 @@ |
676 | 676 | //生成层级关系 |
677 | 677 | public void configData(RiskReportResult bs, Map<String, List<RiskReportResult>> slaveBasicConfigMap, int allPatientCount) { |
678 | 678 | if (slaveBasicConfigMap.containsKey(bs.getHighRiskId())) { |
679 | - bs.setRiskReportResults(slaveBasicConfigMap.get(bs.getHighRiskId())); | |
680 | - for (RiskReportResult basicConfig : bs.getRiskReportResults()) { | |
679 | + // bs.setRiskReportResults(slaveBasicConfigMap.get(bs.getHighRiskId())); | |
680 | + for (RiskReportResult basicConfig : slaveBasicConfigMap.get(bs.getHighRiskId())) { | |
681 | 681 | basicConfig.setLevel(bs.getLevel() + 1); |
682 | 682 | |
683 | 683 | DecimalFormat df = new DecimalFormat("0.00"); |
... | ... | @@ -691,7 +691,7 @@ |
691 | 691 | percent = bs.getRiskCount() > 0 ? df.format((double) bs.getRiskCount() / allPatientCount * 100) + "%" : "0%"; |
692 | 692 | bs.setPercent(percent); |
693 | 693 | } |
694 | - bs.setRiskReportResults(null); | |
694 | + //bs.setRiskReportResults(null); | |
695 | 695 | } |
696 | 696 | } |
697 | 697 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java
View file @
8914a8c
1 | 1 | package com.lyms.platform.operate.web.result; |
2 | 2 | |
3 | 3 | import com.lyms.platform.common.base.IBasicResultConvert; |
4 | +import com.lyms.platform.common.base.PageInfo; | |
4 | 5 | import com.lyms.platform.common.enums.ServiceStatusEnums; |
5 | 6 | import com.lyms.platform.common.enums.ServiceTypeEnums; |
6 | 7 | import com.lyms.platform.common.utils.DateUtil; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/HiskCountTask.java
View file @
8914a8c
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | import com.lyms.platform.common.utils.ExceptionUtils; |
7 | 7 | import com.lyms.platform.operate.web.result.RiskReportResult; |
8 | 8 | import com.lyms.platform.pojo.BasicConfig; |
9 | +import com.lyms.platform.pojo.Patients; | |
9 | 10 | import com.lyms.platform.query.BasicConfigQuery; |
10 | 11 | import com.lyms.platform.query.PatientsQuery; |
11 | 12 | import org.apache.commons.collections.CollectionUtils; |
12 | 13 | |
13 | 14 | |
... | ... | @@ -28,16 +29,18 @@ |
28 | 29 | private BasicConfig levelConfig; |
29 | 30 | private PatientsQuery patientsQuery; |
30 | 31 | private int allPatientCount; |
32 | + private String hospitalId; | |
31 | 33 | |
32 | 34 | public HiskCountTask(BasicConfigService basicConfigService, |
33 | 35 | PatientsService patientsService, BasicConfig levelConfig, |
34 | 36 | PatientsQuery patientsQuery, |
35 | - int allPatientCount) { | |
37 | + int allPatientCount,String hospitalId) { | |
36 | 38 | this.basicConfigService = basicConfigService; |
37 | 39 | this.patientsService = patientsService; |
38 | 40 | this.levelConfig = levelConfig; |
39 | 41 | this.patientsQuery = patientsQuery; |
40 | 42 | this.allPatientCount = allPatientCount; |
43 | + this.hospitalId=hospitalId; | |
41 | 44 | } |
42 | 45 | |
43 | 46 | @Override |
44 | 47 | |
45 | 48 | |
46 | 49 | |
47 | 50 | |
... | ... | @@ -87,16 +90,34 @@ |
87 | 90 | query.setBookbuildingDateEnd(patientsQuery.getBookbuildingDateEnd()); |
88 | 91 | |
89 | 92 | query.setrFactor(config.getId()); |
90 | - | |
91 | 93 | query.setType(patientsQuery.getType()); |
94 | + int riskPatientCount =0; | |
95 | + RiskReportResult risk = new RiskReportResult(); | |
96 | + if ("2100002419".equals(hospitalId)){ | |
97 | + //大同特殊处理 | |
98 | + List<Patients> list= patientsService.queryPatient(query); | |
99 | + riskPatientCount=list.size(); | |
100 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(list)){ | |
101 | + for (Patients patients:list){ | |
102 | + if (patients.getRiskFactorId().size()>1){ | |
103 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
104 | + basicConfigQuery.setYn(1); | |
105 | + basicConfigQuery.setIds(patients.getRiskFactorId()); | |
106 | + List<BasicConfig> configList= basicConfigService.queryBasicConfig(basicConfigQuery); | |
107 | + riskPatientCount+=getConfig(config.getParentId(),configList); | |
108 | + } | |
109 | + } | |
110 | + } | |
111 | + risk.setPid(config.getParentId()); | |
112 | + }else { | |
113 | + //单个高危因素孕产妇条数 | |
114 | + riskPatientCount = patientsService.queryPatientCount(query); | |
115 | + risk.setPid(config.getpId()); | |
116 | + } | |
92 | 117 | |
93 | - //单个高危因素孕产妇条数 | |
94 | - int riskPatientCount = patientsService.queryPatientCount(query); | |
95 | 118 | |
96 | - RiskReportResult risk = new RiskReportResult(); | |
97 | 119 | risk.setHighRiskId(config.getId()); |
98 | 120 | risk.setHighRisk(config.getName()); |
99 | - risk.setPid(config.getpId()); | |
100 | 121 | risk.setRiskCount(riskPatientCount); |
101 | 122 | |
102 | 123 | // DecimalFormat df = new DecimalFormat("0.00"); |
... | ... | @@ -138,5 +159,36 @@ |
138 | 159 | } |
139 | 160 | |
140 | 161 | |
162 | + private Integer getConfig(String parentId,List<BasicConfig> configList){ | |
163 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(configList)){ | |
164 | + for (BasicConfig basicConfig:configList){ | |
165 | + String pId=basicConfig.getParentId(); | |
166 | + //黄色 | |
167 | + if ("315107bd-91fe-42a1-9237-752f3c046a40".equals(parentId)){ | |
168 | + if ("315107bd-91fe-42a1-9237-752f3c046a40".equals(pId)){ | |
169 | + continue; | |
170 | + }else { | |
171 | + if (!"224b2329-cb82-4da3-a071-8527f8283aab".equals(parentId)){ | |
172 | + return -1; | |
173 | + } | |
174 | + } | |
175 | + //橙色 | |
176 | + }else if ("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2".equals(parentId)){ | |
177 | + if ("eb146c03-b19f-4e28-b85f-fda574b2283b".equals(pId)){ | |
178 | + return -1; | |
179 | + } | |
180 | + } | |
181 | + } | |
182 | + return 0; | |
183 | + } | |
184 | + return -1; | |
185 | + } | |
186 | + /* 315107bd-91fe-42a1-9237-752f3c046a40 黄色 | |
187 | + | |
188 | +49a36aea-c5b6-4162-87d2-9eb3c6ec00c2 橙色 | |
189 | + | |
190 | + eb146c03-b19f-4e28-b85f-fda574b2283b 红色 | |
191 | + | |
192 | +224b2329-cb82-4da3-a071-8527f8283aab 紫色*/ | |
141 | 193 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
View file @
8914a8c
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | import com.lyms.platform.biz.service.AntenatalExaminationService; |
4 | 4 | import com.lyms.platform.biz.service.BasicConfigService; |
5 | 5 | import com.lyms.platform.biz.service.PatientsService; |
6 | +import com.lyms.platform.common.base.PageInfo; | |
6 | 7 | import com.lyms.platform.common.enums.ServiceStatusEnums; |
7 | 8 | import com.lyms.platform.common.enums.ServiceTypeEnums; |
8 | 9 | import com.lyms.platform.common.enums.YnEnums; |
9 | 10 | |
... | ... | @@ -54,12 +55,14 @@ |
54 | 55 | private PatientsService patientsService; |
55 | 56 | private CouponService couponService; |
56 | 57 | private OrganizationService organizationService; |
58 | + private String level; | |
59 | + private PageInfo pageInfo; | |
57 | 60 | |
58 | 61 | public WorkHR(List<Patients> patientses, UsersService usersService, String hospital, |
59 | 62 | BasicConfigService basicConfigService, |
60 | 63 | AntenatalExaminationService antExService, PatientsService patientsService, |
61 | 64 | OrganizationService organizationService, |
62 | - CouponService couponService) { | |
65 | + CouponService couponService,String level,PageInfo pageInfo) { | |
63 | 66 | this.couponService = couponService; |
64 | 67 | this.patientses = patientses; |
65 | 68 | this.usersService = usersService; |
... | ... | @@ -68,6 +71,8 @@ |
68 | 71 | this.antExService = antExService; |
69 | 72 | this.patientsService = patientsService; |
70 | 73 | this.organizationService = organizationService; |
74 | + this.level=level; | |
75 | + this.pageInfo=pageInfo; | |
71 | 76 | } |
72 | 77 | |
73 | 78 | public List<RiskPatientsResult> call() { |
... | ... | @@ -76,6 +81,36 @@ |
76 | 81 | AntExChuQuery antExChuQuery1 = new AntExChuQuery(); |
77 | 82 | for (Patients patients : patientses) { |
78 | 83 | StopWatch stopWatch = new StopWatch("WorkHR -" + patients.getId()); |
84 | + if (StringUtils.isNotEmpty(level)&&"2100002419".equals(hospital)){ | |
85 | + List<String> riskLevels= JsonUtil.patientRiskLevelIdToList(patients.getRiskLevelId()); | |
86 | + if (riskLevels.size()>1){ | |
87 | + boolean b=false; | |
88 | + //针对大同【孕产婴】【统计管理】中,即当个体拥有多个不同级别的风险标识时,以最高风险级别的标识为准进行统计。 | |
89 | + // 等级体系从低到高依次是:绿色(健康);黄色(一般风险);橙色(较高风险);红色(高风险);紫色(传染性疾病)。 | |
90 | + //紫色合并处理 | |
91 | + for (String str:riskLevels){ | |
92 | + if ("315107bd-91fe-42a1-9237-752f3c046a40".equals(level)){ | |
93 | + if ("315107bd-91fe-42a1-9237-752f3c046a40".equals(str)){ | |
94 | + continue; | |
95 | + }else { | |
96 | + if (!"224b2329-cb82-4da3-a071-8527f8283aab".equals(str)){ | |
97 | + b=true; | |
98 | + } | |
99 | + } | |
100 | + //橙色 | |
101 | + }else if ("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2".equals(level)){ | |
102 | + if ("eb146c03-b19f-4e28-b85f-fda574b2283b".equals(str)){ | |
103 | + b=true; | |
104 | + } | |
105 | + } | |
106 | + } | |
107 | + if (b){ | |
108 | + pageInfo.setCount(pageInfo.getCount()-1); | |
109 | + continue; | |
110 | + } | |
111 | + } | |
112 | + } | |
113 | + | |
79 | 114 | RiskPatientsResult riskPatientsResult = new RiskPatientsResult(); |
80 | 115 | riskPatientsResult.convertToResult(patients); |
81 | 116 | riskPatientsResult.setVcCardNo(patients.getVcCardNo()); |