Commit 2a321e4ea149918257f281c35f929bb58e470197
1 parent
88201def0f
Exists in
dev
#fix:新增小程序获取院内测量数据接口及优化高危指导
Showing 10 changed files with 120 additions and 11 deletions
- platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
- platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
- platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.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/result/AntenatalExaminationResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
2a321e4
| ... | ... | @@ -1244,7 +1244,13 @@ |
| 1244 | 1244 | return md.format(date); |
| 1245 | 1245 | } |
| 1246 | 1246 | |
| 1247 | - | |
| 1247 | + public static String formatYMDDate(Date date) { | |
| 1248 | + if (date == null) { | |
| 1249 | + return ""; | |
| 1250 | + } | |
| 1251 | + SimpleDateFormat md = new SimpleDateFormat("yyyy-MM-dd"); | |
| 1252 | + return md.format(date); | |
| 1253 | + } | |
| 1248 | 1254 | /** |
| 1249 | 1255 | * @auther HuJiaqi |
| 1250 | 1256 | * @createTime 2016年11月29日 11时30分 |
platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
View file @
2a321e4
| ... | ... | @@ -43,6 +43,18 @@ |
| 43 | 43 | return String.valueOf(cs); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + public static String dtDueWeek(int days) { | |
| 47 | + if (days >= 301) { | |
| 48 | + return "已分娩"; | |
| 49 | + } | |
| 50 | + int week = (days / 7); | |
| 51 | + String str = ""; | |
| 52 | +// if (week > 0) { | |
| 53 | + str = week + "周"; | |
| 54 | +// } | |
| 55 | + return "孕" + str ; | |
| 56 | + } | |
| 57 | + | |
| 46 | 58 | public static String dueWeek(int days) { |
| 47 | 59 | if (days >= 301) { |
| 48 | 60 | return "已分娩"; |
platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java
View file @
2a321e4
| ... | ... | @@ -57,6 +57,7 @@ |
| 57 | 57 | |
| 58 | 58 | private Date nextCheckTimeStartDate; |
| 59 | 59 | private Date nextCheckTimeEndDate; |
| 60 | + private boolean isWx =false; | |
| 60 | 61 | |
| 61 | 62 | public Date getNextCheckTimeStartDate() { |
| 62 | 63 | return nextCheckTimeStartDate; |
| ... | ... | @@ -236,6 +237,14 @@ |
| 236 | 237 | this.nextCheckTime = nextCheckTime; |
| 237 | 238 | } |
| 238 | 239 | |
| 240 | + public boolean isWx() { | |
| 241 | + return isWx; | |
| 242 | + } | |
| 243 | + | |
| 244 | + public void setWx(boolean wx) { | |
| 245 | + isWx = wx; | |
| 246 | + } | |
| 247 | + | |
| 239 | 248 | @Override |
| 240 | 249 | public MongoQuery convertToQuery() { |
| 241 | 250 | MongoCondition condition = MongoCondition.newInstance(); |
| ... | ... | @@ -248,6 +257,11 @@ |
| 248 | 257 | |
| 249 | 258 | if (null != hospitalId) { |
| 250 | 259 | condition = condition.and("hospitalId", hospitalId, MongoOper.IS); |
| 260 | + } | |
| 261 | + | |
| 262 | + if (isWx){ | |
| 263 | + condition = condition.and("weight", true, MongoOper.EXISTS); | |
| 264 | + condition = condition.and("bp", true, MongoOper.EXISTS); | |
| 251 | 265 | } |
| 252 | 266 | |
| 253 | 267 | if (null != hospitalIds && hospitalIds.size() > 0) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
2a321e4
| ... | ... | @@ -561,6 +561,21 @@ |
| 561 | 561 | return antExRecordFacade.queryAnteHistory(hospitalId, pid); |
| 562 | 562 | } |
| 563 | 563 | |
| 564 | + /** | |
| 565 | + * 小程序返回院内测量数据 | |
| 566 | + * @param pid | |
| 567 | + * @param hospitalId | |
| 568 | + * @return | |
| 569 | + */ | |
| 570 | + @RequestMapping(value = "/wx/queryMeasurementHistory", method = RequestMethod.GET) | |
| 571 | + @ResponseBody | |
| 572 | + public BaseResponse queryMeasurementHistory( | |
| 573 | + @RequestParam(value = "pid") String pid, | |
| 574 | + @RequestParam(value = "hospitalId") String hospitalId) { | |
| 575 | + | |
| 576 | + return antExRecordFacade.queryMeasurementHistory(hospitalId, pid); | |
| 577 | + } | |
| 578 | + | |
| 564 | 579 | |
| 565 | 580 | @RequestMapping(value = "/queryAnte", method = RequestMethod.GET) |
| 566 | 581 | @ResponseBody |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
View file @
2a321e4
| ... | ... | @@ -622,7 +622,7 @@ |
| 622 | 622 | return antenatalExaminationFacade.addPatientNipt(patientNiptDTO,userId); |
| 623 | 623 | } |
| 624 | 624 | //大同需要特殊处理的护士名称 |
| 625 | - private static final String doctors="孙慧洁,曹琴,温燕芳,牛冬燕,王改然,杜文瑞,习亚美,卫娜,施春花,胡雪娇,田保来,石海燕"; | |
| 625 | + private static final String doctors="孙慧洁,曹琴,温燕芳,牛冬燕,王改然,杜文瑞,习亚美,卫娜,施春花,胡雪娇,田保来,石海燕,许谨平"; | |
| 626 | 626 | |
| 627 | 627 | /** |
| 628 | 628 | * 预约挂号列表查询 |
| ... | ... | @@ -814,7 +814,7 @@ |
| 814 | 814 | endTime=endTime+" 23:59:59"; |
| 815 | 815 | String dept=null; |
| 816 | 816 | //只有护士长和主任可以看统计(目前) |
| 817 | - if (doctor.equals("田保来")||doctor.equals("孙慧洁")){ | |
| 817 | + if (doctor.equals("田保来")||doctor.equals("孙慧洁")||doctor.equals("许谨平")){ | |
| 818 | 818 | dept="产科"; |
| 819 | 819 | }else { |
| 820 | 820 | return new BaseObjectResponse().setErrorcode(-1).setErrormsg("权限异常"); |
| ... | ... | @@ -932,7 +932,7 @@ |
| 932 | 932 | endTime=endTime+" 23:59:59"; |
| 933 | 933 | String dept=null; |
| 934 | 934 | //只有护士长和主任可以看统计(目前) |
| 935 | - if (doctor.equals("田保来")||doctor.equals("孙慧洁")){ | |
| 935 | + if (doctor.equals("田保来")||doctor.equals("孙慧洁")||doctor.equals("许谨平")){ | |
| 936 | 936 | if (StringUtils.isEmpty(deptName)){ |
| 937 | 937 | dept="产科"; |
| 938 | 938 | } |
| ... | ... | @@ -1014,7 +1014,7 @@ |
| 1014 | 1014 | if (authorization.contains(Authorization)){ |
| 1015 | 1015 | String doctor= appointmentExport.getDoctor(); |
| 1016 | 1016 | String dept=null; |
| 1017 | - if (doctor.equals("田保来")||doctor.equals("孙慧洁")){ | |
| 1017 | + if (doctor.equals("田保来")||doctor.equals("孙慧洁")||doctor.equals("许谨平")){ | |
| 1018 | 1018 | dept="产科"; |
| 1019 | 1019 | }else { |
| 1020 | 1020 | return; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
2a321e4
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | import com.lyms.platform.operate.web.request.CjStatisticsQueryRequest; |
| 15 | 15 | import com.lyms.platform.operate.web.request.NutritionInfoRequest; |
| 16 | 16 | import com.lyms.platform.operate.web.result.*; |
| 17 | +import com.lyms.platform.operate.web.service.PatientWeightService; | |
| 17 | 18 | import com.lyms.platform.operate.web.service.TeamService; |
| 18 | 19 | import com.lyms.platform.operate.web.utils.FunvCommonUtil; |
| 19 | 20 | import com.lyms.platform.operate.web.utils.ResolveUtils; |
| ... | ... | @@ -2340,6 +2341,50 @@ |
| 2340 | 2341 | return null; |
| 2341 | 2342 | } |
| 2342 | 2343 | |
| 2344 | + @Autowired | |
| 2345 | + private PatientWeightService patientWeightService; | |
| 2346 | + | |
| 2347 | + public BaseResponse queryMeasurementHistory(String hospitalId, String pid) { | |
| 2348 | + if (StringUtils.isNotEmpty(hospitalId) && StringUtils.isNotEmpty(pid)) { | |
| 2349 | + | |
| 2350 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 2351 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 2352 | + antExChuQuery.setParentId(pid); | |
| 2353 | + antExChuQuery.setHospitalId(hospitalId); | |
| 2354 | + List <AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 2355 | + AntExChuModel antExChuModel = null; | |
| 2356 | + if (CollectionUtils.isNotEmpty(antExChuModels)) { | |
| 2357 | + antExChuModel = antExChuModels.get(0); | |
| 2358 | + } | |
| 2359 | + if (antExChuModel==null) { | |
| 2360 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setData(null).setErrormsg("成功"); | |
| 2361 | + } | |
| 2362 | + | |
| 2363 | + AntExQuery antExQuery = new AntExQuery(); | |
| 2364 | + antExQuery.setParentId(pid); | |
| 2365 | + antExQuery.setYn(YnEnums.YES.getId()); | |
| 2366 | + antExQuery.setHospitalId(hospitalId); | |
| 2367 | + antExQuery.setWx(true); | |
| 2368 | + List<AntenatalExaminationModel> examinationModelList= antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
| 2369 | + if (CollectionUtils.isEmpty(examinationModelList)){ | |
| 2370 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setData(null).setErrormsg("成功"); | |
| 2371 | + } | |
| 2372 | + List<Map<String,String>> list=new ArrayList<>(); | |
| 2373 | + String height=antExChuModel.getHeight(); | |
| 2374 | + for (AntenatalExaminationModel model:examinationModelList) { | |
| 2375 | + Map<String,String> params=new HashMap<>(); | |
| 2376 | + String weight=model.getWeight().toString(); | |
| 2377 | + params.put("date",DateUtil.formatYMDDate(model.getCheckDate())); | |
| 2378 | + params.put("weight",weight); | |
| 2379 | + params.put("bp",model.getBp()); | |
| 2380 | + params.put("height",height); | |
| 2381 | + params.put("bmi",patientWeightService.getBmi(weight, height)); | |
| 2382 | + list.add(params); | |
| 2383 | + } | |
| 2384 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setData(list).setErrormsg("成功"); | |
| 2385 | + } | |
| 2386 | + return null; | |
| 2387 | + } | |
| 2343 | 2388 | |
| 2344 | 2389 | public BaseResponse querOne(Integer userId, String pid) { |
| 2345 | 2390 | String hospital = autoMatchFacade.getHospitalId(userId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
2a321e4
| ... | ... | @@ -3092,7 +3092,7 @@ |
| 3092 | 3092 | } |
| 3093 | 3093 | |
| 3094 | 3094 | public BaseObjectResponse saveRisData(List <RisInfoModelRequest> models) { |
| 3095 | - System.out.println("----------1-----------" + models.size()); | |
| 3095 | + //System.out.println("----------1-----------" + models.size()); | |
| 3096 | 3096 | if (CollectionUtils.isNotEmpty(models)) { |
| 3097 | 3097 | for (RisInfoModelRequest risInfoModelRequest : models) { |
| 3098 | 3098 | if (StringUtils.isNotEmpty(risInfoModelRequest.getHospitalId())) { |
| ... | ... | @@ -3101,7 +3101,7 @@ |
| 3101 | 3101 | patientsQuery1.setHospitalId(risInfoModelRequest.getHospitalId()); |
| 3102 | 3102 | patientsQuery1.setVcCardNo(risInfoModelRequest.getVCCARDNO()); |
| 3103 | 3103 | patientsQuery1.setPhone(risInfoModelRequest.getPHONE()); |
| 3104 | - System.out.println("----------2-----------" + patientsQuery1.convertToQuery().convertToMongoQuery()); | |
| 3104 | + //System.out.println("----------2-----------" + patientsQuery1.convertToQuery().convertToMongoQuery()); | |
| 3105 | 3105 | List <Patients> patientses = patientsService.queryPatient(patientsQuery1); |
| 3106 | 3106 | if (CollectionUtils.isNotEmpty(patientses)) { |
| 3107 | 3107 | Patients patients = patientses.get(0); |
| ... | ... | @@ -4473,6 +4473,20 @@ |
| 4473 | 4473 | if (null != data) { |
| 4474 | 4474 | data = patients.getLastMenses(); |
| 4475 | 4475 | } |
| 4476 | + String dueWeek=""; | |
| 4477 | + if (null != patients.getDueStatus() && 1 == patients.getDueStatus()) { | |
| 4478 | + dueWeek = "终止妊娠"; | |
| 4479 | + | |
| 4480 | + } else if (3 == patients.getType()) { | |
| 4481 | + dueWeek = "已分娩"; | |
| 4482 | + | |
| 4483 | + } else { | |
| 4484 | + if (null != patients.getLastMenses()) { | |
| 4485 | + int days = DateUtil.daysBetween(patients.getLastMenses(), examinationModel.getCheckDate()); | |
| 4486 | + dueWeek = com.lyms.platform.common.utils.StringUtils.dueWeek(days); | |
| 4487 | + } | |
| 4488 | + } | |
| 4489 | + antenatalExaminationResult.setCurrentDueDate(dueWeek); | |
| 4476 | 4490 | antenatalExaminationResult.setVcCardNo(patients.getVcCardNo()); |
| 4477 | 4491 | String doctorId = examinationModel.getCheckDoctor(); |
| 4478 | 4492 | if (StringUtils.isNotEmpty(doctorId)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
2a321e4
| ... | ... | @@ -1656,7 +1656,8 @@ |
| 1656 | 1656 | */ |
| 1657 | 1657 | public void serviceExpireSync() { |
| 1658 | 1658 | logger.info("serviceExpireSync startup..."); |
| 1659 | - PatientServiceQuery query=new PatientServiceQuery(); | |
| 1659 | + //20251228需求要求注释掉 | |
| 1660 | + /* PatientServiceQuery query=new PatientServiceQuery(); | |
| 1660 | 1661 | final String hospitalId = "2100002419"; |
| 1661 | 1662 | query.setHospitalId(hospitalId); |
| 1662 | 1663 | //query.setPerType(1); |
| ... | ... | @@ -1704,7 +1705,7 @@ |
| 1704 | 1705 | } |
| 1705 | 1706 | }); |
| 1706 | 1707 | |
| 1707 | - } | |
| 1708 | + }*/ | |
| 1708 | 1709 | logger.info("serviceExpireSync end..."); |
| 1709 | 1710 | |
| 1710 | 1711 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntenatalExaminationResult.java
View file @
2a321e4
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | import com.mchange.v2.uid.UidUtils; |
| 10 | 10 | import scala.actors.threadpool.Arrays; |
| 11 | 11 | |
| 12 | +import java.util.Date; | |
| 12 | 13 | import java.util.Iterator; |
| 13 | 14 | import java.util.List; |
| 14 | 15 | import java.util.Map; |
| ... | ... | @@ -1416,7 +1417,8 @@ |
| 1416 | 1417 | setChiefComplaint(destModel.getChiefComplaint()); |
| 1417 | 1418 | |
| 1418 | 1419 | // setCheckDoctor(destModel.getCheckDoctor()); |
| 1419 | - setCurrentDueDate(destModel.getCurrentDueDate()); | |
| 1420 | + /* setCurrentDueDate(destModel.getCurrentDueDate());*/ | |
| 1421 | + | |
| 1420 | 1422 | setGuide(destModel.getGuide()); |
| 1421 | 1423 | setHemoglobin(destModel.getHemoglobin()); |
| 1422 | 1424 | setId(destModel.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
View file @
2a321e4
| ... | ... | @@ -384,7 +384,7 @@ |
| 384 | 384 | |
| 385 | 385 | if (null != patients.getLastMenses()) { |
| 386 | 386 | int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); |
| 387 | - this.dueWeek = patients.getType() == 3 ? "已分娩" : StringUtils.dueWeek(days); | |
| 387 | + this.dueWeek = patients.getType() == 3 ? "已分娩" : patients.getHospitalId().equals("2100002419")?StringUtils.dtDueWeek(days):StringUtils.dueWeek(days); | |
| 388 | 388 | |
| 389 | 389 | setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); |
| 390 | 390 | } |