Commit 190f3ae331f7ed7d7464fe710131a2effa8388f2
1 parent
67bee5ea95
Exists in
dev
#fix:心中五色专案管理模块
Showing 16 changed files with 296 additions and 53 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BasicConfig.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/constant/OrganizationConstant.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RiskReportController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.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/utils/FileUtils.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/PatientRelateMemberUtil.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/ChaseVisitHistory.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
View file @
190f3ae
... | ... | @@ -358,7 +358,7 @@ |
358 | 358 | query.setEnable(1); |
359 | 359 | List<BasicConfig> list = mongoTemplate.find(query.convertToQuery().convertToMongoQuery(), BasicConfig.class); |
360 | 360 | for (BasicConfig config : list) { |
361 | - System.out.println(config.getName()); | |
361 | + // System.out.println(config.getName()); | |
362 | 362 | query.setParentId(config.getId()); |
363 | 363 | List<BasicConfig> sublist = mongoTemplate.find(query.convertToQuery().convertToMongoQuery(), BasicConfig.class); |
364 | 364 | // for (BasicConfig sub:sublist) { |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
190f3ae
... | ... | @@ -122,7 +122,7 @@ |
122 | 122 | patientsQuery.mysqlBuild(iPatientDao.queryPatientCount(query)); |
123 | 123 | query.start(patientsQuery.getOffset()).end(patientsQuery.getLimit()); |
124 | 124 | } |
125 | - | |
125 | + //System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString()); | |
126 | 126 | return iPatientDao.queryPatient(query.addOrder(Sort.Direction.DESC, field)); |
127 | 127 | } |
128 | 128 | |
... | ... | @@ -142,6 +142,7 @@ |
142 | 142 | } |
143 | 143 | |
144 | 144 | public int queryPatientCount(PatientsQuery patientsQuery) { |
145 | + System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString()); | |
145 | 146 | return iPatientDao.queryPatientCount(patientsQuery.convertToQuery()); |
146 | 147 | } |
147 | 148 |
platform-dal/src/main/java/com/lyms/platform/pojo/BasicConfig.java
View file @
190f3ae
... | ... | @@ -211,17 +211,26 @@ |
211 | 211 | |
212 | 212 | public Map<String, Object> replenRisk(Map<String, Object> map){ |
213 | 213 | map.put("id", id); |
214 | - if (name.indexOf("黄色") > -1) { | |
215 | - name = "黄色"; | |
216 | - }else if (name.indexOf("橙色") > -1) { | |
217 | - name = "橙色"; | |
218 | - }else if (name.indexOf("红色") > -1) { | |
219 | - name = "红色"; | |
220 | - }else if (name.indexOf("紫色") > -1) { | |
221 | - name = "紫色"; | |
214 | + if ( name.split("-").length>1){ | |
215 | + String [] arrays= name.split("-"); | |
216 | + String color=""; | |
217 | + for (int i = 0,j=arrays.length; i < j ; i++) { | |
218 | + color+= "risk_"+RiskDefaultTypeEnum.getColor(arrays[i])+"."; | |
219 | + } | |
220 | + map.put("color", color); | |
221 | + }else { | |
222 | + if (name.indexOf("黄色") > -1) { | |
223 | + name = "黄色"; | |
224 | + }else if (name.indexOf("橙色") > -1) { | |
225 | + name = "橙色"; | |
226 | + }else if (name.indexOf("红色") > -1) { | |
227 | + name = "红色"; | |
228 | + }else if (name.indexOf("紫色") > -1) { | |
229 | + name = "紫色"; | |
230 | + } | |
231 | + map.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name)); | |
222 | 232 | } |
223 | 233 | map.put("name", name); |
224 | - map.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name)); | |
225 | 234 | return map; |
226 | 235 | } |
227 | 236 |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
190f3ae
... | ... | @@ -453,6 +453,7 @@ |
453 | 453 | private boolean dtFm=false; |
454 | 454 | |
455 | 455 | private String allPats; |
456 | + private MongoCondition condition2; | |
456 | 457 | |
457 | 458 | public String getAllPats() { |
458 | 459 | return allPats; |
... | ... | @@ -1319,7 +1320,37 @@ |
1319 | 1320 | } |
1320 | 1321 | |
1321 | 1322 | }else { |
1322 | - condition = condition.and("riskLevelId", rLevel, MongoOper.LIKE); | |
1323 | + String [] strs= allPats.split(","); | |
1324 | + //针对单颜色级别处理 如果是单颜色level是1查询包含此颜色及紫色的所有数据 | |
1325 | + if(strs.length>1){ | |
1326 | + if ("1".equals(strs[1]) && !"224b2329-cb82-4da3-a071-8527f8283aab".equals(rLevel)){ | |
1327 | + List<String> riskLevelIds=new ArrayList<>(); | |
1328 | + riskLevelIds.add(rLevel); | |
1329 | + MongoCondition c = MongoCondition.newInstance(); | |
1330 | + MongoCondition condition1 = MongoCondition.newInstance("riskLevelId", JsonUtil.array2JsonString(riskLevelIds), MongoOper.IS); | |
1331 | + | |
1332 | + riskLevelIds.add("224b2329-cb82-4da3-a071-8527f8283aab"); | |
1333 | + | |
1334 | + MongoCondition condition2 = MongoCondition.newInstance("riskLevelId",JsonUtil.array2JsonString(riskLevelIds), MongoOper.IS); | |
1335 | + riskLevelIds.clear(); | |
1336 | + | |
1337 | + riskLevelIds.add("224b2329-cb82-4da3-a071-8527f8283aab"); | |
1338 | + riskLevelIds.add(rLevel); | |
1339 | + MongoCondition condition3 = MongoCondition.newInstance("riskLevelId",JsonUtil.array2JsonString(riskLevelIds), MongoOper.IS); | |
1340 | + if (c1 != null) { | |
1341 | + c1 = c1.andOperator(c.orCondition(new MongoCondition[]{condition1, condition2,condition3}).getCriteria()); | |
1342 | + } else { | |
1343 | + c1 = c.orCondition(new MongoCondition[]{condition1, condition2,condition3}).getCriteria(); | |
1344 | + } | |
1345 | + }else { | |
1346 | + List<String> riskLevelIds=new ArrayList<>(); | |
1347 | + riskLevelIds.add(rLevel); | |
1348 | + condition = condition.and("riskLevelId", JsonUtil.array2JsonString(riskLevelIds), MongoOper.IS); | |
1349 | + } | |
1350 | + }else { | |
1351 | + condition = condition.and("riskLevelId", rLevel, MongoOper.LIKE); | |
1352 | + } | |
1353 | + | |
1323 | 1354 | } |
1324 | 1355 | |
1325 | 1356 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/constant/OrganizationConstant.java
View file @
190f3ae
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
View file @
190f3ae
... | ... | @@ -504,9 +504,9 @@ |
504 | 504 | @RequestMapping(method = RequestMethod.GET, value = "/dt/appointment") |
505 | 505 | @ResponseBody |
506 | 506 | public BaseResponse getAppointment(@RequestHeader("Authorization")String authorization, |
507 | - @RequestParam(required = true) String doctor, | |
508 | - @RequestParam(required = true) String startTime, | |
509 | - @RequestParam(required = true) String endTime, | |
507 | + @RequestParam String doctor, | |
508 | + @RequestParam String startTime, | |
509 | + @RequestParam String endTime, | |
510 | 510 | @RequestParam(required = false) String name, |
511 | 511 | @RequestParam(required = false) String doctorName |
512 | 512 | |
... | ... | @@ -581,8 +581,8 @@ |
581 | 581 | params.put("doctor",doctor); |
582 | 582 | params.put("ksrq",date); |
583 | 583 | params.put("jsrq",date); |
584 | - String str= HttpClientUtil.doGet("http://192.168.5.23:9090/dtdyrm/getdtAppointment" ,params,"utf-8",null); | |
585 | - System.out.println(str); | |
584 | + HttpClientUtil.doGet("http://192.168.5.23:9090/dtdyrm/getdtAppointment" ,params,"utf-8",null); | |
585 | + //System.out.println(str); | |
586 | 586 | return new BaseResponse(); |
587 | 587 | } |
588 | 588 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
190f3ae
... | ... | @@ -113,7 +113,7 @@ |
113 | 113 | @TokenRequired |
114 | 114 | public BaseResponse queryAllPatPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest, HttpServletRequest request) { |
115 | 115 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
116 | - patientsQueryRequest.setAllPats("allPats"); | |
116 | + // patientsQueryRequest.setAllPats("allPats"); | |
117 | 117 | return patientFacade.queryHighRisk1(patientsQueryRequest, null, null, loginState.getId(), null, Boolean.FALSE); |
118 | 118 | } |
119 | 119 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RiskReportController.java
View file @
190f3ae
... | ... | @@ -75,6 +75,21 @@ |
75 | 75 | return riskReportFacade.queryRiskReportCount(patientsQueryRequest,loginState.getId()); |
76 | 76 | |
77 | 77 | } |
78 | + | |
79 | + /** | |
80 | + * 五色管理专案 | |
81 | + * @return | |
82 | + */ | |
83 | + @RequestMapping(method = RequestMethod.GET, value = "/queryRiskCount") | |
84 | + @ResponseBody | |
85 | + @TokenRequired | |
86 | + public BaseResponse queryRiskCount(@Valid RiskPatientsQueryRequest patientsQueryRequest,HttpServletRequest request) { | |
87 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
88 | + return riskReportFacade.queryRiskCount(patientsQueryRequest,loginState.getId()); | |
89 | + | |
90 | + } | |
91 | + | |
92 | + | |
78 | 93 | /** |
79 | 94 | * 院内高危统计报表 左 导出 |
80 | 95 | * @return |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
190f3ae
... | ... | @@ -517,9 +517,9 @@ |
517 | 517 | antExRecordQuery.setHospitalId(hospital); |
518 | 518 | //antExRecordQuery.setType(1);//???? |
519 | 519 | List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery, Sort.Direction.DESC, "created"); |
520 | - System.out.println("1 获取这段时间的产检条数------" + antExRecordModelList.size()); | |
520 | + // System.out.println("1 获取这段时间的产检条数------" + antExRecordModelList.size()); | |
521 | 521 | Map<String, List<AntExRecordModel>> map = handleAntexRecord2(antExRecordModelList); |
522 | - System.out.println("2 将产检内容按照人存储,一个人可以多条-------" + map.size()); | |
522 | + // System.out.println("2 将产检内容按照人存储,一个人可以多条-------" + map.size()); | |
523 | 523 | if (map != null && map.size() > 0) { |
524 | 524 | int conut = 0; |
525 | 525 | String name = null; |
... | ... | @@ -533,7 +533,7 @@ |
533 | 533 | |
534 | 534 | if (CollectionUtils.isNotEmpty(valueList)) { |
535 | 535 | ListSort(valueList);//升序 |
536 | - System.out.println("3 单个孕妇产检数总数1---" + valueList.size()); | |
536 | + // System.out.println("3 单个孕妇产检数总数1---" + valueList.size()); | |
537 | 537 | AntExRecordModel antExRecordModel = valueList.get(0); |
538 | 538 | name = antExRecordModel.getName(); |
539 | 539 | carno = antExRecordModel.getCardNo(); |
... | ... | @@ -558,7 +558,7 @@ |
558 | 558 | czb = false;//复诊上面是初诊,下面比对新增高危时候就不直接添加上这个初诊了 |
559 | 559 | } |
560 | 560 | } |
561 | - System.out.println("4 单个孕妇产检数总数2---" + valueList.size()); | |
561 | + // System.out.println("4 单个孕妇产检数总数2---" + valueList.size()); | |
562 | 562 | ListSort(valueList); |
563 | 563 | |
564 | 564 | //遍历个人产检记录list,获取产检高危因素、其它高危,剔除健康高危 |
... | ... | @@ -596,7 +596,7 @@ |
596 | 596 | |
597 | 597 | } |
598 | 598 | } |
599 | - System.out.println("5 孕妇:"+ name +"身份证:"+ carno + ",高危添加总数---" + conut); //现在统计个数完全正确$$$$ | |
599 | + // System.out.println("5 孕妇:"+ name +"身份证:"+ carno + ",高危添加总数---" + conut); //现在统计个数完全正确$$$$ | |
600 | 600 | List<RiskStatisticsResult> riskStatisticsResults = new ArrayList<>(); |
601 | 601 | for (String bcid: incrHrisk ) { |
602 | 602 | if(bcid.contains("###")){ |
... | ... | @@ -617,7 +617,7 @@ |
617 | 617 | rsr.setColor(hosptialHighRisk.getColorName()); |
618 | 618 | } |
619 | 619 | riskStatisticsResults.add(rsr); |
620 | - System.out.println(rsr.toString()); | |
620 | + // System.out.println(rsr.toString()); | |
621 | 621 | }else { |
622 | 622 | RiskStatisticsResult rsr = new RiskStatisticsResult(); |
623 | 623 | /*if(bcid.contains("fzgw@")){ |
624 | 624 | |
... | ... | @@ -635,13 +635,13 @@ |
635 | 635 | rsr.setColor(HosptialHighRiskFacade.colorNameMap.get(colorCode)); |
636 | 636 | } |
637 | 637 | riskStatisticsResults.add(rsr); |
638 | - System.out.println(rsr.toString()); | |
638 | + // System.out.println(rsr.toString()); | |
639 | 639 | |
640 | 640 | } |
641 | 641 | |
642 | 642 | } |
643 | 643 | |
644 | - System.out.println("6 获取高危实体---- "+riskStatisticsResults.size()); | |
644 | + // System.out.println("6 获取高危实体---- "+riskStatisticsResults.size()); | |
645 | 645 | List<Map<String, Object>> datas = new ArrayList<>(); |
646 | 646 | if (CollectionUtils.isNotEmpty(riskStatisticsResults)) { |
647 | 647 | for (RiskStatisticsResult rsr : riskStatisticsResults) { |
... | ... | @@ -1277,7 +1277,7 @@ |
1277 | 1277 | |
1278 | 1278 | //antExRecordQuery.setLevelId(antExManagerQueryRequest.getLevel()); |
1279 | 1279 | List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery, Sort.Direction.DESC, "created"); |
1280 | - System.out.println("antExRecordModelList====================" + antExRecordModelList.size()); | |
1280 | + // System.out.println("antExRecordModelList====================" + antExRecordModelList.size()); | |
1281 | 1281 | Map<String, List<AntExRecordModel>> map = handleAntexRecord(antExRecordModelList); |
1282 | 1282 | AntExRecordQuery pageAntExRecordsQuery = new AntExRecordQuery(); |
1283 | 1283 | |
... | ... | @@ -1308,7 +1308,7 @@ |
1308 | 1308 | antExRecordQuery.setCheckTimeEnd(DateUtil.parseYMD(endDate)); |
1309 | 1309 | antExRecordQuery.setHospitalId(hospitalId); |
1310 | 1310 | List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery, Sort.Direction.DESC, "created"); |
1311 | - System.out.println("获取产检记录表 " + startDate + "到" + endDate + "共计条数:" + antExRecordModelList.size()); | |
1311 | + // System.out.println("获取产检记录表 " + startDate + "到" + endDate + "共计条数:" + antExRecordModelList.size()); | |
1312 | 1312 | |
1313 | 1313 | // 存储某个产检时间段,某个医院、高危数据 |
1314 | 1314 | List<AntExRecordModel> list1 = new ArrayList(); |
... | ... | @@ -1331,7 +1331,7 @@ |
1331 | 1331 | map.put(recordModel.getParentId(), list); |
1332 | 1332 | //初诊直接保存在 初诊list |
1333 | 1333 | if (recordModel.getType() == 2 && CollectionUtils.isNotEmpty(recordModel.gethRisk())) { |
1334 | - System.out.println("初诊entry.size():" + recordModel.getId()); | |
1334 | + // System.out.println("初诊entry.size():" + recordModel.getId()); | |
1335 | 1335 | getGwName(listgw, recordModel, false, null); |
1336 | 1336 | //删除map内容 |
1337 | 1337 | map.remove(recordModel.getParentId()); |
... | ... | @@ -1349,7 +1349,7 @@ |
1349 | 1349 | continue; |
1350 | 1350 | } |
1351 | 1351 | //复诊一次 |
1352 | - System.out.println("复诊一次entry.size():" + entry.size()); | |
1352 | + // System.out.println("复诊一次entry.size():" + entry.size()); | |
1353 | 1353 | if (entry.size() == 1) { |
1354 | 1354 | beforeRecordQuery.setParentId(entry.get(0).getParentId()); |
1355 | 1355 | beforeRecordQuery.setCheckTimeLt(entry.get(0).getCheckTime()); |
... | ... | @@ -1373,7 +1373,7 @@ |
1373 | 1373 | } |
1374 | 1374 | //复诊多次 |
1375 | 1375 | else { |
1376 | - System.out.println("复诊多次entry.size():" + entry.size()); | |
1376 | + // System.out.println("复诊多次entry.size():" + entry.size()); | |
1377 | 1377 | List<AntExRecordModel> entry1 = entry; |
1378 | 1378 | for (int i = 0; i < entry1.size(); i++) { |
1379 | 1379 | if (entry1.get(i).getCheckTime() != null) { |
... | ... | @@ -1438,7 +1438,7 @@ |
1438 | 1438 | } |
1439 | 1439 | |
1440 | 1440 | } |
1441 | - System.out.println("高危项目总计: " + listgw.size()); | |
1441 | + // System.out.println("高危项目总计: " + listgw.size()); | |
1442 | 1442 | return new BaseListResponse().setData(listgw).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
1443 | 1443 | } |
1444 | 1444 | |
... | ... | @@ -1485,7 +1485,7 @@ |
1485 | 1485 | if (end > parentIds.size()) { |
1486 | 1486 | end = parentIds.size(); |
1487 | 1487 | } |
1488 | - System.out.println("start:" + i + ",end:" + end); | |
1488 | + // System.out.println("start:" + i + ",end:" + end); | |
1489 | 1489 | final List<String> tempList = parentIds.subList(i, end); |
1490 | 1490 | listFuture.add(commonThreadPool.submit(new Callable() { |
1491 | 1491 | @Override |
1492 | 1492 | |
... | ... | @@ -1813,10 +1813,10 @@ |
1813 | 1813 | if (StringUtils.isNotEmpty(pid) && StringUtils.isNotEmpty(hospitalId)) { |
1814 | 1814 | if (isOpenAutoSaveAntenatal(hospitalId)) { |
1815 | 1815 | |
1816 | - System.out.println("inputWxData enter 1"); | |
1816 | + // System.out.println("inputWxData enter 1"); | |
1817 | 1817 | List<AntenatalExaminationModel> examinationModel = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId).and("yn").is(1)), AntenatalExaminationModel.class); |
1818 | 1818 | if (CollectionUtils.isNotEmpty(examinationModel)) { |
1819 | - System.out.println("inputWxData enter 2"); | |
1819 | + // System.out.println("inputWxData enter 2"); | |
1820 | 1820 | for (AntenatalExaminationModel model : examinationModel) { |
1821 | 1821 | if (StringUtils.isNotEmpty(DateUtil.getyyyy_MM_dd(model.getCheckDate())) && |
1822 | 1822 | DateUtil.getyyyy_MM_dd(new Date()).equals(DateUtil.getyyyy_MM_dd(model.getCheckDate()))) { |
... | ... | @@ -1878,7 +1878,7 @@ |
1878 | 1878 | } |
1879 | 1879 | } |
1880 | 1880 | if (falg) { |
1881 | - System.out.println("inputWxData enter chuzhen"); | |
1881 | + // System.out.println("inputWxData enter chuzhen"); | |
1882 | 1882 | //创建一条复诊记录 |
1883 | 1883 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId).and("type").is(1).and("yn").is(1)), Patients.class); |
1884 | 1884 | //当前医院没有档案,创建隐藏档案 |
... | ... | @@ -1897,7 +1897,7 @@ |
1897 | 1897 | } |
1898 | 1898 | } |
1899 | 1899 | if (null != patients) { |
1900 | - System.out.println("inputWxData enter patients"); | |
1900 | + // System.out.println("inputWxData enter patients"); | |
1901 | 1901 | AntExChuQuery antExChuQuery = new AntExChuQuery(); |
1902 | 1902 | antExChuQuery.setYn(YnEnums.YES.getId()); |
1903 | 1903 | antExChuQuery.setPid(patients.getPid()); |
... | ... | @@ -1905,7 +1905,7 @@ |
1905 | 1905 | antExChuQuery.setCheckTimeEnd(DateUtil.addWeek(patients.getLastMenses(),42)); |
1906 | 1906 | List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); |
1907 | 1907 | if (CollectionUtils.isNotEmpty(antExChuModels)) { |
1908 | - System.out.println("inputWxData enter antExChuModels"); | |
1908 | + // System.out.println("inputWxData enter antExChuModels"); | |
1909 | 1909 | AntExChuModel antExChuModel = antExChuModels.get(0); |
1910 | 1910 | |
1911 | 1911 | AntExAddRequest antExAddRequest = new AntExAddRequest(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
190f3ae
... | ... | @@ -2622,7 +2622,7 @@ |
2622 | 2622 | |
2623 | 2623 | //babyQuery.setHospitalIdList(groupsFacade.findGroupHospital(userId, false)); |
2624 | 2624 | // |
2625 | - System.out.println(babyModelQuery.convertToQuery().convertToMongoQuery().toString()); | |
2625 | + // System.out.println(babyModelQuery.convertToQuery().convertToMongoQuery().toString()); | |
2626 | 2626 | List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery); |
2627 | 2627 | |
2628 | 2628 | if (CollectionUtils.isNotEmpty(models)) { |
... | ... | @@ -3701,7 +3701,7 @@ |
3701 | 3701 | babyQuery.setQueryNo(request.getQueryNo()); |
3702 | 3702 | //滦平、隆化-儿保管理-全部 加健康/高危筛选 |
3703 | 3703 | babyQuery.setHealthHigh(null != request.getHealthHigh() ? request.getHealthHigh() : null); |
3704 | - System.out.println("========" + babyQuery.convertToQuery().convertToMongoQuery().toString()); | |
3704 | + // System.out.println("========" + babyQuery.convertToQuery().convertToMongoQuery().toString()); | |
3705 | 3705 | //用隆华新口腔模块中数据筛选 牙齿异常2项,口腔阳性 |
3706 | 3706 | if (null != request.getCyNumType() || null != request.getQcNumType() || StringUtils.isNotEmpty(request.getPositiveType())) { |
3707 | 3707 | babyQuery.setOralCheckYn(YnEnums.YES.getId()); |
... | ... | @@ -5685,7 +5685,7 @@ |
5685 | 5685 | map.put("age", DateUtil.getBabyMonthAge(babyModel.getBirth(), babyCheck.getCheckDate()));*/ |
5686 | 5686 | |
5687 | 5687 | } |
5688 | - System.out.println(dataMap.get("mainFoster")); | |
5688 | + // System.out.println(dataMap.get("mainFoster")); | |
5689 | 5689 | if ("0".equals(dataMap.get("mainFoster"))) { |
5690 | 5690 | dataMap.put("filiation", "父子"); |
5691 | 5691 | } else if ("1".equals(dataMap.get("mainFoster"))) { |
... | ... | @@ -5917,7 +5917,7 @@ |
5917 | 5917 | if (CollectionUtils.isEmpty(dbList)) { |
5918 | 5918 | BabyDiagnoseModel babyDiagnoseModel = model.convertToDataModel(); |
5919 | 5919 | babyDiagnoseService.addBabyDiagnose(babyDiagnoseModel); |
5920 | - System.out.println("handleBabyDiagnose success " + model.getBlh()); | |
5920 | + // System.out.println("handleBabyDiagnose success " + model.getBlh()); | |
5921 | 5921 | } |
5922 | 5922 | } catch (Exception e) { |
5923 | 5923 | ExceptionUtils.catchException(e, "handleBabyDiagnose error."); |
... | ... | @@ -5977,8 +5977,8 @@ |
5977 | 5977 | |
5978 | 5978 | String lrrqStart = DateUtil.getYyyyMMddHHssmm(start); |
5979 | 5979 | String lrrqEnd = DateUtil.getYyyyMMddHHssmm(end); |
5980 | - System.out.println("lrrqStart =" + lrrqStart); | |
5981 | - System.out.println("lrrqEnd =" + lrrqEnd); | |
5980 | + /* System.out.println("lrrqStart =" + lrrqStart); | |
5981 | + System.out.println("lrrqEnd =" + lrrqEnd);*/ | |
5982 | 5982 | // int size = handleBabyDiagnose(lrrqStart, lrrqEnd); |
5983 | 5983 | //秦皇岛诊断数据定时同步到mysql数据库中 |
5984 | 5984 | int size1 = handleBabyDiagnoseQhd(lrrqStart, lrrqEnd, "1"); |
... | ... | @@ -6016,7 +6016,7 @@ |
6016 | 6016 | babyModelQuery3.setMphone(phone); |
6017 | 6017 | babyModelQuery3.setBuildType(2); |
6018 | 6018 | List<BabyModel> babyModels = babyService.queryBabyWithQuery(babyModelQuery3); |
6019 | - System.out.println(babyModelQuery3.convertToQuery().convertToMongoQuery().toString()); | |
6019 | + //System.out.println(babyModelQuery3.convertToQuery().convertToMongoQuery().toString()); | |
6020 | 6020 | List<Map> datas = new ArrayList<>(); |
6021 | 6021 | if (CollectionUtils.isNotEmpty(babyModels)) { |
6022 | 6022 | for (BabyModel model : babyModels) { |
... | ... | @@ -6433,7 +6433,7 @@ |
6433 | 6433 | // babyCheckModelQuery.setBirthEnd(currentDate); |
6434 | 6434 | babyCheckModelQuery.setCheckDateStart(checkDateStart); |
6435 | 6435 | babyCheckModelQuery.setCheckDateEnd(DateUtil.getDayLastSecond(checkDateEnd)); |
6436 | - System.out.println(babyCheckModelQuery.convertToQuery().convertToMongoQuery().toString()); | |
6436 | + //System.out.println(babyCheckModelQuery.convertToQuery().convertToMongoQuery().toString()); | |
6437 | 6437 | //List<HashMap> hashMaps = babyCheckService.babyCheckBuildIdGroup(babyCheckModelQuery); |
6438 | 6438 | List<BabyCheckModel> checkModels = babyCheckService.queryBabyCheckRecord(babyCheckModelQuery); |
6439 | 6439 | List<Map> result = new ArrayList<>(); |
... | ... | @@ -6948,7 +6948,7 @@ |
6948 | 6948 | if (CollectionUtils.isNotEmpty(list)) { |
6949 | 6949 | //线程数 |
6950 | 6950 | int threadCount = list.size() % BATCH_SIZE == 0 ? list.size() / BATCH_SIZE : list.size() / BATCH_SIZE + 1; |
6951 | - System.out.println("threadCount = " + threadCount); | |
6951 | + // System.out.println("threadCount = " + threadCount); | |
6952 | 6952 | CountDownLatch countDownLatch = new CountDownLatch(threadCount); |
6953 | 6953 | int end = 0; |
6954 | 6954 | for (int i = 0; i < list.size(); i += BATCH_SIZE) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
190f3ae
... | ... | @@ -22,6 +22,7 @@ |
22 | 22 | import com.lyms.platform.common.result.BaseObjectResponse; |
23 | 23 | import com.lyms.platform.common.result.BaseResponse; |
24 | 24 | import com.lyms.platform.common.utils.*; |
25 | +import com.lyms.platform.operate.web.constant.OrganizationConstant; | |
25 | 26 | import com.lyms.platform.operate.web.request.*; |
26 | 27 | import com.lyms.platform.operate.web.result.*; |
27 | 28 | import com.lyms.platform.operate.web.service.ITrackDownService; |
... | ... | @@ -1335,7 +1336,7 @@ |
1335 | 1336 | public void bookbuildingSyncMsg() { |
1336 | 1337 | logger.info("bookbuildingMsg startup"); |
1337 | 1338 | List<String> hospitalList = new ArrayList<>(); |
1338 | - hospitalList.add("2100002419"); | |
1339 | + hospitalList.add(OrganizationConstant.TY_DT); | |
1339 | 1340 | hospitalList.add("1000000016"); |
1340 | 1341 | hospitalList.add("2100002421"); |
1341 | 1342 | hospitalList.add("1000000115"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
190f3ae
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | import com.lyms.platform.common.result.BaseObjectResponse; |
9 | 9 | import com.lyms.platform.common.result.BaseResponse; |
10 | 10 | import com.lyms.platform.common.utils.*; |
11 | +import com.lyms.platform.operate.web.constant.OrganizationConstant; | |
11 | 12 | import com.lyms.platform.operate.web.request.*; |
12 | 13 | import com.lyms.platform.operate.web.result.*; |
13 | 14 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
... | ... | @@ -1633,7 +1634,7 @@ |
1633 | 1634 | patientsQuery.setNeed("1"); |
1634 | 1635 | patientsQuery.setPage(statisticsQueryRequest.getPage()); |
1635 | 1636 | patientsQuery.setLimit(statisticsQueryRequest.getLimit()); |
1636 | - if ("2100002419".equals(hospitalId)){ | |
1637 | + if (OrganizationConstant.TY_DT.equals(hospitalId)){ | |
1637 | 1638 | patientsQuery.setArchive(true); |
1638 | 1639 | patientsQuery.setDtFm(true); |
1639 | 1640 | } |
... | ... | @@ -1879,7 +1880,7 @@ |
1879 | 1880 | try { |
1880 | 1881 | logger.info("sendServiceMsg startup"); |
1881 | 1882 | List<MsgRequest> messages = new ArrayList<>(); |
1882 | - final String hospitalId = "2100002419"; | |
1883 | + final String hospitalId = OrganizationConstant.TY_DT; | |
1883 | 1884 | MsgRequest request = new MsgRequest(); |
1884 | 1885 | String title = "五色管理提醒短信"; |
1885 | 1886 | String messageContent = "【大同市第一人民医院】提醒:请尽快完善信息享受五色高危管理服务,请点击以下链接截图保存二维码,用微信识别,关注“美生孕育”公众号,点击开通成功提醒《产科预约建档》,请您务必填写您就诊的医生姓名,信息填写完成后点击提交即可。等待10分钟就可以点击公众号的开通成功提醒《产科已有档案》,输入您建档时填写的姓名+手机号,获取验证码成功登录宝贝孕程小程序。请确保登录成功并持续关注“美生孕育”公众号,享受五色高危管理和个性化精准医疗服务。【https://dev-rp-api.healthbaby.com.cn/id_photo/2100002419/2100002419.png】"; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
190f3ae
... | ... | @@ -668,6 +668,190 @@ |
668 | 668 | } |
669 | 669 | |
670 | 670 | |
671 | + /** | |
672 | + * 五色管理 | |
673 | + * | |
674 | + * @return | |
675 | + */ | |
676 | + public BaseListResponse queryRiskCount(RiskPatientsQueryRequest riskPatientsQueryRequest, Integer userId) { | |
677 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
678 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
679 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
680 | + patientsQuery.setHospitalId(hospitalId); | |
681 | + if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getType())) { | |
682 | + if ("2".equals(riskPatientsQueryRequest.getType())) { | |
683 | + //1孕妇 | |
684 | + patientsQuery.setType(1); | |
685 | + if ("2100002419".equals(hospitalId)){ | |
686 | + patientsQuery.setDtFm(true); | |
687 | + } | |
688 | + } else if ("3".equals(riskPatientsQueryRequest.getType())) { | |
689 | + //3产妇 | |
690 | + patientsQuery.setType(3); | |
691 | + } | |
692 | + } | |
693 | + //产检医生 | |
694 | + patientsQuery.setLastCheckEmployeeId(patientsQuery.getLastCheckEmployeeId()); | |
695 | + //最后一次检查时间 | |
696 | + if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getLastCTime())) { | |
697 | + String nextDateStr = riskPatientsQueryRequest.getLastCTime(); | |
698 | + String[] dates = nextDateStr.split(" - "); | |
699 | + patientsQuery.setLastCTimeStart(DateUtil.parseYMD(dates[0])); | |
700 | + if (dates.length == 2) { | |
701 | + patientsQuery.setLastCTimeEnd(DateUtil.parseYMD(dates[1])); | |
702 | + } | |
703 | + } | |
704 | + | |
705 | + List<RiskReportResult> results = new ArrayList<>(); | |
706 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
707 | + basicConfigQuery.setYn(YnEnums.YES.getId()); | |
708 | + basicConfigQuery.setParentId(SystemConfig.HIGH_RISK_ID); | |
709 | + basicConfigQuery.setEnable(1); | |
710 | + basicConfigQuery.setId(riskPatientsQueryRequest.getrLevel()); | |
711 | + | |
712 | + List<BasicConfig> riskLevelConfig = basicConfigService.queryBasicConfig(basicConfigQuery); | |
713 | + if (CollectionUtils.isNotEmpty(riskLevelConfig)) { | |
714 | + riskLevelConfig=addRisk(riskLevelConfig); | |
715 | + for (BasicConfig levelConfig : riskLevelConfig) { | |
716 | + if ("e637b361-99cf-41eb-84f2-f0dab596e928".equals(levelConfig.getId())) { | |
717 | + continue; | |
718 | + } | |
719 | + //高危等级 | |
720 | + List<String> levelList= StringUtils.covertToList(levelConfig.getId(), String.class); | |
721 | + if (levelList.size()==1){ | |
722 | + if (StringUtils.isEmpty(levelConfig.getLevel())){ | |
723 | + levelConfig.setLevel("1"); | |
724 | + } | |
725 | + //针对与单颜色做特殊处理 | |
726 | + patientsQuery.setAllPats("allPats,"+levelConfig.getLevel()); | |
727 | + }else { | |
728 | + patientsQuery.setAllPats(""); | |
729 | + } | |
730 | + patientsQuery.setrLevel(levelConfig.getId()); | |
731 | + int allPatientCount = patientsService.queryPatientCount(patientsQuery); | |
732 | + if (allPatientCount>0){ | |
733 | + RiskReportResult risk = new RiskReportResult(); | |
734 | + risk.setLevel(Integer.valueOf(levelConfig.getLevel())); | |
735 | + risk.setHighRiskId(levelConfig.getId()); | |
736 | + risk.setHighRisk(levelConfig.getName()); | |
737 | + risk.setPid(levelConfig.getpId()); | |
738 | + risk.setRiskCount(allPatientCount); | |
739 | + Map map = new HashMap(); | |
740 | + levelConfig.replenRisk(map); | |
741 | + risk.setHighLevel(Arrays.asList(new Map[]{map})); | |
742 | + results.add(risk); | |
743 | + } | |
744 | + } | |
745 | + } | |
746 | + return new BaseListResponse() | |
747 | + .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(results); | |
748 | + } | |
749 | + | |
750 | + private static List<BasicConfig> basicConfigs; | |
751 | + | |
752 | + private static List<BasicConfig> addRisk(List<BasicConfig> basicConfigList){ | |
753 | + | |
754 | + if (CollectionUtils.isNotEmpty(basicConfigs)){ | |
755 | + return basicConfigs; | |
756 | + }else { | |
757 | + basicConfigs=new ArrayList<>(); | |
758 | + } | |
759 | + | |
760 | + BasicConfig h =new BasicConfig(); | |
761 | + h.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
762 | + h.setLevel("2"); | |
763 | + h.setName("黄色"); | |
764 | + h.setId("315107bd-91fe-42a1-9237-752f3c046a40"); | |
765 | + basicConfigList.add(h); | |
766 | + BasicConfig hz =new BasicConfig(); | |
767 | + hz.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
768 | + hz.setLevel("2"); | |
769 | + hz.setName("黄色-紫色"); | |
770 | + hz.setId("315107bd-91fe-42a1-9237-752f3c046a40,224b2329-cb82-4da3-a071-8527f8283aab"); | |
771 | + basicConfigList.add(hz); | |
772 | + BasicConfig c =new BasicConfig(); | |
773 | + c.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
774 | + c.setLevel("2"); | |
775 | + c.setName("橙色"); | |
776 | + c.setId("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2"); | |
777 | + basicConfigList.add(c); | |
778 | + BasicConfig cz =new BasicConfig(); | |
779 | + cz.setName("橙色-紫色"); | |
780 | + cz.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
781 | + cz.setLevel("2"); | |
782 | + cz.setId("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2,224b2329-cb82-4da3-a071-8527f8283aab"); | |
783 | + basicConfigList.add(cz); | |
784 | + BasicConfig ch =new BasicConfig(); | |
785 | + ch.setName("橙色-黄色"); | |
786 | + ch.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
787 | + ch.setLevel("2"); | |
788 | + ch.setId("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2,315107bd-91fe-42a1-9237-752f3c046a40"); | |
789 | + basicConfigList.add(ch); | |
790 | + BasicConfig chz =new BasicConfig(); | |
791 | + chz.setName("橙色-黄色-紫色"); | |
792 | + chz.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
793 | + chz.setLevel("3"); | |
794 | + chz.setId("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2,315107bd-91fe-42a1-9237-752f3c046a40,224b2329-cb82-4da3-a071-8527f8283aab"); | |
795 | + basicConfigList.add(chz); | |
796 | + BasicConfig hs =new BasicConfig(); | |
797 | + hs.setName("红色"); | |
798 | + hs.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
799 | + hs.setLevel("2"); | |
800 | + hs.setId("eb146c03-b19f-4e28-b85f-fda574b2283b"); | |
801 | + basicConfigList.add(hs); | |
802 | + BasicConfig hz1 =new BasicConfig(); | |
803 | + hz1.setName("红色-紫色"); | |
804 | + hz1.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
805 | + hz1.setLevel("2"); | |
806 | + hz1.setId("eb146c03-b19f-4e28-b85f-fda574b2283b,224b2329-cb82-4da3-a071-8527f8283aab"); | |
807 | + basicConfigList.add(hz1); | |
808 | + BasicConfig hh =new BasicConfig(); | |
809 | + hh.setName("红色-黄色"); | |
810 | + hh.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
811 | + hh.setLevel("2"); | |
812 | + hh.setId("eb146c03-b19f-4e28-b85f-fda574b2283b,315107bd-91fe-42a1-9237-752f3c046a40"); | |
813 | + basicConfigList.add(hh); | |
814 | + BasicConfig hc =new BasicConfig(); | |
815 | + hc.setName("红色-橙色"); | |
816 | + hc.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
817 | + hc.setLevel("2"); | |
818 | + hc.setId("eb146c03-b19f-4e28-b85f-fda574b2283b,49a36aea-c5b6-4162-87d2-9eb3c6ec00c2"); | |
819 | + basicConfigList.add(hc); | |
820 | + BasicConfig hcz =new BasicConfig(); | |
821 | + hcz.setName("红色-橙色-紫色"); | |
822 | + hcz.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
823 | + hcz.setLevel("2"); | |
824 | + hcz.setId("eb146c03-b19f-4e28-b85f-fda574b2283b,49a36aea-c5b6-4162-87d2-9eb3c6ec00c2,224b2329-cb82-4da3-a071-8527f8283aab"); | |
825 | + basicConfigList.add(hcz); | |
826 | + BasicConfig hhz =new BasicConfig(); | |
827 | + hhz.setName("红色-黄色-紫色"); | |
828 | + hhz.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
829 | + hhz.setLevel("3"); | |
830 | + hhz.setId("eb146c03-b19f-4e28-b85f-fda574b2283b,315107bd-91fe-42a1-9237-752f3c046a40,224b2329-cb82-4da3-a071-8527f8283aab"); | |
831 | + basicConfigList.add(hhz); | |
832 | + BasicConfig hch =new BasicConfig(); | |
833 | + hch.setName("红色-橙色-黄色"); | |
834 | + hch.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
835 | + hch.setLevel("3"); | |
836 | + hch.setId("eb146c03-b19f-4e28-b85f-fda574b2283b,49a36aea-c5b6-4162-87d2-9eb3c6ec00c2,315107bd-91fe-42a1-9237-752f3c046a40"); | |
837 | + basicConfigList.add(hch); | |
838 | + BasicConfig hchz =new BasicConfig(); | |
839 | + hchz.setName("红色-橙色-黄色-紫色"); | |
840 | + hchz.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
841 | + hchz.setLevel("3"); | |
842 | + hchz.setId("eb146c03-b19f-4e28-b85f-fda574b2283b,49a36aea-c5b6-4162-87d2-9eb3c6ec00c2,315107bd-91fe-42a1-9237-752f3c046a40,224b2329-cb82-4da3-a071-8527f8283aab"); | |
843 | + basicConfigList.add(hchz); | |
844 | + BasicConfig z =new BasicConfig(); | |
845 | + z.setName("紫色"); | |
846 | + z.setpId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); | |
847 | + z.setLevel("2"); | |
848 | + z.setId("224b2329-cb82-4da3-a071-8527f8283aab"); | |
849 | + basicConfigList.add(z); | |
850 | + basicConfigs.addAll(basicConfigList); | |
851 | + return basicConfigs; | |
852 | + } | |
853 | + | |
854 | + | |
671 | 855 | //无层级关系 |
672 | 856 | public void configSignData(RiskReportResult bs, int allPatientCount) { |
673 | 857 | DecimalFormat df = new DecimalFormat("0.00"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FileUtils.java
View file @
190f3ae
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/PatientRelateMemberUtil.java
View file @
190f3ae
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/ChaseVisitHistory.java
View file @
190f3ae