Commit eed43d64d4243608835c0c017fb94703d7c09bc2
1 parent
17c8c53981
Exists in
master
and in
6 other branches
秦皇岛冠新公卫接口
Showing 3 changed files with 131 additions and 2 deletions
platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java
View file @
eed43d6
| ... | ... | @@ -44,6 +44,26 @@ |
| 44 | 44 | |
| 45 | 45 | private Date createdTimeStart; |
| 46 | 46 | |
| 47 | + private Date modifiedStart; | |
| 48 | + | |
| 49 | + private Date modifiedEnd; | |
| 50 | + | |
| 51 | + public Date getModifiedStart() { | |
| 52 | + return modifiedStart; | |
| 53 | + } | |
| 54 | + | |
| 55 | + public void setModifiedStart(Date modifiedStart) { | |
| 56 | + this.modifiedStart = modifiedStart; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public Date getModifiedEnd() { | |
| 60 | + return modifiedEnd; | |
| 61 | + } | |
| 62 | + | |
| 63 | + public void setModifiedEnd(Date modifiedEnd) { | |
| 64 | + this.modifiedEnd = modifiedEnd; | |
| 65 | + } | |
| 66 | + | |
| 47 | 67 | public Date getCreatedTimeStart() { |
| 48 | 68 | return createdTimeStart; |
| 49 | 69 | } |
| ... | ... | @@ -220,6 +240,15 @@ |
| 220 | 240 | c = c.where("created").gte(createdTimeStart).lte(createdTimeEnd); |
| 221 | 241 | } else { |
| 222 | 242 | c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd); |
| 243 | + } | |
| 244 | + isAddStart = Boolean.TRUE; | |
| 245 | + } | |
| 246 | + | |
| 247 | + if (null != modifiedStart && modifiedEnd != null) { | |
| 248 | + if (null != c) { | |
| 249 | + c = c.where("modified").gte(modifiedStart).lte(modifiedEnd); | |
| 250 | + } else { | |
| 251 | + c = Criteria.where("modified").gte(modifiedStart).lte(modifiedEnd); | |
| 223 | 252 | } |
| 224 | 253 | isAddStart = Boolean.TRUE; |
| 225 | 254 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java
View file @
eed43d6
| ... | ... | @@ -14,12 +14,15 @@ |
| 14 | 14 | import com.lyms.platform.permission.service.OrganizationService; |
| 15 | 15 | import com.lyms.platform.permission.service.UsersService; |
| 16 | 16 | import com.lyms.platform.pojo.AntExChuModel; |
| 17 | +import com.lyms.platform.pojo.AntenatalExaminationModel; | |
| 17 | 18 | import com.lyms.platform.pojo.BasicConfig; |
| 18 | 19 | import com.lyms.platform.pojo.Patients; |
| 19 | 20 | import com.lyms.platform.query.AntExChuQuery; |
| 21 | +import com.lyms.platform.query.AntExQuery; | |
| 20 | 22 | import com.lyms.platform.query.PatientsQuery; |
| 21 | 23 | import org.apache.commons.collections.MapUtils; |
| 22 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
| 25 | +import org.springframework.data.domain.Sort; | |
| 23 | 26 | import org.springframework.stereotype.Service; |
| 24 | 27 | |
| 25 | 28 | import java.util.ArrayList; |
| 26 | 29 | |
| ... | ... | @@ -122,9 +125,9 @@ |
| 122 | 125 | antExChuQuery.setModifiedEnd(DateUtil.parseYMDHMS(endDate)); |
| 123 | 126 | List<AntExChuModel> list = antExService.queryAntExChu(antExChuQuery); |
| 124 | 127 | if(list != null && list.size() > 0){ |
| 125 | - Patients patients = patientsService.findOnePatientById(list.get(0).getParentId()); | |
| 126 | 128 | for(AntExChuModel antExChuModel : list){ |
| 127 | 129 | try{ |
| 130 | + Patients patients = patientsService.findOnePatientById(antExChuModel.getParentId()); | |
| 128 | 131 | String cDueWeek = ResolveUtils.getPregnancyWeek(patients.getLastMenses(), antExChuModel.getCheckTime()); |
| 129 | 132 | int week = Integer.parseInt(cDueWeek.substring(1, cDueWeek.indexOf("周"))); |
| 130 | 133 | int day = Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+")+1, cDueWeek.indexOf("天"))); |
| ... | ... | @@ -316,6 +319,83 @@ |
| 316 | 319 | |
| 317 | 320 | return mList; |
| 318 | 321 | } |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + /** | |
| 326 | + * 复诊 | |
| 327 | + * @param startDate | |
| 328 | + * @param endDate | |
| 329 | + * @return | |
| 330 | + */ | |
| 331 | + public List<Map<String,String>> getFuZhen(String startDate,String endDate){ | |
| 332 | + List<Map<String,String>> mList = new ArrayList<Map<String,String>>(); | |
| 333 | + AntExQuery antExQuery = new AntExQuery(); | |
| 334 | + antExQuery.setModifiedStart(DateUtil.parseYMDHMS(startDate)); | |
| 335 | + antExQuery.setModifiedEnd(DateUtil.parseYMDHMS(endDate)); | |
| 336 | + List<AntenatalExaminationModel> list = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); | |
| 337 | + if(list != null && list.size() > 0){ | |
| 338 | + for(AntenatalExaminationModel data : list){ | |
| 339 | + try{ | |
| 340 | + Patients patients = patientsService.findOnePatientById(data.getParentId()); | |
| 341 | + String cDueWeek = ResolveUtils.getPregnancyWeek(patients.getLastMenses(), data.getCheckDate()); | |
| 342 | + int week = Integer.parseInt(cDueWeek.substring(1, cDueWeek.indexOf("周"))); | |
| 343 | + int day = Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+") + 1, cDueWeek.indexOf("天"))); | |
| 344 | + Map<String,String> map = new HashMap<String,String>(); | |
| 345 | + map.put("MATERNALFOLLOWUPID",data.getId()); | |
| 346 | + map.put("MATERNALINFOID",patients.getId()); | |
| 347 | + map.put("NAME",patients.getUsername()); | |
| 348 | + map.put("FOLLOWUPDATE",DateUtil.getyyyy_MM_dd(data.getCheckDate())); | |
| 349 | + map.put("GESTWEEKS",String.valueOf(week)); | |
| 350 | + map.put("GESTDAYS",String.valueOf(day)); | |
| 351 | + map.put("WEIGHT",String.valueOf(data.getWeight())); | |
| 352 | + map.put("CHIEFCOMPLAINT",data.getChiefComplaint()); | |
| 353 | + map.put("FUNDUSHEIGHT",data.getGongGao()); | |
| 354 | + map.put("ABDOMEN_CIRCUM",data.getAbdominalCircumference()); | |
| 355 | + map.put("FETUSPOSITIONVALUE",null); | |
| 356 | + String ssy = ""; | |
| 357 | + String szy = ""; | |
| 358 | + Map<String, String> chBpMap = JsonUtil.getMap(data.getBp()); | |
| 359 | + if (MapUtils.isNotEmpty(chBpMap)) { | |
| 360 | + ssy = chBpMap.get("ssy"); | |
| 361 | + szy = chBpMap.get("szy"); | |
| 362 | + } | |
| 363 | + map.put("SBP",ssy); | |
| 364 | + map.put("DBP",szy); | |
| 365 | + map.put("HGB",data.getHemoglobin()); | |
| 366 | + map.put("PROQUANTESTVALUE",data.getUrineProtein()); | |
| 367 | + map.put("NEXTFOLLOWUPDATE",DateUtil.getyyyy_MM_dd(data.getNextCheckTime())); | |
| 368 | + map.put("FOLLOWUPDOCTORID",data.getCheckDoctor()); | |
| 369 | + String checkDoctor = ""; | |
| 370 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getCheckDoctor())) { | |
| 371 | + Users users = usersService.getUsers(Integer.parseInt(data.getCheckDoctor())); | |
| 372 | + if (users != null && users.getYn() == YnEnums.YES.getId()) { | |
| 373 | + checkDoctor = users.getName(); | |
| 374 | + } | |
| 375 | + } | |
| 376 | + map.put("FOLLOWUPDOCTORNAME",checkDoctor); | |
| 377 | + map.put("ORGCODE",patients.getHospitalId()); | |
| 378 | + String hospital = ""; | |
| 379 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getHospitalId())) { | |
| 380 | + Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getHospitalId())); | |
| 381 | + if (organization != null && organization.getYn() == YnEnums.YES.getId()) { | |
| 382 | + hospital = organization.getName(); | |
| 383 | + } | |
| 384 | + } | |
| 385 | + map.put("ORGNAME",hospital); | |
| 386 | + | |
| 387 | + mList.add(map); | |
| 388 | + }catch (Exception e){ | |
| 389 | + e.printStackTrace(); | |
| 390 | + continue; | |
| 391 | + } | |
| 392 | + } | |
| 393 | + | |
| 394 | + } | |
| 395 | + | |
| 396 | + return mList; | |
| 397 | + } | |
| 398 | + | |
| 319 | 399 | |
| 320 | 400 | |
| 321 | 401 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/QhdJbgwController.java
View file @
eed43d6
| ... | ... | @@ -38,11 +38,31 @@ |
| 38 | 38 | @ResponseBody |
| 39 | 39 | public List<Map<String,String>> qhdChuZhen(@RequestBody Map<String,String> map){ |
| 40 | 40 | if(StringUtils.isNotEmpty(map.get("startDate")) && StringUtils.isNotEmpty(map.get("endDate"))){ |
| 41 | - return qhdJbgwInterface.getChuZhen(map.get("startDate"),map.get("endDate")); | |
| 41 | + return qhdJbgwInterface.getChuZhen(map.get("startDate"), map.get("endDate")); | |
| 42 | 42 | } |
| 43 | 43 | return null; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + | |
| 47 | + @RequestMapping(method = RequestMethod.POST,value = "/qhd/fz") | |
| 48 | + @ResponseBody | |
| 49 | + public List<Map<String,String>> qhdFuZhen(@RequestBody Map<String,String> map){ | |
| 50 | + if(StringUtils.isNotEmpty(map.get("startDate")) && StringUtils.isNotEmpty(map.get("endDate"))){ | |
| 51 | + return qhdJbgwInterface.getFuZhen(map.get("startDate"), map.get("endDate")); | |
| 52 | + } | |
| 53 | + return null; | |
| 54 | + } | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + @RequestMapping(value = "/qhd/chuzhen") | |
| 59 | + @ResponseBody | |
| 60 | + public List<Map<String,String>> qhdCZ(String startDate,String endDate){ | |
| 61 | + if(StringUtils.isNotEmpty(startDate) && StringUtils.isNotEmpty(endDate)){ | |
| 62 | + return qhdJbgwInterface.getChuZhen(startDate,endDate); | |
| 63 | + } | |
| 64 | + return null; | |
| 65 | + } | |
| 46 | 66 | |
| 47 | 67 | |
| 48 | 68 | } |