Commit ff76a6e9b80c4c5748f9befb9fec52f8342edfab
1 parent
1e7f1826bd
Exists in
master
and in
6 other branches
出院小结
Showing 2 changed files with 436 additions and 389 deletions
platform-dal/src/main/java/com/lyms/platform/query/DischargeAbstractMotherQuery.java
View file @
ff76a6e
... | ... | @@ -25,12 +25,22 @@ |
25 | 25 | |
26 | 26 | private String pid; |
27 | 27 | private String id; |
28 | + private String hospitalId; | |
28 | 29 | |
30 | + | |
29 | 31 | private Date start; |
30 | 32 | private Date end; |
31 | 33 | |
32 | 34 | private int yn=-1; |
33 | 35 | |
36 | + public String getHospitalId() { | |
37 | + return hospitalId; | |
38 | + } | |
39 | + | |
40 | + public void setHospitalId(String hospitalId) { | |
41 | + this.hospitalId = hospitalId; | |
42 | + } | |
43 | + | |
34 | 44 | public String getId() { |
35 | 45 | return id; |
36 | 46 | } |
... | ... | @@ -95,6 +105,11 @@ |
95 | 105 | |
96 | 106 | if(pid!= null){ |
97 | 107 | condition = condition.and("pid", pid, MongoOper.IS); |
108 | + } | |
109 | + | |
110 | + | |
111 | + if(hospitalId!= null){ | |
112 | + condition = condition.and("hospitalId", hospitalId, MongoOper.IS); | |
98 | 113 | } |
99 | 114 | |
100 | 115 | boolean isBirthStart = false; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
ff76a6e
... | ... | @@ -2356,399 +2356,399 @@ |
2356 | 2356 | return map; |
2357 | 2357 | } |
2358 | 2358 | |
2359 | -// | |
2360 | -// /** | |
2361 | -// * 查询冠新ID | |
2362 | -// * | |
2363 | -// * @param name | |
2364 | -// * @param idCard | |
2365 | -// * @return | |
2366 | -// */ | |
2367 | -// @RequestMapping(value = "/cd/id") | |
2368 | -// @ResponseBody | |
2369 | -// public String getId(@RequestParam("name") String name, @RequestParam("idCard") String idCard) { | |
2370 | -// try { | |
2371 | -// String skiName = new String(name.getBytes("ISO-8859-1"), "UTF-8"); | |
2372 | -// String str = "{\"name\":\"" + skiName + "\",\"idNo\":\"" + idCard + "\",\"parentIdNo\":\"\"}"; | |
2373 | -// return cdGwInterface.findPersonInfoId(str); | |
2374 | -// } catch (Exception e) { | |
2375 | -// e.printStackTrace(); | |
2376 | -// } | |
2377 | -// | |
2378 | -// return null; | |
2379 | -// } | |
2380 | -// | |
2381 | -// @RequestMapping(value = "/bp/report") | |
2382 | -// @ResponseBody | |
2383 | -// public String bpReportTrigger(@RequestHeader("Authorization") String header) { | |
2384 | -// if ("lyms".equals(header)) { | |
2385 | -// bloodPressureService.generateBpReport(); | |
2386 | -// return "ss"; | |
2387 | -// } | |
2388 | -// return "error"; | |
2389 | -// } | |
2390 | -// | |
2359 | + | |
2360 | + /** | |
2361 | + * 查询冠新ID | |
2362 | + * | |
2363 | + * @param name | |
2364 | + * @param idCard | |
2365 | + * @return | |
2366 | + */ | |
2367 | + @RequestMapping(value = "/cd/id") | |
2368 | + @ResponseBody | |
2369 | + public String getId(@RequestParam("name") String name, @RequestParam("idCard") String idCard) { | |
2370 | + try { | |
2371 | + String skiName = new String(name.getBytes("ISO-8859-1"), "UTF-8"); | |
2372 | + String str = "{\"name\":\"" + skiName + "\",\"idNo\":\"" + idCard + "\",\"parentIdNo\":\"\"}"; | |
2373 | + return cdGwInterface.findPersonInfoId(str); | |
2374 | + } catch (Exception e) { | |
2375 | + e.printStackTrace(); | |
2376 | + } | |
2377 | + | |
2378 | + return null; | |
2379 | + } | |
2380 | + | |
2381 | + @RequestMapping(value = "/bp/report") | |
2382 | + @ResponseBody | |
2383 | + public String bpReportTrigger(@RequestHeader("Authorization") String header) { | |
2384 | + if ("lyms".equals(header)) { | |
2385 | + bloodPressureService.generateBpReport(); | |
2386 | + return "ss"; | |
2387 | + } | |
2388 | + return "error"; | |
2389 | + } | |
2390 | + | |
2391 | 2391 | @Autowired |
2392 | 2392 | private PatientServiceService patientServiceService; |
2393 | -// | |
2394 | -// @RequestMapping(value = "/rcPatientInfo", method = RequestMethod.GET) | |
2395 | -// @ResponseBody | |
2396 | -// public void rcPatientInfo(@RequestParam(required = false) String hospitalId) { | |
2397 | -// | |
2398 | -// OrganizationQuery organizationQuery = new OrganizationQuery(); | |
2399 | -// organizationQuery.setYn(YnEnums.YES.getId()); | |
2400 | -// if (StringUtils.isNotEmpty(hospitalId)) { | |
2401 | -// organizationQuery.setId(Integer.parseInt(hospitalId)); | |
2402 | -// } | |
2403 | -// List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
2404 | -// | |
2405 | -// PatientsQuery patientsQuery1 = new PatientsQuery(); | |
2406 | -// patientsQuery1.setYn(YnEnums.YES.getId()); | |
2407 | -// if (CollectionUtils.isNotEmpty(organizationList)) { | |
2408 | -// List<String> hids = new ArrayList<>(); | |
2409 | -// for (Organization org :organizationList) | |
2410 | -// { | |
2411 | -// hids.add(org.getId()+""); | |
2412 | -// } | |
2413 | -// patientsQuery1.setHospitalList(hids); | |
2414 | -// } | |
2415 | -// else | |
2416 | -// { | |
2417 | -// patientsQuery1.setHospitalList(rcGlxtService.getHids()); | |
2418 | -// } | |
2419 | -// List<Patients> patientses = patientsService.queryPatient(patientsQuery1); | |
2420 | -// if (CollectionUtils.isNotEmpty(patientses)) | |
2421 | -// { | |
2422 | -// for (Patients pat : patientses) | |
2423 | -// { | |
2424 | -// rcGlxtService.saveRcPatientInfo(pat); | |
2425 | -// } | |
2426 | -// } | |
2427 | -// } | |
2428 | -// | |
2429 | -// @RequestMapping(value = "/rcFmInfo", method = RequestMethod.GET) | |
2430 | -// @ResponseBody | |
2431 | -// public void rcFmInfo(@RequestParam(required = false) String hospitalId) { | |
2432 | -// | |
2433 | -// OrganizationQuery organizationQuery = new OrganizationQuery(); | |
2434 | -// organizationQuery.setYn(YnEnums.YES.getId()); | |
2435 | -// if (StringUtils.isNotEmpty(hospitalId)) { | |
2436 | -// organizationQuery.setId(Integer.parseInt(hospitalId)); | |
2437 | -// } | |
2438 | -// List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
2439 | -// | |
2440 | -// MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | |
2441 | -// matDeliverQuery.setYn(YnEnums.YES.getId()); | |
2442 | -// if (CollectionUtils.isNotEmpty(organizationList)) { | |
2443 | -// List<String> hids = new ArrayList<>(); | |
2444 | -// for (Organization org :organizationList) | |
2445 | -// { | |
2446 | -// hids.add(org.getId()+""); | |
2447 | -// } | |
2448 | -// matDeliverQuery.setFmHospitalList(hids); | |
2449 | -// } | |
2450 | -// else | |
2451 | -// { | |
2452 | -// matDeliverQuery.setFmHospitalList(rcGlxtService.getHids()); | |
2453 | -// } | |
2454 | -// List<MaternalDeliverModel> list2 = matDeliverService.query(matDeliverQuery); | |
2455 | -// | |
2456 | -// if (CollectionUtils.isNotEmpty(list2)) | |
2457 | -// { | |
2458 | -// for (MaternalDeliverModel maternalDeliverModel : list2) | |
2459 | -// { | |
2460 | -// rcGlxtService.saveRcFmInfo(maternalDeliverModel); | |
2461 | -// } | |
2462 | -// } | |
2463 | -// } | |
2464 | -// | |
2465 | -// | |
2466 | -// @RequestMapping(value = "/rcNewBabyInfo", method = RequestMethod.GET) | |
2467 | -// @ResponseBody | |
2468 | -// public void rcNewBabyInfo(@RequestParam(required = false) String hospitalId) { | |
2469 | -// | |
2470 | -// OrganizationQuery organizationQuery = new OrganizationQuery(); | |
2471 | -// organizationQuery.setYn(YnEnums.YES.getId()); | |
2472 | -// if (StringUtils.isNotEmpty(hospitalId)) { | |
2473 | -// organizationQuery.setId(Integer.parseInt(hospitalId)); | |
2474 | -// } | |
2475 | -// List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
2476 | -// | |
2477 | -// MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | |
2478 | -// matDeliverQuery.setYn(YnEnums.YES.getId()); | |
2479 | -// if (CollectionUtils.isNotEmpty(organizationList)) { | |
2480 | -// List<String> hids = new ArrayList<>(); | |
2481 | -// for (Organization org :organizationList) | |
2482 | -// { | |
2483 | -// hids.add(org.getId()+""); | |
2484 | -// } | |
2485 | -// matDeliverQuery.setFmHospitalList(hids); | |
2486 | -// } | |
2487 | -// else | |
2488 | -// { | |
2489 | -// matDeliverQuery.setFmHospitalList(rcGlxtService.getHids()); | |
2490 | -// } | |
2491 | -// List<MaternalDeliverModel> list2 = matDeliverService.query(matDeliverQuery); | |
2492 | -// | |
2493 | -// if (CollectionUtils.isNotEmpty(list2)) | |
2494 | -// { | |
2495 | -// for (MaternalDeliverModel maternalDeliverModel : list2) | |
2496 | -// { | |
2497 | -// rcGlxtService.saveRcNewBabyInfo(maternalDeliverModel); | |
2498 | -// } | |
2499 | -// } | |
2500 | -// } | |
2501 | -// | |
2502 | -// | |
2503 | -// /** | |
2504 | -// *产后访视 | |
2505 | -// * @param hospitalId | |
2506 | -// */ | |
2507 | -// @RequestMapping(value = "/rcFmFollowInfo", method = RequestMethod.GET) | |
2508 | -// @ResponseBody | |
2509 | -// public void rcFmFollowInfo(@RequestParam(required = false) String hospitalId) { | |
2510 | -// | |
2511 | -// MatDeliverFollowQuery matDeliverFollowQuery = new MatDeliverFollowQuery(); | |
2512 | -// List<MatdeliverFollowModel> matdeliverFollowModels = matDeliverFollowService.query(matDeliverFollowQuery); | |
2513 | -// matDeliverFollowQuery.setVisitStatus(2); | |
2514 | -// if (CollectionUtils.isNotEmpty(matdeliverFollowModels)) | |
2515 | -// { | |
2516 | -// for (MatdeliverFollowModel matdeliverFollowModel : matdeliverFollowModels) | |
2517 | -// { | |
2518 | -// rcGlxtService.saveRcMatdeliverFollowInfo(matdeliverFollowModel, rcGlxtService.getHids()); | |
2519 | -// } | |
2520 | -// } | |
2521 | -// } | |
2522 | -// @Autowired | |
2523 | -// private PremaritalCheckupService premaritalCheckupService; | |
2524 | -// | |
2525 | -// /** | |
2526 | -// * 婚前检查 | |
2527 | -// * @param hospitalId | |
2528 | -// */ | |
2529 | -// @RequestMapping(value = "/rcPremaritalCheckup", method = RequestMethod.GET) | |
2530 | -// @ResponseBody | |
2531 | -// public void rcPremaritalCheckup(@RequestParam(required = false) String hospitalId) { | |
2532 | -// | |
2533 | -// PremaritalCheckupQuery query = new PremaritalCheckupQuery(); | |
2534 | -// query.setYn(YnEnums.YES.getId()); | |
2535 | -// query.setHospitalId(hospitalId); | |
2536 | -// query.setSexType(1); | |
2537 | -// List<PremaritalCheckup> checkupList = premaritalCheckupService.queryPremaritalCheckup(query); | |
2538 | -// | |
2539 | -// if (CollectionUtils.isNotEmpty(checkupList)) | |
2540 | -// { | |
2541 | -// for (PremaritalCheckup premaritalCheckup : checkupList) | |
2542 | -// { | |
2543 | -// rcGlxtService.saveRcPremaritalCheckupInfo(premaritalCheckup); | |
2544 | -// } | |
2545 | -// } | |
2546 | -// } | |
2547 | -// | |
2548 | -// | |
2549 | -// /** | |
2550 | -// * 叶酸发放 | |
2551 | -// * @param hospitalId | |
2552 | -// */ | |
2553 | -// @RequestMapping(value = "/rcFolicAcidInfo", method = RequestMethod.GET) | |
2554 | -// @ResponseBody | |
2555 | -// public void rcFolicAcidInfo(@RequestParam(required = false) String hospitalId) { | |
2556 | -// | |
2557 | -// FolicAcidQuery folicAcidQuery = new FolicAcidQuery(); | |
2558 | -// folicAcidQuery.setYn(YnEnums.YES.getId()); | |
2559 | -// | |
2560 | -// List<FolicAcid> folicAcidList = folicAcidService.queryFolicAcidWithSort(folicAcidQuery, "drawTime", Sort.Direction.ASC); | |
2561 | -// | |
2562 | -// if (CollectionUtils.isNotEmpty(folicAcidList)) | |
2563 | -// { | |
2564 | -// for (FolicAcid folicAcid : folicAcidList) | |
2565 | -// { | |
2566 | -// rcGlxtService.saveRcFolicAcidInfo(folicAcid); | |
2567 | -// } | |
2568 | -// } | |
2569 | -// } | |
2570 | -// | |
2571 | -// /** | |
2572 | -// * 孕期筛查表 | |
2573 | -// * @param hospitalId | |
2574 | -// */ | |
2575 | -// @RequestMapping(value = "/rcSieveInfo", method = RequestMethod.GET) | |
2576 | -// @ResponseBody | |
2577 | -// public void rcSieveInfo(@RequestParam(required = false) String hospitalId) { | |
2578 | -// SieveResultQuery sieveResultQuery = new SieveResultQuery(); | |
2579 | -// sieveResultQuery.setYn(YnEnums.YES.getId()); | |
2580 | -// List<SieveResultModel> list = sieveService.queryListSieveResult(sieveResultQuery); | |
2581 | -// if (CollectionUtils.isNotEmpty(list)) | |
2582 | -// { | |
2583 | -// for (SieveResultModel sieveResultModel : list) | |
2584 | -// { | |
2585 | -// rcGlxtService.saveRcSieveInfo(sieveResultModel, rcGlxtService.getHids()); | |
2586 | -// } | |
2587 | -// } | |
2588 | -// } | |
2589 | -// | |
2590 | -// | |
2591 | -// /** | |
2592 | -// * 风险妊娠 | |
2593 | -// * @param hospitalId | |
2594 | -// */ | |
2595 | -// @RequestMapping(value = "/rcPatientRiskRecord", method = RequestMethod.GET) | |
2596 | -// @ResponseBody | |
2597 | -// public void rcPatientRiskRecord(@RequestParam(required = false) String hospitalId) { | |
2598 | -// | |
2599 | -// rcGlxtService.riskAndScreen(); | |
2600 | -// AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
2601 | -// antExRecordQuery.setHospitalList(rcGlxtService.getHids()); | |
2602 | -// List<AntExRecordModel> recordModels = recordService.queryAntExRecords(antExRecordQuery); | |
2603 | -// if (CollectionUtils.isNotEmpty(recordModels)) | |
2604 | -// { | |
2605 | -// for (AntExRecordModel antExRecordModel : recordModels) | |
2606 | -// { | |
2607 | -// rcGlxtService.saveRcPatientRiskRecord(antExRecordModel); | |
2608 | -// } | |
2609 | -// } | |
2610 | -// } | |
2611 | -// | |
2612 | -// | |
2613 | -// /** | |
2614 | -// * 母婴阻断 | |
2615 | -// * @param hospitalId | |
2616 | -// */ | |
2617 | -// @RequestMapping(value = "/rcZdInfo", method = RequestMethod.GET) | |
2618 | -// @ResponseBody | |
2619 | -// public void rcZdInfo(@RequestParam(required = false) String hospitalId) { | |
2620 | -// | |
2621 | -// AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
2622 | -// antExChuQuery.setYn(YnEnums.YES.getId()); | |
2623 | -// antExChuQuery.setHospitalList(rcGlxtService.getHids()); | |
2624 | -// antExChuQuery.setCreatedTimeStart(DateUtil.addMonth(new Date(), -5)); | |
2625 | -// antExChuQuery.setCreatedTimeEnd(new Date()); | |
2626 | -// List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
2627 | -// if (CollectionUtils.isNotEmpty(antExChuModels)) | |
2628 | -// { | |
2629 | -// for (AntExChuModel chuModel : antExChuModels) | |
2630 | -// { | |
2631 | -// rcGlxtService.saveRcZdInfo(chuModel); | |
2632 | -// } | |
2633 | -// } | |
2634 | -// } | |
2635 | -// | |
2636 | -// | |
2637 | -// /** | |
2638 | -// * 孕产妇早孕诊断信息表 | |
2639 | -// */ | |
2640 | -// @RequestMapping(value = "/rcDiagnosisInfo", method = RequestMethod.GET) | |
2641 | -// @ResponseBody | |
2642 | -// public void rcDiagnosisInfo() { | |
2643 | -// | |
2644 | -// AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
2645 | -// antExChuQuery.setYn(YnEnums.YES.getId()); | |
2646 | -// antExChuQuery.setHospitalList(rcGlxtService.getHids()); | |
2647 | -// antExChuQuery.setCreatedTimeStart(DateUtil.addMonth(new Date(), -5)); | |
2648 | -// antExChuQuery.setCreatedTimeEnd(new Date()); | |
2649 | -// List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
2650 | -// if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(antExChuModels)) { | |
2651 | -// for (AntExChuModel chuModel : antExChuModels) { | |
2652 | -// | |
2653 | -// rcGlxtService.saveCheckChu(chuModel); | |
2654 | -// } | |
2655 | -// } | |
2656 | -// | |
2657 | -// AntExQuery antExQuery = new AntExQuery(); | |
2658 | -// antExQuery.setYn(YnEnums.YES.getId()); | |
2659 | -// antExQuery.setHospitalIds(rcGlxtService.getHids()); | |
2660 | -// antExQuery.setModifiedStart(DateUtil.addMonth(new Date(), -5)); | |
2661 | -// antExQuery.setModifiedEnd(new Date()); | |
2662 | -// List<AntenatalExaminationModel> antEx = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
2663 | -// if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(antEx)) | |
2664 | -// { | |
2665 | -// for (AntenatalExaminationModel f : antEx) | |
2666 | -// { | |
2667 | -// rcGlxtService.saveCheckFu(f); | |
2668 | -// } | |
2669 | -// } | |
2670 | -// | |
2671 | -// } | |
2672 | -// | |
2673 | -// | |
2674 | -// /** | |
2675 | -// * 自定义查询 | |
2676 | -// * | |
2677 | -// * @param start | |
2678 | -// * @param end | |
2679 | -// * @return | |
2680 | -// */ | |
2681 | -// @RequestMapping(value = "/cd/zdy") | |
2682 | -// @ResponseBody | |
2683 | -// public String getZdy(@RequestParam("start") String start, @RequestParam("end") String end) { | |
2684 | -// | |
2685 | -// cdGwInterface.test(start, end); | |
2686 | -// return "1"; | |
2687 | -// } | |
2688 | -// | |
2689 | -// /** | |
2690 | -// * 承德新筛接口 | |
2691 | -// * @param date | |
2692 | -// * @return | |
2693 | -// */ | |
2694 | -// @RequestMapping(value = "/dr") | |
2695 | -// @ResponseBody | |
2696 | -// public String drCeshi(String date){ | |
2697 | -// babySieveFacede.newSieveLab(date); | |
2698 | -// return null; | |
2699 | -// } | |
2700 | -// | |
2701 | -// @RequestMapping(value = "/updateBabyStatus", method = RequestMethod.GET) | |
2702 | -// @ResponseBody | |
2703 | -// public String updateBabyStatus(@RequestParam(required = true) String hid,@RequestParam(required = false) String babyId) { | |
2704 | -// | |
2705 | -// BabyModelQuery babyModelQuery = new BabyModelQuery(); | |
2706 | -// babyModelQuery.setYn(YnEnums.YES.getId()); | |
2707 | -// babyModelQuery.setHospitalId(hid); | |
2708 | -// if (StringUtils.isNotEmpty(babyId)) | |
2709 | -// { | |
2710 | -// babyModelQuery.setId(babyId); | |
2711 | -// } | |
2712 | -// | |
2713 | -// List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery); | |
2714 | -// if (CollectionUtils.isNotEmpty(models)) | |
2715 | -// { | |
2716 | -// for (BabyModel babyModel : models) | |
2717 | -// { | |
2718 | -// boolean isUpdate = false; | |
2719 | -// String babyWeight = babyModel.getBabyWeight(); | |
2720 | -// if (StringUtils.isNotEmpty(babyWeight)) | |
2721 | -// { | |
2722 | -// Double weight = Double.parseDouble(babyWeight) * 1000; | |
2723 | -// if (weight != 0 && weight < 2500) | |
2724 | -// { | |
2725 | -// List<String> weak = new ArrayList<>(); | |
2726 | -// weak.add("5b18f428422b03d4ad2bf900"); | |
2727 | -// babyModel.setWeakSonInfo(weak); | |
2728 | -// babyModel.setWeakSon(1); | |
2729 | -// isUpdate = true; | |
2730 | -// } | |
2731 | -// } | |
2732 | -// Integer dueWeek = babyModel.getDueWeek(); | |
2733 | -// if (dueWeek != null && dueWeek < 37) | |
2734 | -// { | |
2735 | -// | |
2736 | -// List<String> hiskInfo = new ArrayList<>(); | |
2737 | -// hiskInfo.add("5b18f99b422b03d4ad2bf917"); | |
2738 | -// babyModel.setHighRiskInfo(hiskInfo); | |
2739 | -// babyModel.setHighRisk(1); | |
2740 | -// isUpdate = true; | |
2741 | -// } | |
2742 | -// if (isUpdate) | |
2743 | -// { | |
2744 | -// babyBookbuildingService.updateBabyBuild(babyModel,babyModel.getId()); | |
2745 | -// } | |
2746 | -// } | |
2747 | -// } | |
2748 | -// return "finishing。。。。。。"; | |
2749 | -// } | |
2750 | 2393 | |
2394 | + @RequestMapping(value = "/rcPatientInfo", method = RequestMethod.GET) | |
2395 | + @ResponseBody | |
2396 | + public void rcPatientInfo(@RequestParam(required = false) String hospitalId) { | |
2397 | + | |
2398 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
2399 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
2400 | + if (StringUtils.isNotEmpty(hospitalId)) { | |
2401 | + organizationQuery.setId(Integer.parseInt(hospitalId)); | |
2402 | + } | |
2403 | + List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
2404 | + | |
2405 | + PatientsQuery patientsQuery1 = new PatientsQuery(); | |
2406 | + patientsQuery1.setYn(YnEnums.YES.getId()); | |
2407 | + if (CollectionUtils.isNotEmpty(organizationList)) { | |
2408 | + List<String> hids = new ArrayList<>(); | |
2409 | + for (Organization org :organizationList) | |
2410 | + { | |
2411 | + hids.add(org.getId()+""); | |
2412 | + } | |
2413 | + patientsQuery1.setHospitalList(hids); | |
2414 | + } | |
2415 | + else | |
2416 | + { | |
2417 | + patientsQuery1.setHospitalList(rcGlxtService.getHids()); | |
2418 | + } | |
2419 | + List<Patients> patientses = patientsService.queryPatient(patientsQuery1); | |
2420 | + if (CollectionUtils.isNotEmpty(patientses)) | |
2421 | + { | |
2422 | + for (Patients pat : patientses) | |
2423 | + { | |
2424 | + rcGlxtService.saveRcPatientInfo(pat); | |
2425 | + } | |
2426 | + } | |
2427 | + } | |
2428 | + | |
2429 | + @RequestMapping(value = "/rcFmInfo", method = RequestMethod.GET) | |
2430 | + @ResponseBody | |
2431 | + public void rcFmInfo(@RequestParam(required = false) String hospitalId) { | |
2432 | + | |
2433 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
2434 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
2435 | + if (StringUtils.isNotEmpty(hospitalId)) { | |
2436 | + organizationQuery.setId(Integer.parseInt(hospitalId)); | |
2437 | + } | |
2438 | + List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
2439 | + | |
2440 | + MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | |
2441 | + matDeliverQuery.setYn(YnEnums.YES.getId()); | |
2442 | + if (CollectionUtils.isNotEmpty(organizationList)) { | |
2443 | + List<String> hids = new ArrayList<>(); | |
2444 | + for (Organization org :organizationList) | |
2445 | + { | |
2446 | + hids.add(org.getId()+""); | |
2447 | + } | |
2448 | + matDeliverQuery.setFmHospitalList(hids); | |
2449 | + } | |
2450 | + else | |
2451 | + { | |
2452 | + matDeliverQuery.setFmHospitalList(rcGlxtService.getHids()); | |
2453 | + } | |
2454 | + List<MaternalDeliverModel> list2 = matDeliverService.query(matDeliverQuery); | |
2455 | + | |
2456 | + if (CollectionUtils.isNotEmpty(list2)) | |
2457 | + { | |
2458 | + for (MaternalDeliverModel maternalDeliverModel : list2) | |
2459 | + { | |
2460 | + rcGlxtService.saveRcFmInfo(maternalDeliverModel); | |
2461 | + } | |
2462 | + } | |
2463 | + } | |
2464 | + | |
2465 | + | |
2466 | + @RequestMapping(value = "/rcNewBabyInfo", method = RequestMethod.GET) | |
2467 | + @ResponseBody | |
2468 | + public void rcNewBabyInfo(@RequestParam(required = false) String hospitalId) { | |
2469 | + | |
2470 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
2471 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
2472 | + if (StringUtils.isNotEmpty(hospitalId)) { | |
2473 | + organizationQuery.setId(Integer.parseInt(hospitalId)); | |
2474 | + } | |
2475 | + List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
2476 | + | |
2477 | + MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | |
2478 | + matDeliverQuery.setYn(YnEnums.YES.getId()); | |
2479 | + if (CollectionUtils.isNotEmpty(organizationList)) { | |
2480 | + List<String> hids = new ArrayList<>(); | |
2481 | + for (Organization org :organizationList) | |
2482 | + { | |
2483 | + hids.add(org.getId()+""); | |
2484 | + } | |
2485 | + matDeliverQuery.setFmHospitalList(hids); | |
2486 | + } | |
2487 | + else | |
2488 | + { | |
2489 | + matDeliverQuery.setFmHospitalList(rcGlxtService.getHids()); | |
2490 | + } | |
2491 | + List<MaternalDeliverModel> list2 = matDeliverService.query(matDeliverQuery); | |
2492 | + | |
2493 | + if (CollectionUtils.isNotEmpty(list2)) | |
2494 | + { | |
2495 | + for (MaternalDeliverModel maternalDeliverModel : list2) | |
2496 | + { | |
2497 | + rcGlxtService.saveRcNewBabyInfo(maternalDeliverModel); | |
2498 | + } | |
2499 | + } | |
2500 | + } | |
2501 | + | |
2502 | + | |
2503 | + /** | |
2504 | + *产后访视 | |
2505 | + * @param hospitalId | |
2506 | + */ | |
2507 | + @RequestMapping(value = "/rcFmFollowInfo", method = RequestMethod.GET) | |
2508 | + @ResponseBody | |
2509 | + public void rcFmFollowInfo(@RequestParam(required = false) String hospitalId) { | |
2510 | + | |
2511 | + MatDeliverFollowQuery matDeliverFollowQuery = new MatDeliverFollowQuery(); | |
2512 | + List<MatdeliverFollowModel> matdeliverFollowModels = matDeliverFollowService.query(matDeliverFollowQuery); | |
2513 | + matDeliverFollowQuery.setVisitStatus(2); | |
2514 | + if (CollectionUtils.isNotEmpty(matdeliverFollowModels)) | |
2515 | + { | |
2516 | + for (MatdeliverFollowModel matdeliverFollowModel : matdeliverFollowModels) | |
2517 | + { | |
2518 | + rcGlxtService.saveRcMatdeliverFollowInfo(matdeliverFollowModel, rcGlxtService.getHids()); | |
2519 | + } | |
2520 | + } | |
2521 | + } | |
2751 | 2522 | @Autowired |
2523 | + private PremaritalCheckupService premaritalCheckupService; | |
2524 | + | |
2525 | + /** | |
2526 | + * 婚前检查 | |
2527 | + * @param hospitalId | |
2528 | + */ | |
2529 | + @RequestMapping(value = "/rcPremaritalCheckup", method = RequestMethod.GET) | |
2530 | + @ResponseBody | |
2531 | + public void rcPremaritalCheckup(@RequestParam(required = false) String hospitalId) { | |
2532 | + | |
2533 | + PremaritalCheckupQuery query = new PremaritalCheckupQuery(); | |
2534 | + query.setYn(YnEnums.YES.getId()); | |
2535 | + query.setHospitalId(hospitalId); | |
2536 | + query.setSexType(1); | |
2537 | + List<PremaritalCheckup> checkupList = premaritalCheckupService.queryPremaritalCheckup(query); | |
2538 | + | |
2539 | + if (CollectionUtils.isNotEmpty(checkupList)) | |
2540 | + { | |
2541 | + for (PremaritalCheckup premaritalCheckup : checkupList) | |
2542 | + { | |
2543 | + rcGlxtService.saveRcPremaritalCheckupInfo(premaritalCheckup); | |
2544 | + } | |
2545 | + } | |
2546 | + } | |
2547 | + | |
2548 | + | |
2549 | + /** | |
2550 | + * 叶酸发放 | |
2551 | + * @param hospitalId | |
2552 | + */ | |
2553 | + @RequestMapping(value = "/rcFolicAcidInfo", method = RequestMethod.GET) | |
2554 | + @ResponseBody | |
2555 | + public void rcFolicAcidInfo(@RequestParam(required = false) String hospitalId) { | |
2556 | + | |
2557 | + FolicAcidQuery folicAcidQuery = new FolicAcidQuery(); | |
2558 | + folicAcidQuery.setYn(YnEnums.YES.getId()); | |
2559 | + | |
2560 | + List<FolicAcid> folicAcidList = folicAcidService.queryFolicAcidWithSort(folicAcidQuery, "drawTime", Sort.Direction.ASC); | |
2561 | + | |
2562 | + if (CollectionUtils.isNotEmpty(folicAcidList)) | |
2563 | + { | |
2564 | + for (FolicAcid folicAcid : folicAcidList) | |
2565 | + { | |
2566 | + rcGlxtService.saveRcFolicAcidInfo(folicAcid); | |
2567 | + } | |
2568 | + } | |
2569 | + } | |
2570 | + | |
2571 | + /** | |
2572 | + * 孕期筛查表 | |
2573 | + * @param hospitalId | |
2574 | + */ | |
2575 | + @RequestMapping(value = "/rcSieveInfo", method = RequestMethod.GET) | |
2576 | + @ResponseBody | |
2577 | + public void rcSieveInfo(@RequestParam(required = false) String hospitalId) { | |
2578 | + SieveResultQuery sieveResultQuery = new SieveResultQuery(); | |
2579 | + sieveResultQuery.setYn(YnEnums.YES.getId()); | |
2580 | + List<SieveResultModel> list = sieveService.queryListSieveResult(sieveResultQuery); | |
2581 | + if (CollectionUtils.isNotEmpty(list)) | |
2582 | + { | |
2583 | + for (SieveResultModel sieveResultModel : list) | |
2584 | + { | |
2585 | + rcGlxtService.saveRcSieveInfo(sieveResultModel, rcGlxtService.getHids()); | |
2586 | + } | |
2587 | + } | |
2588 | + } | |
2589 | + | |
2590 | + | |
2591 | + /** | |
2592 | + * 风险妊娠 | |
2593 | + * @param hospitalId | |
2594 | + */ | |
2595 | + @RequestMapping(value = "/rcPatientRiskRecord", method = RequestMethod.GET) | |
2596 | + @ResponseBody | |
2597 | + public void rcPatientRiskRecord(@RequestParam(required = false) String hospitalId) { | |
2598 | + | |
2599 | + rcGlxtService.riskAndScreen(); | |
2600 | + AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
2601 | + antExRecordQuery.setHospitalList(rcGlxtService.getHids()); | |
2602 | + List<AntExRecordModel> recordModels = recordService.queryAntExRecords(antExRecordQuery); | |
2603 | + if (CollectionUtils.isNotEmpty(recordModels)) | |
2604 | + { | |
2605 | + for (AntExRecordModel antExRecordModel : recordModels) | |
2606 | + { | |
2607 | + rcGlxtService.saveRcPatientRiskRecord(antExRecordModel); | |
2608 | + } | |
2609 | + } | |
2610 | + } | |
2611 | + | |
2612 | + | |
2613 | + /** | |
2614 | + * 母婴阻断 | |
2615 | + * @param hospitalId | |
2616 | + */ | |
2617 | + @RequestMapping(value = "/rcZdInfo", method = RequestMethod.GET) | |
2618 | + @ResponseBody | |
2619 | + public void rcZdInfo(@RequestParam(required = false) String hospitalId) { | |
2620 | + | |
2621 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
2622 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
2623 | + antExChuQuery.setHospitalList(rcGlxtService.getHids()); | |
2624 | + antExChuQuery.setCreatedTimeStart(DateUtil.addMonth(new Date(), -5)); | |
2625 | + antExChuQuery.setCreatedTimeEnd(new Date()); | |
2626 | + List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
2627 | + if (CollectionUtils.isNotEmpty(antExChuModels)) | |
2628 | + { | |
2629 | + for (AntExChuModel chuModel : antExChuModels) | |
2630 | + { | |
2631 | + rcGlxtService.saveRcZdInfo(chuModel); | |
2632 | + } | |
2633 | + } | |
2634 | + } | |
2635 | + | |
2636 | + | |
2637 | + /** | |
2638 | + * 孕产妇早孕诊断信息表 | |
2639 | + */ | |
2640 | + @RequestMapping(value = "/rcDiagnosisInfo", method = RequestMethod.GET) | |
2641 | + @ResponseBody | |
2642 | + public void rcDiagnosisInfo() { | |
2643 | + | |
2644 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
2645 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
2646 | + antExChuQuery.setHospitalList(rcGlxtService.getHids()); | |
2647 | + antExChuQuery.setCreatedTimeStart(DateUtil.addMonth(new Date(), -5)); | |
2648 | + antExChuQuery.setCreatedTimeEnd(new Date()); | |
2649 | + List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
2650 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(antExChuModels)) { | |
2651 | + for (AntExChuModel chuModel : antExChuModels) { | |
2652 | + | |
2653 | + rcGlxtService.saveCheckChu(chuModel); | |
2654 | + } | |
2655 | + } | |
2656 | + | |
2657 | + AntExQuery antExQuery = new AntExQuery(); | |
2658 | + antExQuery.setYn(YnEnums.YES.getId()); | |
2659 | + antExQuery.setHospitalIds(rcGlxtService.getHids()); | |
2660 | + antExQuery.setModifiedStart(DateUtil.addMonth(new Date(), -5)); | |
2661 | + antExQuery.setModifiedEnd(new Date()); | |
2662 | + List<AntenatalExaminationModel> antEx = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
2663 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(antEx)) | |
2664 | + { | |
2665 | + for (AntenatalExaminationModel f : antEx) | |
2666 | + { | |
2667 | + rcGlxtService.saveCheckFu(f); | |
2668 | + } | |
2669 | + } | |
2670 | + | |
2671 | + } | |
2672 | + | |
2673 | + | |
2674 | + /** | |
2675 | + * 自定义查询 | |
2676 | + * | |
2677 | + * @param start | |
2678 | + * @param end | |
2679 | + * @return | |
2680 | + */ | |
2681 | + @RequestMapping(value = "/cd/zdy") | |
2682 | + @ResponseBody | |
2683 | + public String getZdy(@RequestParam("start") String start, @RequestParam("end") String end) { | |
2684 | + | |
2685 | + cdGwInterface.test(start, end); | |
2686 | + return "1"; | |
2687 | + } | |
2688 | + | |
2689 | + /** | |
2690 | + * 承德新筛接口 | |
2691 | + * @param date | |
2692 | + * @return | |
2693 | + */ | |
2694 | + @RequestMapping(value = "/dr") | |
2695 | + @ResponseBody | |
2696 | + public String drCeshi(String date){ | |
2697 | + babySieveFacede.newSieveLab(date); | |
2698 | + return null; | |
2699 | + } | |
2700 | + | |
2701 | + @RequestMapping(value = "/updateBabyStatus", method = RequestMethod.GET) | |
2702 | + @ResponseBody | |
2703 | + public String updateBabyStatus(@RequestParam(required = true) String hid,@RequestParam(required = false) String babyId) { | |
2704 | + | |
2705 | + BabyModelQuery babyModelQuery = new BabyModelQuery(); | |
2706 | + babyModelQuery.setYn(YnEnums.YES.getId()); | |
2707 | + babyModelQuery.setHospitalId(hid); | |
2708 | + if (StringUtils.isNotEmpty(babyId)) | |
2709 | + { | |
2710 | + babyModelQuery.setId(babyId); | |
2711 | + } | |
2712 | + | |
2713 | + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery); | |
2714 | + if (CollectionUtils.isNotEmpty(models)) | |
2715 | + { | |
2716 | + for (BabyModel babyModel : models) | |
2717 | + { | |
2718 | + boolean isUpdate = false; | |
2719 | + String babyWeight = babyModel.getBabyWeight(); | |
2720 | + if (StringUtils.isNotEmpty(babyWeight)) | |
2721 | + { | |
2722 | + Double weight = Double.parseDouble(babyWeight) * 1000; | |
2723 | + if (weight != 0 && weight < 2500) | |
2724 | + { | |
2725 | + List<String> weak = new ArrayList<>(); | |
2726 | + weak.add("5b18f428422b03d4ad2bf900"); | |
2727 | + babyModel.setWeakSonInfo(weak); | |
2728 | + babyModel.setWeakSon(1); | |
2729 | + isUpdate = true; | |
2730 | + } | |
2731 | + } | |
2732 | + Integer dueWeek = babyModel.getDueWeek(); | |
2733 | + if (dueWeek != null && dueWeek < 37) | |
2734 | + { | |
2735 | + | |
2736 | + List<String> hiskInfo = new ArrayList<>(); | |
2737 | + hiskInfo.add("5b18f99b422b03d4ad2bf917"); | |
2738 | + babyModel.setHighRiskInfo(hiskInfo); | |
2739 | + babyModel.setHighRisk(1); | |
2740 | + isUpdate = true; | |
2741 | + } | |
2742 | + if (isUpdate) | |
2743 | + { | |
2744 | + babyBookbuildingService.updateBabyBuild(babyModel,babyModel.getId()); | |
2745 | + } | |
2746 | + } | |
2747 | + } | |
2748 | + return "finishing。。。。。。"; | |
2749 | + } | |
2750 | + | |
2751 | + @Autowired | |
2752 | 2752 | private CouponMapper couponMapper; |
2753 | 2753 | |
2754 | 2754 | |
... | ... | @@ -3082,6 +3082,38 @@ |
3082 | 3082 | e.printStackTrace(); |
3083 | 3083 | } |
3084 | 3084 | System.out.println(contents.size()); |
3085 | + } | |
3086 | + | |
3087 | + @Autowired | |
3088 | + private DischargeAbstractMotherService dischargeAbstractMotherService; | |
3089 | + | |
3090 | + @RequestMapping(value = "/cyxj", method = RequestMethod.GET) | |
3091 | + @ResponseBody | |
3092 | + public void matDeliverQhd(@RequestParam(required = true) final String hid) { | |
3093 | + // 查询母亲信息 | |
3094 | + DischargeAbstractMotherQuery dischargeAbstractMotherQuery = new DischargeAbstractMotherQuery(); | |
3095 | + dischargeAbstractMotherQuery.setHospitalId(hid); | |
3096 | + dischargeAbstractMotherQuery.setStart(DateUtil.parseYMD("2018-01-01")); | |
3097 | + dischargeAbstractMotherQuery.setYn(YnEnums.YES.getId()); | |
3098 | + List<DischargeAbstractMotherModel> list = dischargeAbstractMotherService.query(dischargeAbstractMotherQuery); | |
3099 | + if (CollectionUtils.isNotEmpty(list)) | |
3100 | + { | |
3101 | + for (DischargeAbstractMotherModel motherModel : list) | |
3102 | + { | |
3103 | + if (StringUtils.isNotEmpty(motherModel.getPatientId())) | |
3104 | + { | |
3105 | + Patients pat = patientsService.findOnePatientById(motherModel.getPatientId()); | |
3106 | + if (pat != null) | |
3107 | + { | |
3108 | + //户籍地址 | |
3109 | + String addressRegister = CommonsHelper.getResidence(pat.getProvinceRegisterId(), pat.getCityRegisterId(), | |
3110 | + pat.getAreaRegisterId(), pat.getStreetRegisterId(), pat.getAddressRegister(), basicConfigService); | |
3111 | + System.out.println(pat.getUsername() + " " +pat.getCardNo()+ " " + pat.getPhone()+" "+addressRegister+ "\r\n" ); | |
3112 | + | |
3113 | + } | |
3114 | + } | |
3115 | + } | |
3116 | + } | |
3085 | 3117 | } |
3086 | 3118 | |
3087 | 3119 | } |