Commit 44701538af5d1b446a62e3db72dca1ddd4ece2f0

Authored by liquanyu
1 parent fd56a76553

分娩

Showing 6 changed files with 55 additions and 16 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/lcdcf/LcdcfFmService.java View file @ 4470153
... ... @@ -21,10 +21,10 @@
21 21 * Created by Administrator on 2018/4/20.
22 22 * 通过住院号获取孕妇分娩信息
23 23 */
24   -@Service("LcdcfFmService")
  24 +@Service("lcdcfFmService")
25 25 public class LcdcfFmService {
26 26  
27   - public static MaternalDeliverResult queryFmPatient(String bhnum){
  27 + public MaternalDeliverResult queryFmPatient(String bhnum){
28 28  
29 29 String cloumns = " ID as ID,\n" +
30 30 " BHNUM as BHNUM,\n" +
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java View file @ 4470153
... ... @@ -173,6 +173,10 @@
173 173 }
174 174  
175 175  
  176 + public void syncByCardNo(String startStr,String endStr,String syxh) {
  177 + queryFmPatient(startStr, endStr, syxh);
  178 + }
  179 +
176 180 public void syncByPhone(String startStr,String endStr,String syxh) {
177 181 queryFmPatient(startStr, endStr,syxh);
178 182 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 4470153
... ... @@ -139,7 +139,7 @@
139 139 private CdfyHisService cdfyHisService;
140 140  
141 141 @Autowired
142   - private com.lyms.hospitalapi.lcdcf.LcdcfFmService LcdcfFmService;
  142 + private com.lyms.hospitalapi.lcdcf.LcdcfFmService lcdcfFmService;
143 143  
144 144  
145 145 static Map<String, String> highRisks = new HashMap<>();
... ... @@ -1696,7 +1696,7 @@
1696 1696 @ResponseBody
1697 1697 public MaternalDeliverResult testLc(String bhnum){
1698 1698  
1699   - return LcdcfFmService.queryFmPatient(bhnum);
  1699 + return lcdcfFmService.queryFmPatient(bhnum);
1700 1700 }
1701 1701  
1702 1702  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 4470153
1 1 package com.lyms.platform.operate.web.facade;
2 2  
  3 +import com.lyms.hospitalapi.lcdcf.LcdcfFmService;
3 4 import com.lyms.hospitalapi.lcdcf.LcdcfHisModel;
4 5 import com.lyms.hospitalapi.lcdcf.LcdcfHisService;
5 6 import com.lyms.platform.biz.service.*;
... ... @@ -65,6 +66,9 @@
65 66 private LcdcfHisService lcdcfHisService;
66 67  
67 68 @Autowired
  69 + private LcdcfFmService lcdcfFmService;
  70 +
  71 + @Autowired
68 72 private AutoMatchFacade autoMatchFacade;
69 73 @Autowired
70 74 private PersonService personService;
71 75  
72 76  
... ... @@ -854,16 +858,21 @@
854 858  
855 859 String hospital = autoMatchFacade.getHospitalId(userId);
856 860  
  861 + LcdcfHisModel lcdcfHisModel = null;
  862 +
857 863 //聊城东昌府分娩界面通过住院号从his中查询到孕妇的身份号码,然后用身份证号码作为院内系统的查询条件查询孕妇信息
858   - if ("2100001305".equals(hospital) && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo())) {
859   - LcdcfHisModel lcdcfHisModel = lcdcfHisService.getHisPatientByZyh(deliverQueryRequest.getZhuYuanNo());
860   - if (lcdcfHisModel != null && StringUtils.isNotEmpty(lcdcfHisModel.getIdCard())) {
861   - deliverQueryRequest.setCardNo(lcdcfHisModel.getIdCard());
862   - } else {
863   - return new BaseResponse().setErrormsg("该孕妇还未在本院建档不能进行分娩").setErrorcode(ErrorCodeConstants.NO_DATA);
864   - }
  864 + if ("1000000116".equals(hospital) && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo())) {
  865 + //if ("2100001305".equals(hospital) && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo())) {
  866 +// lcdcfHisModel = lcdcfHisService.getHisPatientByZyh(deliverQueryRequest.getZhuYuanNo());
  867 +// if (lcdcfHisModel != null && StringUtils.isNotEmpty(lcdcfHisModel.getIdCard())) {
  868 +// //deliverQueryRequest.setCardNo(lcdcfHisModel.getIdCard());
  869 +//
  870 +//
  871 +// } else {
  872 +// return new BaseResponse().setErrormsg("该孕妇还未在本院建档不能进行分娩").setErrorcode(ErrorCodeConstants.NO_DATA);
  873 +// }
865 874 }
866   -
  875 + deliverQueryRequest.setCardNo("63010419900906852X");
867 876 //获取
868 877 /* Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, -1);
869 878 if (null == patients) {
... ... @@ -1013,6 +1022,12 @@
1013 1022 matDeliverListResult.setRiskScore(highScoreResult.getScoreStr());
1014 1023 matDeliverListResult.setTireNumber1(tTireNumber);
1015 1024  
  1025 + //聊城东昌府医院通过住院号查询分娩信息 然后回填到分娩界面
  1026 + if (lcdcfHisModel != null && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo()))
  1027 + {
  1028 + matDeliverListResult.setDeliverData(lcdcfFmService.queryFmPatient(deliverQueryRequest.getZhuYuanNo()));
  1029 + }
  1030 + matDeliverListResult.setDeliverData(lcdcfFmService.queryFmPatient(deliverQueryRequest.getZhuYuanNo()));
1016 1031 } catch (Exception e) {
1017 1032 }
1018 1033 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(matDeliverListResult);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 4470153
... ... @@ -4448,10 +4448,20 @@
4448 4448 map.put("babysex", baby.getBabyGender() == null ? "" : SexEnum.getTextById(
4449 4449 Integer.parseInt(baby.getBabyGender())));
4450 4450  
4451   -
4452   - Integer betweenDay = DateUtil.getDays(pat.getLastMenses(), data.getDueDate1());
4453   - Integer week = betweenDay / 7;
4454   - Integer day = betweenDay % 7;
  4451 + Integer week = 0;
  4452 + Integer day = 0;
  4453 + Map<String, Object> dueMap = data.getHandDueWeek();
  4454 + if (dueMap != null && dueMap.size() > 0)
  4455 + {
  4456 + week = dueMap.get("week") == null ? 0 : Integer.parseInt(String.valueOf(dueMap.get("week")));
  4457 + day = dueMap.get("day") == null ? 0 : Integer.parseInt(String.valueOf(dueMap.get("day")));
  4458 + }
  4459 + else
  4460 + {
  4461 + Integer betweenDay = DateUtil.getDays(pat.getLastMenses(), data.getDueDate1());
  4462 + week = betweenDay / 7;
  4463 + day = betweenDay % 7;
  4464 + }
4455 4465  
4456 4466 Date fmDate = DateUtil.parseYMDHM(baby.getDueTime());
4457 4467  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatDeliverListResult.java View file @ 4470153
... ... @@ -64,6 +64,16 @@
64 64 private String cardNo;
65 65 private String vcCardNo;
66 66  
  67 + private MaternalDeliverResult deliverData;
  68 +
  69 + public MaternalDeliverResult getDeliverData() {
  70 + return deliverData;
  71 + }
  72 +
  73 + public void setDeliverData(MaternalDeliverResult deliverData) {
  74 + this.deliverData = deliverData;
  75 + }
  76 +
67 77 public Integer getDueCount() {
68 78 return dueCount;
69 79 }