Commit c1e274d6e5b920b9917dab0bb49d83497a3da7c8
1 parent
ab4fe447e4
Exists in
master
and in
6 other branches
update code
Showing 3 changed files with 49 additions and 28 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdfyHisService.java
View file @
c1e274d
... | ... | @@ -23,41 +23,39 @@ |
23 | 23 | /** |
24 | 24 | * 承德 |
25 | 25 | * 查询病人ID |
26 | + * 承德查询lis报告先通过就诊卡号查询到病人id | |
27 | + * 通过病人id到院内系统mysql中查询 vCcardNo字段 | |
26 | 28 | * @param vcCardNo 就诊卡号 |
27 | 29 | * @return |
28 | 30 | */ |
29 | - public DzReplace findAllVcCarddNo(String vcCardNo){ | |
31 | + public String getPatientIdByVcCardNo(String vcCardNo){ | |
30 | 32 | |
31 | 33 | List<DzReplace> dzReplaceList = new ArrayList<DzReplace>(); |
32 | - if (StringUtils.isNotBlank(vcCardNo)){ | |
34 | + Connection conn = null; | |
35 | + try | |
36 | + { | |
37 | + if (StringUtils.isNotBlank(vcCardNo)){ | |
38 | + System.out.println("vcCardNo = " + vcCardNo); | |
39 | + conn = com.lyms.hospitalapi.Cdfy.ConnTools.makeHisConnection(); | |
40 | + QueryRunner queryRunner = new QueryRunner(true); | |
41 | + String sql = "select id as id from cdfyhis.v_patientinfo where cardno = '"+vcCardNo+"'"; | |
33 | 42 | |
34 | - System.out.println("vcCardNo = " + vcCardNo); | |
35 | - Connection conn = com.lyms.hospitalapi.Cdfy.ConnTools.makeHisConnection(); | |
36 | - QueryRunner queryRunner = new QueryRunner(true); | |
37 | - String sql = "select id as id from cdfyhis.v_patientinfo where cardno = '"+vcCardNo+"'"; | |
38 | - | |
39 | - try | |
40 | - { | |
41 | 43 | dzReplaceList = queryRunner.query(conn,sql,new BeanListHandler<DzReplace>(DzReplace.class)); |
42 | - | |
44 | + if(CollectionUtils.isNotEmpty(dzReplaceList)) | |
45 | + { | |
46 | + return dzReplaceList.get(0).getId(); | |
47 | + } | |
43 | 48 | } |
44 | - catch (Exception e) | |
45 | - { | |
46 | - DbUtils.closeQuietly(conn); | |
47 | - ExceptionUtils.catchException(e, "cd his exception "); | |
48 | - } | |
49 | - finally | |
50 | - { | |
51 | - DbUtils.closeQuietly(conn); | |
52 | - } | |
53 | - | |
54 | 49 | } |
55 | - if(CollectionUtils.isNotEmpty(dzReplaceList)){ | |
56 | - return dzReplaceList.get(0); | |
57 | - }else | |
58 | - return null; | |
59 | - | |
60 | - | |
50 | + catch (Exception e) | |
51 | + { | |
52 | + ExceptionUtils.catchException(e, "cd his exception "); | |
53 | + } | |
54 | + finally | |
55 | + { | |
56 | + DbUtils.closeQuietly(conn); | |
57 | + } | |
58 | + return null; | |
61 | 59 | } |
62 | 60 | |
63 | 61 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
c1e274d
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | +import com.lyms.hospitalapi.Cdfy.CdfyHisService; | |
3 | 4 | import com.lyms.hospitalapi.Nczxyy.NczxyyLisService; |
4 | 5 | import com.lyms.hospitalapi.dzfy.DzfyHisService; |
5 | 6 | import com.lyms.hospitalapi.pojo.CheckByDate; |
... | ... | @@ -62,6 +63,9 @@ |
62 | 63 | private DzfyHisService dzfyHisService; |
63 | 64 | |
64 | 65 | @Autowired |
66 | + private CdfyHisService cdfyHisService; | |
67 | + | |
68 | + @Autowired | |
65 | 69 | @Qualifier("commonThreadPool") |
66 | 70 | private ThreadPoolTaskExecutor commonThreadPool; |
67 | 71 | |
... | ... | @@ -472,6 +476,11 @@ |
472 | 476 | { |
473 | 477 | model.setVcCardNos(dzfyHisService.getDzVcCardNos(vcCardNo)); |
474 | 478 | } |
479 | + //承德查询lis | |
480 | + else if ("16".equals(HIS_VERSION)) | |
481 | + { | |
482 | + model.setVcCardNo(cdfyHisService.getPatientIdByVcCardNo(vcCardNo)); | |
483 | + } | |
475 | 484 | else |
476 | 485 | { |
477 | 486 | model.setVcCardNo(vcCardNo); |
... | ... | @@ -598,6 +607,11 @@ |
598 | 607 | { |
599 | 608 | vcCardNos.addAll(dzfyHisService.getDzVcCardNos(pat.getVcCardNo())); |
600 | 609 | } |
610 | + //承德查询lis | |
611 | + else if ("16".equals(HIS_VERSION)) | |
612 | + { | |
613 | + vcCardNos.add(cdfyHisService.getPatientIdByVcCardNo(pat.getVcCardNo())); | |
614 | + } | |
601 | 615 | else |
602 | 616 | { |
603 | 617 | vcCardNos.add(pat.getVcCardNo()); |
... | ... | @@ -810,7 +824,7 @@ |
810 | 824 | end = lises.size(); |
811 | 825 | } |
812 | 826 | final List<LisReportModel> models = lises.subList(i, end); |
813 | - Callable c = new LisHandleTask(patientsService,models,map,dzfyHisService); | |
827 | + Callable c = new LisHandleTask(patientsService,models,map,dzfyHisService,cdfyHisService); | |
814 | 828 | Future f = commonThreadPool.submit(c); |
815 | 829 | futures.add(f); |
816 | 830 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/LisHandleTask.java
View file @
c1e274d
1 | 1 | package com.lyms.platform.operate.web.utils; |
2 | 2 | |
3 | +import com.lyms.hospitalapi.Cdfy.CdfyHisService; | |
3 | 4 | import com.lyms.hospitalapi.dzfy.DzfyHisService; |
4 | 5 | import com.lyms.platform.biz.service.PatientsService; |
5 | 6 | import com.lyms.platform.common.enums.YnEnums; |
6 | 7 | |
7 | 8 | |
... | ... | @@ -28,15 +29,18 @@ |
28 | 29 | |
29 | 30 | private Map<String, String> hospitalMap; |
30 | 31 | private DzfyHisService dzfyHisService; |
32 | + private CdfyHisService cdfyHisService; | |
31 | 33 | |
32 | 34 | public LisHandleTask(PatientsService patientsService,List<LisReportModel> lises, |
33 | 35 | Map<String, String> hospitalMap, |
34 | - DzfyHisService dzfyHisService) | |
36 | + DzfyHisService dzfyHisService, | |
37 | + CdfyHisService cdfyHisService) | |
35 | 38 | { |
36 | 39 | this.patientsService = patientsService; |
37 | 40 | this.lises = lises; |
38 | 41 | this.hospitalMap = hospitalMap; |
39 | 42 | this.dzfyHisService = dzfyHisService; |
43 | + this.cdfyHisService = cdfyHisService; | |
40 | 44 | } |
41 | 45 | |
42 | 46 | @Override |
... | ... | @@ -66,6 +70,11 @@ |
66 | 70 | if ("6".equals(HIS_VERSION) && "1000000114".equals(lisReportModel.getHospitalId())) |
67 | 71 | { |
68 | 72 | patientsQuery.setVcCardNos(dzfyHisService.getDzVcCardNos(lisReportModel.getVcCardNo())); |
73 | + } | |
74 | + //承德查询lis | |
75 | + else if ("16".equals(HIS_VERSION)) | |
76 | + { | |
77 | + patientsQuery.setVcCardNo(cdfyHisService.getPatientIdByVcCardNo(lisReportModel.getVcCardNo())); | |
69 | 78 | } |
70 | 79 | else |
71 | 80 | { |