Commit a5c266454e2dff29ec8a5a685740ce6877ae4f98
1 parent
25230f5d8a
Exists in
master
and in
6 other branches
追访
Showing 1 changed file with 55 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
a5c2664
... | ... | @@ -2362,6 +2362,60 @@ |
2362 | 2362 | } |
2363 | 2363 | |
2364 | 2364 | /** |
2365 | + * 根据身份证号或者就诊卡号查询产妇 | |
2366 | + * | |
2367 | + * @param cardNo 身份证号 | |
2368 | + * @param vcCardNo 就诊卡号 | |
2369 | + * @param type 类型 1 孕妇 3 产妇 -1 不区分 | |
2370 | + * @param outHospital 是否需要查外院 | |
2371 | + */ | |
2372 | + public Patients findOnePatient(String cardNo, String vcCardNo,List<String> hospitalIds, Integer | |
2373 | + type, boolean outHospital, boolean isEnable,String hospitalId) { | |
2374 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
2375 | + if (StringUtils.isNotEmpty(cardNo)) { | |
2376 | + patientsQuery.setCardNo(cardNo); | |
2377 | + } | |
2378 | + | |
2379 | + if (StringUtils.isNotEmpty(vcCardNo)) { | |
2380 | + //德州市妇幼保健院医院通过(就诊卡号、银行卡号,社保卡号) 查询出对应的用过的卡号 add lqy | |
2381 | + if ("1000000114".equals(hospitalIds)) { | |
2382 | + patientsQuery.setVcCardNos(dzfyHisService.getDzVcCardNos(vcCardNo)); | |
2383 | + } else { | |
2384 | + patientsQuery.setVcCardNo(vcCardNo); | |
2385 | + } | |
2386 | + } | |
2387 | + | |
2388 | + patientsQuery.setType(type); | |
2389 | + patientsQuery.setHospitalList(hospitalIds); | |
2390 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
2391 | + patientsQuery.setBuildType(1); | |
2392 | + if (isEnable) { | |
2393 | + patientsQuery.setEnable("2"); | |
2394 | + } | |
2395 | + Patients patients = null; | |
2396 | + List<Patients> list = patientsService.queryPatient1(patientsQuery, "modified"); | |
2397 | + if (CollectionUtils.isNotEmpty(list)) { | |
2398 | + if(list.size()==1){ | |
2399 | + return list.get(0); | |
2400 | + }else{ | |
2401 | + for(Patients ps:list){ | |
2402 | + if(hospitalId.equals(ps.getHospitalId())){ | |
2403 | + return ps; | |
2404 | + } | |
2405 | + } | |
2406 | + } | |
2407 | + } | |
2408 | + if (outHospital) { | |
2409 | + patientsQuery.setHospitalId(null); | |
2410 | + list = patientsService.queryPatient1(patientsQuery, "modified"); | |
2411 | + if (CollectionUtils.isNotEmpty(list)) { | |
2412 | + return list.get(0); | |
2413 | + } | |
2414 | + } | |
2415 | + return patients; | |
2416 | + } | |
2417 | + | |
2418 | + /** | |
2365 | 2419 | * 查看是否满足产筛申请条件 |
2366 | 2420 | * <p/> |
2367 | 2421 | * 1.孕周 15周-到20 周 并且没有做过产筛 |
... | ... | @@ -2453,7 +2507,7 @@ |
2453 | 2507 | if (StringUtils.isEmpty(queryRequest.getCardNo()) && StringUtils.isEmpty(queryRequest.getVcCardNo())) { |
2454 | 2508 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请输入查询条件"); |
2455 | 2509 | } |
2456 | - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, currentGroupHospital, 1, false, null, og.getbStatus() == 1); | |
2510 | + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), currentGroupHospital, 1, false, og.getbStatus() == 1,hospitalId); | |
2457 | 2511 | //查询产妇数据 |
2458 | 2512 | // patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, hospitalId, 1, false, null, false); |
2459 | 2513 | } |