Commit 0a41155d4e1463d57be4e85372ffe078bcf7bad5
1 parent
345cbdd77f
Exists in
master
and in
6 other branches
产妇复查
Showing 4 changed files with 68 additions and 68 deletions
- platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdfyHisService.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/PostReviewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdfyHisService.java
View file @
0a41155
... | ... | @@ -78,39 +78,37 @@ |
78 | 78 | * @return |
79 | 79 | */ |
80 | 80 | public String getIdByVcCardNo(String vcCardNo){ |
81 | + String id = null; | |
82 | + String url = "http://10.0.200.2:9090/his/getCdFyIdByVcCardNo?vcCardNo="+vcCardNo; | |
83 | + DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager()); | |
84 | + try { | |
85 | + HttpPost httpPost = new HttpPost(url); | |
86 | + /*StringEntity se = new StringEntity(vcCardNo,"UTF-8"); | |
87 | + se.setContentType("text/json"); | |
88 | + httpPost.setEntity(se);*/ | |
89 | + //执行post请求 | |
90 | + HttpResponse respon = client.execute(httpPost); | |
91 | + if(respon != null && respon.getStatusLine().getStatusCode() == 200){ | |
92 | + String result= EntityUtils.toString(respon.getEntity()); | |
93 | + System.out.print(result); | |
94 | + // 生成 JSON 对象 | |
95 | + JSONObject obj = JSONObject.parseObject(result); | |
96 | + if(obj!=null){ | |
97 | + id = obj.getString("id"); | |
98 | + } | |
99 | + return id == null ? vcCardNo : id; | |
100 | + }else{ | |
101 | + System.out.println("传输失败!"); | |
102 | + } | |
103 | + }catch (Exception e){ | |
104 | + ExceptionUtils.catchException(e,"承德就诊卡号获取病人id异常"); | |
105 | + return vcCardNo; | |
106 | + } | |
107 | + finally { | |
108 | + client.close(); | |
109 | + } | |
81 | 110 | |
82 | - return "1233"; | |
83 | -// String id = null; | |
84 | -// String url = "http://10.0.200.2:9090/his/getCdFyIdByVcCardNo?vcCardNo="+vcCardNo; | |
85 | -// DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager()); | |
86 | -// try { | |
87 | -// HttpPost httpPost = new HttpPost(url); | |
88 | -// /*StringEntity se = new StringEntity(vcCardNo,"UTF-8"); | |
89 | -// se.setContentType("text/json"); | |
90 | -// httpPost.setEntity(se);*/ | |
91 | -// //执行post请求 | |
92 | -// HttpResponse respon = client.execute(httpPost); | |
93 | -// if(respon != null && respon.getStatusLine().getStatusCode() == 200){ | |
94 | -// String result= EntityUtils.toString(respon.getEntity()); | |
95 | -// System.out.print(result); | |
96 | -// // 生成 JSON 对象 | |
97 | -// JSONObject obj = JSONObject.parseObject(result); | |
98 | -// if(obj!=null){ | |
99 | -// id = obj.getString("id"); | |
100 | -// } | |
101 | -// return id == null ? vcCardNo : id; | |
102 | -// }else{ | |
103 | -// System.out.println("传输失败!"); | |
104 | -// } | |
105 | -// }catch (Exception e){ | |
106 | -// ExceptionUtils.catchException(e,"承德就诊卡号获取病人id异常"); | |
107 | -// return vcCardNo; | |
108 | -// } | |
109 | -// finally { | |
110 | -// client.close(); | |
111 | -// } | |
112 | -// | |
113 | -// return vcCardNo; | |
111 | + return vcCardNo; | |
114 | 112 | } |
115 | 113 | |
116 | 114 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
0a41155
... | ... | @@ -267,7 +267,7 @@ |
267 | 267 | |
268 | 268 | |
269 | 269 | //承德市妇幼通过就诊卡号查询到病人id保存下来 |
270 | - if ("2100001636".equals(patient.getHospitalId()) && StringUtils.isNotEmpty(yunRequest.getVcCardNo())) | |
270 | + if ("2100001291".equals(patient.getHospitalId()) && StringUtils.isNotEmpty(yunRequest.getVcCardNo())) | |
271 | 271 | { |
272 | 272 | patient.setBlNum(cdfyHisService.getIdByVcCardNo(yunRequest.getVcCardNo())); |
273 | 273 | } |
... | ... | @@ -937,7 +937,7 @@ |
937 | 937 | patientsQuery.setVcCardNos(dzfyHisService.getDzVcCardNos(bookbuildingQueryRequest.getVcCardNo())); |
938 | 938 | } |
939 | 939 | //承德通过就诊卡号查询查询到病人id 然后用病人id和就诊卡号查询建档记录 |
940 | - else if ("2100001636".equals(hospitalId)) | |
940 | + else if ("2100001291".equals(hospitalId)) | |
941 | 941 | { |
942 | 942 | String blNum = cdfyHisService.getIdByVcCardNo(bookbuildingQueryRequest.getVcCardNo()); |
943 | 943 | patientsQuery.setBlNum(blNum); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
0a41155
... | ... | @@ -105,17 +105,17 @@ |
105 | 105 | } |
106 | 106 | } |
107 | 107 | postReviewModel.setOperator(userId); |
108 | - Patients patients1 = patientsService.findOnePatientById(postReviewRequest.getParentId()); | |
108 | + Patients patients = patientsService.findOnePatientById(postReviewRequest.getParentId()); | |
109 | 109 | |
110 | 110 | //产后复查时添加追访记录 |
111 | - addTrackDownInfo(userId, patients1, postReviewModel); | |
111 | + addTrackDownInfo(userId, patients, postReviewModel); | |
112 | 112 | |
113 | 113 | autoCreatedPatient(postReviewRequest, hospital, groupId); |
114 | 114 | |
115 | 115 | if (StringUtils.isEmpty(postReviewRequest.getId())) { |
116 | 116 | postReviewModel.setYn(YnEnums.YES.getId()); |
117 | 117 | postReviewModel.setHospitalId(hospital); |
118 | - Patients patients = patientsService.findOnePatientById(postReviewRequest.getParentId()); | |
118 | +// Patients patients = patientsService.findOnePatientById(postReviewRequest.getParentId()); | |
119 | 119 | patients.setLastCheckEmployeeId(postReviewModel.getProdDoctor()); |
120 | 120 | patientsService.updatePatient(patients); |
121 | 121 | |
122 | 122 | |
123 | 123 | |
... | ... | @@ -132,33 +132,8 @@ |
132 | 132 | } |
133 | 133 | |
134 | 134 | |
135 | - //修改非主档案 同时修改主档案的产后复查次数增加 | |
136 | - if (StringUtils.isNotEmpty(patients1.getPid())) { | |
137 | - PatientsQuery patientsQuery1 = new PatientsQuery(); | |
138 | - patientsQuery1.setYn(YnEnums.YES.getId()); | |
139 | - patientsQuery1.setPid(patients1.getPid()); | |
140 | 135 | |
141 | - List<Patients> pats = patientsService.queryPatient(patientsQuery1); | |
142 | 136 | |
143 | - if (null != patients1.getPostViewTimes()) { | |
144 | - Patients patients2 = new Patients(); | |
145 | - patients2.setPostViewTimes(patients1.getPostViewTimes() + 1); | |
146 | - for (Patients pat : pats) { | |
147 | - patients2.setId(pat.getId()); | |
148 | - patientsService.updatePatient(patients2); | |
149 | - } | |
150 | - | |
151 | - } else { | |
152 | - Patients patients2 = new Patients(); | |
153 | - patients2.setPostViewTimes(1); | |
154 | - for (Patients pat : pats) { | |
155 | - patients2.setId(pat.getId()); | |
156 | - patientsService.updatePatient(patients2); | |
157 | - } | |
158 | - | |
159 | - } | |
160 | - } | |
161 | - | |
162 | 137 | // if (null != patients1.getPostViewTimes()) { |
163 | 138 | // Patients patients2 = new Patients(); |
164 | 139 | // patients2.setPostViewTimes(patients1.getPostViewTimes() + 1); |
165 | 140 | |
... | ... | @@ -183,9 +158,35 @@ |
183 | 158 | } |
184 | 159 | syncMaster(patients.getId()); |
185 | 160 | |
161 | + //修改非主档案 同时修改主档案的产后复查次数增加 | |
162 | + if (StringUtils.isNotEmpty(patients.getPid())) { | |
163 | + PatientsQuery patientsQuery1 = new PatientsQuery(); | |
164 | + patientsQuery1.setYn(YnEnums.YES.getId()); | |
165 | + patientsQuery1.setPid(patients.getPid()); | |
166 | + | |
167 | + List<Patients> pats = patientsService.queryPatient(patientsQuery1); | |
168 | + | |
169 | + if (null != patients.getPostViewTimes()) { | |
170 | + Patients patients2 = new Patients(); | |
171 | + patients2.setPostViewTimes(patients.getPostViewTimes() + 1); | |
172 | + for (Patients pat : pats) { | |
173 | + patients2.setId(pat.getId()); | |
174 | + patientsService.updatePatient(patients2); | |
175 | + } | |
176 | + | |
177 | + } else { | |
178 | + Patients patients2 = new Patients(); | |
179 | + patients2.setPostViewTimes(1); | |
180 | + for (Patients pat : pats) { | |
181 | + patients2.setId(pat.getId()); | |
182 | + patientsService.updatePatient(patients2); | |
183 | + } | |
184 | + | |
185 | + } | |
186 | + } | |
187 | + | |
186 | 188 | } else { |
187 | 189 | |
188 | - Patients patients = patientsService.findOnePatientById(postReviewRequest.getParentId()); | |
189 | 190 | if (StringUtils.isNotEmpty(postReviewRequest.getDueDate())) { |
190 | 191 | patients.setFmDate(DateUtil.parseYMD(postReviewRequest.getDueDate())); |
191 | 192 | patients.setType(3); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
View file @
0a41155
... | ... | @@ -155,11 +155,12 @@ |
155 | 155 | withList = postReviewService.findWithList(postReviewQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); |
156 | 156 | if (CollectionUtils.isNotEmpty(withList)) { |
157 | 157 | //本院产后复查次数不为空 |
158 | - if (null != patients.getPostViewTimes()) { | |
159 | - chanResult.setcHTimes(patients.getPostViewTimes()); | |
160 | - } else { | |
161 | - chanResult.setcHTimes(withList.size()); | |
162 | - } | |
158 | + chanResult.setcHTimes(withList.size()); | |
159 | +// if (null != patients.getPostViewTimes()) { | |
160 | +// chanResult.setcHTimes(patients.getPostViewTimes()); | |
161 | +// } else { | |
162 | +// chanResult.setcHTimes(withList.size()); | |
163 | +// } | |
163 | 164 | } |
164 | 165 | } |
165 | 166 | stopWatch.stop(); |