From a5c266454e2dff29ec8a5a685740ce6877ae4f98 Mon Sep 17 00:00:00 2001 From: yangfei Date: Fri, 13 Jul 2018 15:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=BD=E8=AE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/facade/AntenatalExaminationFacade.java | 56 +++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java index f2d11a2..1ebc100 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java @@ -2362,6 +2362,60 @@ public class AntenatalExaminationFacade { } /** + * 根据身份证号或者就诊卡号查询产妇 + * + * @param cardNo 身份证号 + * @param vcCardNo 就诊卡号 + * @param type 类型 1 孕妇 3 产妇 -1 不区分 + * @param outHospital 是否需要查外院 + */ + public Patients findOnePatient(String cardNo, String vcCardNo,List hospitalIds, Integer + type, boolean outHospital, boolean isEnable,String hospitalId) { + PatientsQuery patientsQuery = new PatientsQuery(); + if (StringUtils.isNotEmpty(cardNo)) { + patientsQuery.setCardNo(cardNo); + } + + if (StringUtils.isNotEmpty(vcCardNo)) { + //德州市妇幼保健院医院通过(就诊卡号、银行卡号,社保卡号) 查询出对应的用过的卡号 add lqy + if ("1000000114".equals(hospitalIds)) { + patientsQuery.setVcCardNos(dzfyHisService.getDzVcCardNos(vcCardNo)); + } else { + patientsQuery.setVcCardNo(vcCardNo); + } + } + + patientsQuery.setType(type); + patientsQuery.setHospitalList(hospitalIds); + patientsQuery.setYn(YnEnums.YES.getId()); + patientsQuery.setBuildType(1); + if (isEnable) { + patientsQuery.setEnable("2"); + } + Patients patients = null; + List list = patientsService.queryPatient1(patientsQuery, "modified"); + if (CollectionUtils.isNotEmpty(list)) { + if(list.size()==1){ + return list.get(0); + }else{ + for(Patients ps:list){ + if(hospitalId.equals(ps.getHospitalId())){ + return ps; + } + } + } + } + if (outHospital) { + patientsQuery.setHospitalId(null); + list = patientsService.queryPatient1(patientsQuery, "modified"); + if (CollectionUtils.isNotEmpty(list)) { + return list.get(0); + } + } + return patients; + } + + /** * 查看是否满足产筛申请条件 *

* 1.孕周 15周-到20 周 并且没有做过产筛 @@ -2453,7 +2507,7 @@ public class AntenatalExaminationFacade { if (StringUtils.isEmpty(queryRequest.getCardNo()) && StringUtils.isEmpty(queryRequest.getVcCardNo())) { return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请输入查询条件"); } - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, currentGroupHospital, 1, false, null, og.getbStatus() == 1); + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), currentGroupHospital, 1, false, og.getbStatus() == 1,hospitalId); //查询产妇数据 // patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, hospitalId, 1, false, null, false); } -- 1.8.3.1