Commit 62d3bd452ea1c02a3c41ecc35e61c659389d12bb

Authored by gengxiaokai
1 parent 4931272b7a

威海住院号查询分娩建档

Showing 3 changed files with 15 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java View file @ 62d3bd4
... ... @@ -4610,8 +4610,8 @@
4610 4610 /*String startDate = DateUtil.getyyyy_MM_dd_hms(start);
4611 4611 String endDate = DateUtil.getyyyy_MM_dd_hms(end);*/
4612 4612  
4613   - String startDate = "2017-10-01 00:00:00";
4614   - String endDate = "2018-12-17 23:59:59";
  4613 + String startDate = start;
  4614 + String endDate = end;
4615 4615 System.out.println("start=" + startDate + "end=" + endDate);
4616 4616 saveYf(startDate, endDate);
4617 4617 saveChuZhen(startDate, endDate);
platform-operate-api/src/main/java/com/lyms/hospitalapi/whfy/WhfyHisService.java View file @ 62d3bd4
... ... @@ -24,7 +24,7 @@
24 24 WhfyHisModel whfyHisModel = new WhfyHisModel();
25 25 if(StringUtils.isNotEmpty(bhnum)){
26 26 String sql = "select patient_id as bhnum,name,sex,to_char(date_of_birth,'yyyy-mm-dd') as birth," +
27   - "id_no as idno,next_of_kin_phone as phone from lyms.v_patient_idno";
  27 + "id_no as idno,next_of_kin_phone as phone from lyms.v_patient_idno where patient_id='"+bhnum+"'";
28 28 try{
29 29 QueryRunner queryRunner = new QueryRunner(true);
30 30 List<WhfyHisModel> whList = queryRunner.query(conn,sql,new BeanListHandler<WhfyHisModel>(WhfyHisModel.class));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 62d3bd4
... ... @@ -3,6 +3,8 @@
3 3 import com.lyms.hospitalapi.lcdcf.LcdcfFmService;
4 4 import com.lyms.hospitalapi.lcdcf.LcdcfHisModel;
5 5 import com.lyms.hospitalapi.lcdcf.LcdcfHisService;
  6 +import com.lyms.hospitalapi.pojo.WhfyHisModel;
  7 +import com.lyms.hospitalapi.whfy.WhfyHisService;
6 8 import com.lyms.platform.biz.service.*;
7 9 import com.lyms.platform.common.constants.ErrorCodeConstants;
8 10 import com.lyms.platform.common.dao.operator.MongoOper;
... ... @@ -78,6 +80,8 @@
78 80 private SieveService sieveService;
79 81 @Autowired
80 82 private LcdcfHisService lcdcfHisService;
  83 + @Autowired
  84 + private WhfyHisService whfyHisService;
81 85  
82 86 @Autowired
83 87 private LcdcfFmService lcdcfFmService;
... ... @@ -1157,6 +1161,7 @@
1157 1161 String hospital = autoMatchFacade.getHospitalId(userId);
1158 1162  
1159 1163 LcdcfHisModel lcdcfHisModel = null;
  1164 + WhfyHisModel whfyHisModel = null;
1160 1165  
1161 1166 //聊城东昌府分娩界面通过住院号从his中查询到孕妇的身份号码,然后用身份证号码作为院内系统的查询条件查询孕妇信息
1162 1167 if ("2100001305".equals(hospital) && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo())) {
... ... @@ -1164,6 +1169,13 @@
1164 1169 lcdcfHisModel = lcdcfHisService.getHisPatientByZyh(deliverQueryRequest.getZhuYuanNo());
1165 1170 if (lcdcfHisModel != null && StringUtils.isNotEmpty(lcdcfHisModel.getIdCard())) {
1166 1171 deliverQueryRequest.setCardNo(lcdcfHisModel.getIdCard());
  1172 + } else {
  1173 + return new BaseResponse().setErrormsg("该孕妇还未在本院建档不能进行分娩").setErrorcode(ErrorCodeConstants.NO_DATA);
  1174 + }
  1175 + }else if("2100001635".equals(hospital) && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo())){
  1176 + whfyHisModel = whfyHisService.getIdNo(deliverQueryRequest.getZhuYuanNo());
  1177 + if (whfyHisModel != null && StringUtils.isNotEmpty(whfyHisModel.getIdno())) {
  1178 + deliverQueryRequest.setCardNo(whfyHisModel.getIdno());
1167 1179 } else {
1168 1180 return new BaseResponse().setErrormsg("该孕妇还未在本院建档不能进行分娩").setErrorcode(ErrorCodeConstants.NO_DATA);
1169 1181 }