Commit 754d31729f5951bcc8255cce0c1ff8a2990c3ba3
1 parent
17a24c6fb7
Exists in
master
and in
6 other branches
公卫2.0-新增非首次产前随访-上传接口
Showing 3 changed files with 446 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/model/SaveMaternalFollowupInfo.java
View file @
754d317
1 | +package com.lyms.hospitalapi.lhxfy.model; | |
2 | + | |
3 | +import com.lyms.platform.common.utils.DateUtil; | |
4 | +import com.lyms.platform.common.utils.StringUtils; | |
5 | +import com.lyms.platform.pojo.AntExChuModel; | |
6 | +import com.lyms.platform.pojo.AntenatalExaminationModel; | |
7 | + | |
8 | +import java.util.List; | |
9 | + | |
10 | +/** | |
11 | + * 公卫2.0-新增非首次产前随访 | |
12 | + */ | |
13 | +public class SaveMaternalFollowupInfo { | |
14 | + private Integer isAppCreate; //类型:Number 必有字段 备注:各厂商对接时,再确定具体的值 | |
15 | + private String followupDoctorId; //类型:String 必有字段 备注:本次随访医师id | |
16 | + private String followupDoctorName; //类型:String 必有字段 备注:本次随访医师姓名 | |
17 | + private Integer serviceTimes; //类型:Number 可有字段 备注:服务次数 | |
18 | + private String gestWeeks; //类型:String 可有字段 备注:孕周(周) | |
19 | + private Integer gestDays; //类型:Number 可有字段 备注:孕周(天) | |
20 | + private String checkOrgDoctor; //类型:String 可有字段 备注:检查机构及医生 | |
21 | + private String fetusPositionValue; //类型:String 可有字段 备注:胎方位 | |
22 | + private String fetalHeartRate; //类型:String 可有字段 备注:胎心率(次/min) | |
23 | + private String pregHealthAbnormDesc; //类型:String 可有字段 备注:孕产妇健康评估异常结果描述 | |
24 | + private String referralReason; //类型:String 可有字段 备注:转诊原因 | |
25 | + private String pregHealthAbnormCode; //类型:String 可有字段 备注:孕产妇健康评估异常标志 | |
26 | + private String referralCode; //类型:String 可有字段 备注:转诊标志 | |
27 | + private String referralContacts; //类型:String 可有字段 备注:转诊联系人(济南规范) | |
28 | + private String freeScreeningCode; //类型:String 可有字段 备注:免费血清学产前筛查代码(1.是2.否 )(济南规范) | |
29 | + private String referralResultCode; //类型:String 可有字段 备注:转诊结果(1到位2未到位)(济南规范) | |
30 | + private String referralTel; //类型:String 可有字段 备注:转诊电话(济南规范) | |
31 | + private String antenatalOrgName; //类型:String 可有字段 备注:产前检查机构名称(济南规范) | |
32 | + private String followupWayCode; //类型:String 可有字段 备注:随访方式代码 | |
33 | + private String lastMensesCode; //类型:String 可有字段 备注:无 | |
34 | + private List<Object> recordChoice; //类型:Array 可有字段 备注:选项指标记录 | |
35 | + private String nextVisitTypeCode; //类型:String 可有字段 备注:下次一次随访类型 | |
36 | + private String followupDate; //类型:String 必有字段 备注:本次随访日期 | |
37 | + private String chiefComplaint; //类型:String 可有字段 备注:主诉 | |
38 | + private Integer weight; //类型:Number 可有字段 备注:体重(kg) | |
39 | + private Integer fundusHeight; //类型:Number 可有字段 备注:宫底高度(cm) | |
40 | + private Integer abdomenCircum; //类型:Number 可有字段 备注:腹围(cm) | |
41 | + private Integer sbp; //类型:Number 可有字段 备注:收缩压(mmHg) | |
42 | + private Integer dbp; //类型:Number 可有字段 备注:舒张压(mmHg) | |
43 | + private Integer hgb; //类型:Number 可有字段 备注:血红蛋白值(g/L) | |
44 | + private String proQualResultCode; //类型:String 可有字段 备注:尿蛋白定性检测结果代码 | |
45 | + private String otherAssistExam; //类型:String 可有字段 备注:其他辅助检查 | |
46 | + private String nextFollowupDate; //类型:String 可有字段 备注:下次随访日期 | |
47 | + private String name; //类型:String 必有字段 备注:本人姓名 | |
48 | + private String maternalFollowupNo; //类型:String 可有字段 备注:孕产妇产前随访编号 | |
49 | + private String personInfoId; //类型:String 必有字段 备注:个人档案ID | |
50 | + private String maternalRegisterId; //类型:String 必有字段 备注:孕产登记ID | |
51 | + | |
52 | + public void convertToDataModel(AntenatalExaminationModel examinationModel){ | |
53 | + setIsAppCreate(null==examinationModel.getIsAppCreate()?0:examinationModel.getIsAppCreate()); | |
54 | + setFollowupDoctorId(StringUtils.isEmpty(examinationModel.getFollowupDoctorId())?"无":examinationModel.getFollowupDoctorId()); | |
55 | + setFollowupDoctorName(StringUtils.isEmpty(examinationModel.getFollowupDoctorName())?"无":examinationModel.getFollowupDoctorName()); | |
56 | + setServiceTimes(null); | |
57 | + setGestWeeks(null); | |
58 | + setGestDays(null); | |
59 | + setCheckOrgDoctor(null); | |
60 | + setFetusPositionValue(null); | |
61 | + setFetalHeartRate(null); | |
62 | + setPregHealthAbnormDesc(null); | |
63 | + setReferralReason(null); | |
64 | + setPregHealthAbnormCode(null); | |
65 | + setReferralCode(null); | |
66 | + setReferralContacts(null); | |
67 | + setFreeScreeningCode(null); | |
68 | + setReferralResultCode(null); | |
69 | + setReferralTel(null); | |
70 | + setAntenatalOrgName(null); | |
71 | + setFollowupWayCode(null); | |
72 | + setLastMensesCode(null); | |
73 | + setRecordChoice(null); | |
74 | + setNextVisitTypeCode(null); | |
75 | + setFollowupDate(null); | |
76 | + setChiefComplaint(null); | |
77 | + setWeight(null); | |
78 | + setFundusHeight(null); | |
79 | + setAbdomenCircum(null); | |
80 | + setSbp(null); | |
81 | + setDbp(null); | |
82 | + setHgb(null); | |
83 | + setProQualResultCode(null); | |
84 | + setOtherAssistExam(null); | |
85 | + setNextFollowupDate(null); | |
86 | + setName(StringUtils.isEmpty(examinationModel.getName())?"无":examinationModel.getName()); | |
87 | + setMaternalFollowupNo(null); | |
88 | + setPersonInfoId("无");//? | |
89 | + setMaternalRegisterId(StringUtils.isEmpty(examinationModel.getParentId())?"无":examinationModel.getParentId()); | |
90 | + } | |
91 | + | |
92 | + public Integer getIsAppCreate() { | |
93 | + return isAppCreate; | |
94 | + } | |
95 | + | |
96 | + public void setIsAppCreate(Integer isAppCreate) { | |
97 | + this.isAppCreate = isAppCreate; | |
98 | + } | |
99 | + | |
100 | + public String getFollowupDoctorId() { | |
101 | + return followupDoctorId; | |
102 | + } | |
103 | + | |
104 | + public void setFollowupDoctorId(String followupDoctorId) { | |
105 | + this.followupDoctorId = followupDoctorId; | |
106 | + } | |
107 | + | |
108 | + public String getFollowupDoctorName() { | |
109 | + return followupDoctorName; | |
110 | + } | |
111 | + | |
112 | + public void setFollowupDoctorName(String followupDoctorName) { | |
113 | + this.followupDoctorName = followupDoctorName; | |
114 | + } | |
115 | + | |
116 | + public Integer getServiceTimes() { | |
117 | + return serviceTimes; | |
118 | + } | |
119 | + | |
120 | + public void setServiceTimes(Integer serviceTimes) { | |
121 | + this.serviceTimes = serviceTimes; | |
122 | + } | |
123 | + | |
124 | + public String getGestWeeks() { | |
125 | + return gestWeeks; | |
126 | + } | |
127 | + | |
128 | + public void setGestWeeks(String gestWeeks) { | |
129 | + this.gestWeeks = gestWeeks; | |
130 | + } | |
131 | + | |
132 | + public Integer getGestDays() { | |
133 | + return gestDays; | |
134 | + } | |
135 | + | |
136 | + public void setGestDays(Integer gestDays) { | |
137 | + this.gestDays = gestDays; | |
138 | + } | |
139 | + | |
140 | + public String getCheckOrgDoctor() { | |
141 | + return checkOrgDoctor; | |
142 | + } | |
143 | + | |
144 | + public void setCheckOrgDoctor(String checkOrgDoctor) { | |
145 | + this.checkOrgDoctor = checkOrgDoctor; | |
146 | + } | |
147 | + | |
148 | + public String getFetusPositionValue() { | |
149 | + return fetusPositionValue; | |
150 | + } | |
151 | + | |
152 | + public void setFetusPositionValue(String fetusPositionValue) { | |
153 | + this.fetusPositionValue = fetusPositionValue; | |
154 | + } | |
155 | + | |
156 | + public String getFetalHeartRate() { | |
157 | + return fetalHeartRate; | |
158 | + } | |
159 | + | |
160 | + public void setFetalHeartRate(String fetalHeartRate) { | |
161 | + this.fetalHeartRate = fetalHeartRate; | |
162 | + } | |
163 | + | |
164 | + public String getPregHealthAbnormDesc() { | |
165 | + return pregHealthAbnormDesc; | |
166 | + } | |
167 | + | |
168 | + public void setPregHealthAbnormDesc(String pregHealthAbnormDesc) { | |
169 | + this.pregHealthAbnormDesc = pregHealthAbnormDesc; | |
170 | + } | |
171 | + | |
172 | + public String getReferralReason() { | |
173 | + return referralReason; | |
174 | + } | |
175 | + | |
176 | + public void setReferralReason(String referralReason) { | |
177 | + this.referralReason = referralReason; | |
178 | + } | |
179 | + | |
180 | + public String getPregHealthAbnormCode() { | |
181 | + return pregHealthAbnormCode; | |
182 | + } | |
183 | + | |
184 | + public void setPregHealthAbnormCode(String pregHealthAbnormCode) { | |
185 | + this.pregHealthAbnormCode = pregHealthAbnormCode; | |
186 | + } | |
187 | + | |
188 | + public String getReferralCode() { | |
189 | + return referralCode; | |
190 | + } | |
191 | + | |
192 | + public void setReferralCode(String referralCode) { | |
193 | + this.referralCode = referralCode; | |
194 | + } | |
195 | + | |
196 | + public String getReferralContacts() { | |
197 | + return referralContacts; | |
198 | + } | |
199 | + | |
200 | + public void setReferralContacts(String referralContacts) { | |
201 | + this.referralContacts = referralContacts; | |
202 | + } | |
203 | + | |
204 | + public String getFreeScreeningCode() { | |
205 | + return freeScreeningCode; | |
206 | + } | |
207 | + | |
208 | + public void setFreeScreeningCode(String freeScreeningCode) { | |
209 | + this.freeScreeningCode = freeScreeningCode; | |
210 | + } | |
211 | + | |
212 | + public String getReferralResultCode() { | |
213 | + return referralResultCode; | |
214 | + } | |
215 | + | |
216 | + public void setReferralResultCode(String referralResultCode) { | |
217 | + this.referralResultCode = referralResultCode; | |
218 | + } | |
219 | + | |
220 | + public String getReferralTel() { | |
221 | + return referralTel; | |
222 | + } | |
223 | + | |
224 | + public void setReferralTel(String referralTel) { | |
225 | + this.referralTel = referralTel; | |
226 | + } | |
227 | + | |
228 | + public String getAntenatalOrgName() { | |
229 | + return antenatalOrgName; | |
230 | + } | |
231 | + | |
232 | + public void setAntenatalOrgName(String antenatalOrgName) { | |
233 | + this.antenatalOrgName = antenatalOrgName; | |
234 | + } | |
235 | + | |
236 | + public String getFollowupWayCode() { | |
237 | + return followupWayCode; | |
238 | + } | |
239 | + | |
240 | + public void setFollowupWayCode(String followupWayCode) { | |
241 | + this.followupWayCode = followupWayCode; | |
242 | + } | |
243 | + | |
244 | + public String getLastMensesCode() { | |
245 | + return lastMensesCode; | |
246 | + } | |
247 | + | |
248 | + public void setLastMensesCode(String lastMensesCode) { | |
249 | + this.lastMensesCode = lastMensesCode; | |
250 | + } | |
251 | + | |
252 | + public List<Object> getRecordChoice() { | |
253 | + return recordChoice; | |
254 | + } | |
255 | + | |
256 | + public void setRecordChoice(List<Object> recordChoice) { | |
257 | + this.recordChoice = recordChoice; | |
258 | + } | |
259 | + | |
260 | + public String getNextVisitTypeCode() { | |
261 | + return nextVisitTypeCode; | |
262 | + } | |
263 | + | |
264 | + public void setNextVisitTypeCode(String nextVisitTypeCode) { | |
265 | + this.nextVisitTypeCode = nextVisitTypeCode; | |
266 | + } | |
267 | + | |
268 | + public String getFollowupDate() { | |
269 | + return followupDate; | |
270 | + } | |
271 | + | |
272 | + public void setFollowupDate(String followupDate) { | |
273 | + this.followupDate = followupDate; | |
274 | + } | |
275 | + | |
276 | + public String getChiefComplaint() { | |
277 | + return chiefComplaint; | |
278 | + } | |
279 | + | |
280 | + public void setChiefComplaint(String chiefComplaint) { | |
281 | + this.chiefComplaint = chiefComplaint; | |
282 | + } | |
283 | + | |
284 | + public Integer getWeight() { | |
285 | + return weight; | |
286 | + } | |
287 | + | |
288 | + public void setWeight(Integer weight) { | |
289 | + this.weight = weight; | |
290 | + } | |
291 | + | |
292 | + public Integer getFundusHeight() { | |
293 | + return fundusHeight; | |
294 | + } | |
295 | + | |
296 | + public void setFundusHeight(Integer fundusHeight) { | |
297 | + this.fundusHeight = fundusHeight; | |
298 | + } | |
299 | + | |
300 | + public Integer getAbdomenCircum() { | |
301 | + return abdomenCircum; | |
302 | + } | |
303 | + | |
304 | + public void setAbdomenCircum(Integer abdomenCircum) { | |
305 | + this.abdomenCircum = abdomenCircum; | |
306 | + } | |
307 | + | |
308 | + public Integer getSbp() { | |
309 | + return sbp; | |
310 | + } | |
311 | + | |
312 | + public void setSbp(Integer sbp) { | |
313 | + this.sbp = sbp; | |
314 | + } | |
315 | + | |
316 | + public Integer getDbp() { | |
317 | + return dbp; | |
318 | + } | |
319 | + | |
320 | + public void setDbp(Integer dbp) { | |
321 | + this.dbp = dbp; | |
322 | + } | |
323 | + | |
324 | + public Integer getHgb() { | |
325 | + return hgb; | |
326 | + } | |
327 | + | |
328 | + public void setHgb(Integer hgb) { | |
329 | + this.hgb = hgb; | |
330 | + } | |
331 | + | |
332 | + public String getProQualResultCode() { | |
333 | + return proQualResultCode; | |
334 | + } | |
335 | + | |
336 | + public void setProQualResultCode(String proQualResultCode) { | |
337 | + this.proQualResultCode = proQualResultCode; | |
338 | + } | |
339 | + | |
340 | + public String getOtherAssistExam() { | |
341 | + return otherAssistExam; | |
342 | + } | |
343 | + | |
344 | + public void setOtherAssistExam(String otherAssistExam) { | |
345 | + this.otherAssistExam = otherAssistExam; | |
346 | + } | |
347 | + | |
348 | + public String getNextFollowupDate() { | |
349 | + return nextFollowupDate; | |
350 | + } | |
351 | + | |
352 | + public void setNextFollowupDate(String nextFollowupDate) { | |
353 | + this.nextFollowupDate = nextFollowupDate; | |
354 | + } | |
355 | + | |
356 | + public String getName() { | |
357 | + return name; | |
358 | + } | |
359 | + | |
360 | + public void setName(String name) { | |
361 | + this.name = name; | |
362 | + } | |
363 | + | |
364 | + public String getMaternalFollowupNo() { | |
365 | + return maternalFollowupNo; | |
366 | + } | |
367 | + | |
368 | + public void setMaternalFollowupNo(String maternalFollowupNo) { | |
369 | + this.maternalFollowupNo = maternalFollowupNo; | |
370 | + } | |
371 | + | |
372 | + public String getPersonInfoId() { | |
373 | + return personInfoId; | |
374 | + } | |
375 | + | |
376 | + public void setPersonInfoId(String personInfoId) { | |
377 | + this.personInfoId = personInfoId; | |
378 | + } | |
379 | + | |
380 | + public String getMaternalRegisterId() { | |
381 | + return maternalRegisterId; | |
382 | + } | |
383 | + | |
384 | + public void setMaternalRegisterId(String maternalRegisterId) { | |
385 | + this.maternalRegisterId = maternalRegisterId; | |
386 | + } | |
387 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/Public2PathController.java
View file @
754d317
... | ... | @@ -108,6 +108,21 @@ |
108 | 108 | BaseResponse baseResponse=public2PathFacade.saveMaternalFirstFollowup(startDate,endDate,hospitalId); |
109 | 109 | return baseResponse; |
110 | 110 | } |
111 | + /** | |
112 | + * 公卫2.0-新增非首次产前随访 | |
113 | + * @param startDate | |
114 | + * @param endDate | |
115 | + * @param hospitalId | |
116 | + */ | |
117 | + @ResponseBody | |
118 | + @TokenRequired | |
119 | + @RequestMapping(value = "/saveMaternalFollowup", method = RequestMethod.GET) | |
120 | + public BaseResponse saveMaternalFollowup(@RequestParam String startDate, | |
121 | + @RequestParam String endDate, | |
122 | + @RequestParam String hospitalId) { | |
123 | + BaseResponse baseResponse=public2PathFacade.saveMaternalFollowup(startDate,endDate,hospitalId); | |
124 | + return baseResponse; | |
125 | + } | |
111 | 126 | |
112 | 127 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/Public2PathFacade.java
View file @
754d317
... | ... | @@ -9,10 +9,7 @@ |
9 | 9 | import com.lyms.platform.common.utils.*; |
10 | 10 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
11 | 11 | import com.lyms.platform.pojo.*; |
12 | -import com.lyms.platform.query.AntExChuQuery; | |
13 | -import com.lyms.platform.query.BabyCheckModelQuery; | |
14 | -import com.lyms.platform.query.BabyModelQuery; | |
15 | -import com.lyms.platform.query.PatientsQuery; | |
12 | +import com.lyms.platform.query.*; | |
16 | 13 | import jxl.common.BaseUnit; |
17 | 14 | import org.apache.poi.ss.formula.functions.T; |
18 | 15 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -41,6 +38,8 @@ |
41 | 38 | PatientsService patientsService; |
42 | 39 | @Autowired |
43 | 40 | private AntenatalExaminationService antExService; |
41 | + @Autowired | |
42 | + private AntenatalExaminationService antenatalExaminationService; | |
44 | 43 | |
45 | 44 | private static final String URL = "http://222.223.187.132:7076/ph-s-report"; |
46 | 45 | public BaseResponse saveChildInfo(String startDate, String endDate,String hospitalId) { |
... | ... | @@ -267,6 +266,47 @@ |
267 | 266 | e.printStackTrace(); |
268 | 267 | LogUtil.error("新增第一次产前随访---"+model.getId()+"---"+e.getMessage(),null); |
269 | 268 | baseResponse.setErrormsg("新增第一次产前随访---"+model.getId()+"---"+e.getMessage()); |
269 | + } | |
270 | + } | |
271 | + baseResponse.setObject(baseResponseList); | |
272 | + return baseResponse; | |
273 | + } | |
274 | + | |
275 | + public BaseResponse saveMaternalFollowup(String startDate, String endDate, String hospitalId) { | |
276 | + BaseResponse baseResponse=new BaseResponse(); | |
277 | + List<String> baseResponseList=new ArrayList<>();//记录错误信息 | |
278 | + AntExQuery modelQuery = new AntExQuery(); | |
279 | + modelQuery.setYn(YnEnums.YES.getId()); | |
280 | + modelQuery.setHospitalId(hospitalId); | |
281 | + modelQuery.setStart(DateUtil.getDayFirstSecond(DateUtil.parseYMD(startDate))); | |
282 | + modelQuery.setEnd(DateUtil.getDayLastSecond(DateUtil.parseYMD(endDate))); | |
283 | + List <AntenatalExaminationModel> models = antenatalExaminationService.queryAntenatalExamination(modelQuery.convertToQuery()); | |
284 | + String url=URL+"/thirdApi/saveMaternalFollowup/v1";//新增上传 | |
285 | + for (AntenatalExaminationModel model : models) { | |
286 | + try { | |
287 | + //数据转换 | |
288 | + SaveMaternalFollowupInfo modelInfo=new SaveMaternalFollowupInfo(); | |
289 | + modelInfo.convertToDataModel(model); | |
290 | + String jsonString = JSON.toJSONString(modelInfo); | |
291 | + //上传数据 | |
292 | + String result=repeatPost(url,jsonString); | |
293 | + if(StringUtils.isNotEmpty(result)){ | |
294 | + List<UploadResult_Public2> results=JsonUtil.jsonToList(result, UploadResult.class); | |
295 | + if("0".equals(results.get(0).getCode())){ | |
296 | + baseResponseList.add("新增非首次产前随访---"+model.getId()+"---code:"+results.get(0).getCode()+"message:"+results.get(0).getMessage()); | |
297 | + LogUtil.taskInfo("新增非首次产前随访---"+model.getId()+"---code:"+results.get(0).getCode()+"message:"+results.get(0).getMessage()); | |
298 | + }else { | |
299 | + baseResponseList.add("新增非首次产前随访---"+model.getId()+"---code:"+results.get(0).getCode()+"message:"+results.get(0).getMessage()); | |
300 | + LogUtil.error("新增非首次产前随访---"+model.getId()+"---code:"+results.get(0).getCode()+"message:"+results.get(0).getMessage(),null); | |
301 | + } | |
302 | + }else { | |
303 | + baseResponseList.add("新增非首次产前随访---"+model.getId()+"---上传返回结果为null"); | |
304 | + LogUtil.error("新增非首次产前随访---"+model.getId()+"---上传返回结果为null",null); | |
305 | + } | |
306 | + } catch (Exception e) { | |
307 | + e.printStackTrace(); | |
308 | + LogUtil.error("新增非首次产前随访---"+model.getId()+"---"+e.getMessage(),null); | |
309 | + baseResponse.setErrormsg("新增非首次产前随访---"+model.getId()+"---"+e.getMessage()); | |
270 | 310 | } |
271 | 311 | } |
272 | 312 | baseResponse.setObject(baseResponseList); |