Commit 7d0dabf582d2af0243e1d6b9cd62c2f0c9b09beb
1 parent
033dc11ce6
Exists in
master
and in
6 other branches
唐山滦县产妇健康管理登记表
Showing 4 changed files with 210 additions and 32 deletions
- platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.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/result/QuanChanResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java
View file @
7d0dabf
... | ... | @@ -456,26 +456,28 @@ |
456 | 456 | |
457 | 457 | int k = 0; |
458 | 458 | //填充数据 |
459 | - for(int i = 0;i<data.size();i++){ | |
460 | - int l = i+1; | |
461 | - ws.addCell(new Label(k,i+2,String.valueOf(l))); | |
462 | - ws.addCell(new Label(k+1,i+2,data.get(i).get("name")==null?"":data.get(i).get("name").toString())); | |
463 | - ws.addCell(new Label(k+2,i+2,data.get(i).get("address")==null?"":data.get(i).get("address").toString())); | |
464 | - ws.addCell(new Label(k+3,i+2,data.get(i).get("phone")==null?"":data.get(i).get("phone").toString())); | |
465 | - ws.addCell(new Label(k+4,i+2,data.get(i).get("lastMenses")==null?"":data.get(i).get("lastMenses").toString())); | |
466 | - ws.addCell(new Label(k+5,i+2,data.get(i).get("yi")==null?"":data.get(i).get("yi").toString())); | |
467 | - ws.addCell(new Label(k+6,i+2,data.get(i).get("er")==null?"":data.get(i).get("er").toString())); | |
468 | - ws.addCell(new Label(k+7,i+2,data.get(i).get("san")==null?"":data.get(i).get("san").toString())); | |
469 | - ws.addCell(new Label(k+8,i+2,data.get(i).get("si")==null?"":data.get(i).get("si").toString())); | |
470 | - ws.addCell(new Label(k+9,i+2,data.get(i).get("wu")==null?"":data.get(i).get("wu").toString())); | |
471 | - ws.addCell(new Label(k+10,i+2,data.get(i).get("total")==null?"":data.get(i).get("total").toString())); | |
459 | + if(data != null && data.size() > 0) { | |
460 | + for (int i = 0; i < data.size(); i++) { | |
461 | + int l = i + 1; | |
462 | + ws.addCell(new Label(k, i + 2, String.valueOf(l))); | |
463 | + ws.addCell(new Label(k + 1, i + 2, data.get(i).get("name") == null ? "" : data.get(i).get("name").toString())); | |
464 | + ws.addCell(new Label(k + 2, i + 2, data.get(i).get("address") == null ? "" : data.get(i).get("address").toString())); | |
465 | + ws.addCell(new Label(k + 3, i + 2, data.get(i).get("phone") == null ? "" : data.get(i).get("phone").toString())); | |
466 | + ws.addCell(new Label(k + 4, i + 2, data.get(i).get("lastMenses") == null ? "" : data.get(i).get("lastMenses").toString())); | |
467 | + ws.addCell(new Label(k + 5, i + 2, data.get(i).get("yi") == null ? "" : data.get(i).get("yi").toString())); | |
468 | + ws.addCell(new Label(k + 6, i + 2, data.get(i).get("er") == null ? "" : data.get(i).get("er").toString())); | |
469 | + ws.addCell(new Label(k + 7, i + 2, data.get(i).get("san") == null ? "" : data.get(i).get("san").toString())); | |
470 | + ws.addCell(new Label(k + 8, i + 2, data.get(i).get("si") == null ? "" : data.get(i).get("si").toString())); | |
471 | + ws.addCell(new Label(k + 9, i + 2, data.get(i).get("wu") == null ? "" : data.get(i).get("wu").toString())); | |
472 | + ws.addCell(new Label(k + 10, i + 2, data.get(i).get("total") == null ? "" : data.get(i).get("total").toString())); | |
472 | 473 | |
473 | - ws.addCell(new Label(k+11,i+2,data.get(i).get("total")==null?"":data.get(i).get("total").toString())); | |
474 | - ws.addCell(new Label(k+12,i+2,data.get(i).get("total")==null?"":data.get(i).get("total").toString())); | |
475 | - ws.addCell(new Label(k+13,i+2,data.get(i).get("total")==null?"":data.get(i).get("total").toString())); | |
476 | - ws.addCell(new Label(k+14,i+2,data.get(i).get("total")==null?"":data.get(i).get("total").toString())); | |
477 | - ws.addCell(new Label(k+15,i+2,data.get(i).get("total")==null?"":data.get(i).get("total").toString())); | |
474 | + ws.addCell(new Label(k + 11, i + 2, data.get(i).get("cyxj") == null ? "" : data.get(i).get("cyxj").toString())); | |
475 | + ws.addCell(new Label(k + 12, i + 2, data.get(i).get("total") == null ? "" : data.get(i).get("total").toString())); | |
476 | + ws.addCell(new Label(k + 13, i + 2, data.get(i).get("total") == null ? "" : data.get(i).get("total").toString())); | |
477 | + ws.addCell(new Label(k + 14, i + 2, data.get(i).get("total") == null ? "" : data.get(i).get("total").toString())); | |
478 | + ws.addCell(new Label(k + 15, i + 2, data.get(i).get("total") == null ? "" : data.get(i).get("total").toString())); | |
478 | 479 | |
480 | + } | |
479 | 481 | } |
480 | 482 | |
481 | 483 | wwb.write(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
7d0dabf
... | ... | @@ -102,7 +102,10 @@ |
102 | 102 | @Autowired |
103 | 103 | private MongoTemplate mongoTemplate; |
104 | 104 | |
105 | + @Autowired | |
106 | + private DischargeAbstractMotherService dischargeAbstractMotherService; | |
105 | 107 | |
108 | + | |
106 | 109 | /** |
107 | 110 | * 修改产妇的社区 |
108 | 111 | * |
... | ... | @@ -742,7 +745,7 @@ |
742 | 745 | if (end > patientses.size()) { |
743 | 746 | end = patientses.size(); |
744 | 747 | } |
745 | - listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService, organizationService, basicConfigService))); | |
748 | + listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService, organizationService, basicConfigService,antExService,dischargeAbstractMotherService))); | |
746 | 749 | } |
747 | 750 | for (Future f : listFuture) { |
748 | 751 | try { |
... | ... | @@ -1072,6 +1075,25 @@ |
1072 | 1075 | |
1073 | 1076 | }else if(patientsQueryRequest.getQueryType() == 2){ |
1074 | 1077 | //全部产妇 |
1078 | + listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, 3, userId, null, Boolean.FALSE); | |
1079 | + List list = listResponse.getData(); | |
1080 | + for (Object obj : list) { | |
1081 | + Map<String, Object> data = new HashMap<>(); | |
1082 | + QuanChanResult rp = (QuanChanResult) obj; | |
1083 | + data.put("name",rp.getName()); | |
1084 | + data.put("address",rp.getAddr()); | |
1085 | + data.put("phone",rp.getPhone()); | |
1086 | + data.put("lastMenses", rp.getLastMenses()); | |
1087 | + data.put("yi",rp.getYi()); | |
1088 | + data.put("er",rp.getEr()); | |
1089 | + data.put("san",rp.getSan()); | |
1090 | + data.put("si",rp.getSi()); | |
1091 | + data.put("wu",rp.getWu()); | |
1092 | + data.put("total", rp.getcTimes()); | |
1093 | + data.put("cyxj",rp.getCyxj()); | |
1094 | + | |
1095 | + datas.add(data); | |
1096 | + } | |
1075 | 1097 | |
1076 | 1098 | } |
1077 | 1099 | OutputStream out = response.getOutputStream(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanChanResult.java
View file @
7d0dabf
... | ... | @@ -68,6 +68,80 @@ |
68 | 68 | //建档号 |
69 | 69 | private String fileCode; |
70 | 70 | |
71 | + /*********唐山滦县导出产妇健康管理增加字段********/ | |
72 | + private String lastMenses; | |
73 | + private int cjTimes; | |
74 | + private String yi; | |
75 | + private String er; | |
76 | + private String san; | |
77 | + private String si; | |
78 | + private String wu; | |
79 | + private String cyxj; | |
80 | + | |
81 | + public String getLastMenses() { | |
82 | + return lastMenses; | |
83 | + } | |
84 | + | |
85 | + public void setLastMenses(String lastMenses) { | |
86 | + this.lastMenses = lastMenses; | |
87 | + } | |
88 | + | |
89 | + public int getCjTimes() { | |
90 | + return cjTimes; | |
91 | + } | |
92 | + | |
93 | + public void setCjTimes(int cjTimes) { | |
94 | + this.cjTimes = cjTimes; | |
95 | + } | |
96 | + | |
97 | + public String getYi() { | |
98 | + return yi; | |
99 | + } | |
100 | + | |
101 | + public void setYi(String yi) { | |
102 | + this.yi = yi; | |
103 | + } | |
104 | + | |
105 | + public String getEr() { | |
106 | + return er; | |
107 | + } | |
108 | + | |
109 | + public void setEr(String er) { | |
110 | + this.er = er; | |
111 | + } | |
112 | + | |
113 | + public String getSan() { | |
114 | + return san; | |
115 | + } | |
116 | + | |
117 | + public void setSan(String san) { | |
118 | + this.san = san; | |
119 | + } | |
120 | + | |
121 | + public String getSi() { | |
122 | + return si; | |
123 | + } | |
124 | + | |
125 | + public void setSi(String si) { | |
126 | + this.si = si; | |
127 | + } | |
128 | + | |
129 | + public String getWu() { | |
130 | + return wu; | |
131 | + } | |
132 | + | |
133 | + public void setWu(String wu) { | |
134 | + this.wu = wu; | |
135 | + } | |
136 | + | |
137 | + public String getCyxj() { | |
138 | + return cyxj; | |
139 | + } | |
140 | + | |
141 | + public void setCyxj(String cyxj) { | |
142 | + this.cyxj = cyxj; | |
143 | + } | |
144 | + | |
71 | 145 | public String getFileCode() { |
72 | 146 | if(null==fileCode){ |
73 | 147 | return SPIT; |
... | ... | @@ -337,6 +411,7 @@ |
337 | 411 | setServiceStatus(ServiceStatusEnums.getNameById(destModel.getServiceStatus())); |
338 | 412 | } |
339 | 413 | setPid(destModel.getPid()); |
414 | + setLastMenses(DateUtil.getyyyy_MM_dd(destModel.getLastMenses())); | |
340 | 415 | return this; |
341 | 416 | } |
342 | 417 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
View file @
7d0dabf
1 | 1 | package com.lyms.platform.operate.web.worker; |
2 | 2 | |
3 | -import com.lyms.platform.biz.service.BasicConfigService; | |
4 | -import com.lyms.platform.biz.service.MatDeliverService; | |
5 | -import com.lyms.platform.biz.service.PatientsService; | |
6 | -import com.lyms.platform.biz.service.PostReviewService; | |
3 | +import com.lyms.platform.biz.service.*; | |
7 | 4 | import com.lyms.platform.common.enums.ServiceStatusEnums; |
8 | 5 | import com.lyms.platform.common.enums.ServiceTypeEnums; |
9 | 6 | import com.lyms.platform.common.enums.TaiShuEnums; |
... | ... | @@ -15,13 +12,8 @@ |
15 | 12 | import com.lyms.platform.permission.model.Users; |
16 | 13 | import com.lyms.platform.permission.service.OrganizationService; |
17 | 14 | import com.lyms.platform.permission.service.UsersService; |
18 | -import com.lyms.platform.pojo.MaternalDeliverModel; | |
19 | -import com.lyms.platform.pojo.Patients; | |
20 | -import com.lyms.platform.pojo.PostReviewModel; | |
21 | -import com.lyms.platform.query.AntExQuery; | |
22 | -import com.lyms.platform.query.MatDeliverQuery; | |
23 | -import com.lyms.platform.query.PatientsQuery; | |
24 | -import com.lyms.platform.query.PostReviewQuery; | |
15 | +import com.lyms.platform.pojo.*; | |
16 | +import com.lyms.platform.query.*; | |
25 | 17 | import org.apache.commons.collections.CollectionUtils; |
26 | 18 | import org.apache.commons.lang.StringUtils; |
27 | 19 | import org.apache.commons.lang.math.NumberUtils; |
... | ... | @@ -46,6 +38,8 @@ |
46 | 38 | |
47 | 39 | private PatientsService patientsService; |
48 | 40 | |
41 | + private AntenatalExaminationService antExService; | |
42 | + | |
49 | 43 | private UsersService usersService; |
50 | 44 | private PostReviewService postReviewService; |
51 | 45 | |
52 | 46 | |
... | ... | @@ -53,12 +47,15 @@ |
53 | 47 | private String hospital; |
54 | 48 | private OrganizationService organizationService; |
55 | 49 | private BasicConfigService basicConfigService; |
50 | + private DischargeAbstractMotherService dischargeAbstractMotherService; | |
56 | 51 | |
57 | 52 | public QuanChanPatientWorker(List<Patients> patientses, |
58 | 53 | String hospital, |
59 | 54 | UsersService usersService, |
60 | 55 | PostReviewService postReviewService, |
61 | - MatDeliverService matDeliverService, PatientsService patientsService, OrganizationService organizationService, BasicConfigService basicConfigService) { | |
56 | + MatDeliverService matDeliverService, PatientsService patientsService, | |
57 | + OrganizationService organizationService, BasicConfigService basicConfigService, | |
58 | + AntenatalExaminationService antExService,DischargeAbstractMotherService dischargeAbstractMotherService) { | |
62 | 59 | this.patientses = patientses; |
63 | 60 | this.matDeliverService = matDeliverService; |
64 | 61 | this.postReviewService = postReviewService; |
... | ... | @@ -67,6 +64,8 @@ |
67 | 64 | this.usersService = usersService; |
68 | 65 | this.organizationService = organizationService; |
69 | 66 | this.basicConfigService = basicConfigService; |
67 | + this.antExService = antExService; | |
68 | + this.dischargeAbstractMotherService = dischargeAbstractMotherService; | |
70 | 69 | } |
71 | 70 | |
72 | 71 | |
73 | 72 | |
74 | 73 | |
... | ... | @@ -74,12 +73,92 @@ |
74 | 73 | public List<QuanChanResult> call() throws Exception { |
75 | 74 | List data = new ArrayList<>(); |
76 | 75 | AntExQuery antExQuery = new AntExQuery(); |
76 | + AntExChuQuery antExChuQuery1 = new AntExChuQuery();//初诊 | |
77 | + antExChuQuery1.setYn(YnEnums.YES.getId()); | |
78 | + | |
77 | 79 | for (Patients patients : patientses) { |
78 | 80 | StopWatch stopWatch = new StopWatch("QuanChanPatientWorker -" + patients.getId()); |
79 | 81 | QuanChanResult chanResult = new QuanChanResult(); |
82 | + chanResult.setYi("-"); | |
83 | + chanResult.setEr("-"); | |
84 | + chanResult.setSan("-"); | |
85 | + chanResult.setSi("-"); | |
86 | + chanResult.setWu("-"); | |
80 | 87 | chanResult.convertToResult(patients); |
81 | 88 | antExQuery.setParentId(patients.getId()); |
82 | 89 | antExQuery.setYn(YnEnums.YES.getId()); |
90 | + //初诊查询 | |
91 | + antExChuQuery1.setPid(patients.getPid()); | |
92 | + //增加查询本次产程条数 | |
93 | + antExChuQuery1.setStart(patients.getLastMenses()); | |
94 | + List<AntExChuModel> chu = antExService.queryAntExChu(antExChuQuery1.convertToQuery()); | |
95 | + //复诊次数 | |
96 | + List<AntenatalExaminationModel> ant = null; | |
97 | + int i = 0; | |
98 | + if(CollectionUtils.isNotEmpty(chu)){ | |
99 | + for(AntExChuModel a : chu){//唐山滦县导出判断初诊是否是本院 | |
100 | + if(StringUtils.isNotEmpty(a.getHospitalId())){ | |
101 | + if(a.getHospitalId().equals(hospital)){ | |
102 | + chanResult.setYi("本院"); | |
103 | + }else{ | |
104 | + chanResult.setYi("外院"); | |
105 | + } | |
106 | + break; | |
107 | + } | |
108 | + } | |
109 | + ant = antExService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
110 | + | |
111 | + //唐山滦县判断复诊是否是本院 | |
112 | + if(CollectionUtils.isNotEmpty(ant)){ | |
113 | + for(int k = 0;k < ant.size();k++){ | |
114 | + if(k>=4){ | |
115 | + break; | |
116 | + } | |
117 | + if(0==k){ | |
118 | + if(ant.get(k).getHospitalId().equals(hospital)){ | |
119 | + chanResult.setEr("本院"); | |
120 | + }else{ | |
121 | + chanResult.setEr("外院"); | |
122 | + } | |
123 | + }else if(1==k){ | |
124 | + if(ant.get(k).getHospitalId().equals(hospital)){ | |
125 | + chanResult.setSan("本院"); | |
126 | + }else{ | |
127 | + chanResult.setSan("外院"); | |
128 | + } | |
129 | + }else if(2==k){ | |
130 | + if(ant.get(k).getHospitalId().equals(hospital)){ | |
131 | + chanResult.setSi("本院"); | |
132 | + }else{ | |
133 | + chanResult.setSi("外院"); | |
134 | + } | |
135 | + }else if(3==k){ | |
136 | + if(ant.get(k).getHospitalId().equals(hospital)){ | |
137 | + chanResult.setWu("本院"); | |
138 | + }else{ | |
139 | + chanResult.setWu("外院"); | |
140 | + } | |
141 | + } | |
142 | + } | |
143 | + i = ant.size(); | |
144 | + } | |
145 | + } | |
146 | + //系统初诊次数 | |
147 | + int ichu = CollectionUtils.isEmpty(chu) ? 0 : chu.size(); | |
148 | + chanResult.setCjTimes(ichu+i); | |
149 | + | |
150 | + //出院小结 | |
151 | + DischargeAbstractMotherQuery dischargeAbstractMotherQuery = new DischargeAbstractMotherQuery(); | |
152 | + dischargeAbstractMotherQuery.setYn(YnEnums.YES.getId()); | |
153 | + dischargeAbstractMotherQuery.setPatientId(patients.getId()); | |
154 | + List<DischargeAbstractMotherModel> dischargeAbstractMotherModels = dischargeAbstractMotherService.query(dischargeAbstractMotherQuery); | |
155 | + if(dischargeAbstractMotherModels != null && dischargeAbstractMotherModels.size() > 0){ | |
156 | + chanResult.setCyxj("有"); | |
157 | + }else{ | |
158 | + chanResult.setCyxj("无"); | |
159 | + } | |
160 | + | |
161 | + | |
83 | 162 | if (StringUtils.isNotEmpty(patients.getBookbuildingDoctor())) { |
84 | 163 | if (NumberUtils.isNumber(patients.getBookbuildingDoctor())) { |
85 | 164 | Users users = usersService.getUsers(NumberUtils.toInt(patients.getBookbuildingDoctor())); |