Commit 8852b8073051087989da2f5ca278356d33813c17
1 parent
e4572986d0
Exists in
master
and in
1 other branch
修改新电子病历
Showing 2 changed files with 41 additions and 26 deletions
platform-dal/src/main/java/com/lyms/platform/query/StopPregQuery.java
View file @
8852b80
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
8852b80
... | ... | @@ -556,6 +556,7 @@ |
556 | 556 | Date dueDate = new Date(); |
557 | 557 | if (CollectionUtils.isNotEmpty(listDate)) { |
558 | 558 | String pid = ""; |
559 | + int count = 0; | |
559 | 560 | for (int i = 0; i < listDate.size(); i++) { |
560 | 561 | dueDate = listDate.get(i).getDate(); |
561 | 562 | Date end = new Date(listDate.get(i).getDate().getTime() + 86398000); |
... | ... | @@ -571,6 +572,7 @@ |
571 | 572 | patientsQuery1.setPid(pid); |
572 | 573 | List<Patients> patientses = patientsService.queryPatient1(patientsQuery1); |
573 | 574 | if (CollectionUtils.isNotEmpty(patientses)) { |
575 | + count=count+patientses.size(); | |
574 | 576 | Iterator<Patients> iterator = patientses.iterator(); |
575 | 577 | while (iterator.hasNext()) { |
576 | 578 | Patients patients = iterator.next(); |
577 | 579 | |
... | ... | @@ -634,9 +636,15 @@ |
634 | 636 | postReviewQuery.setPid(pid); |
635 | 637 | Object obj = map.get(listDate.get(i).getId()); |
636 | 638 | if (obj instanceof MaternalDeliverModel) { |
637 | - listData.add(new AntData((MaternalDeliverModel) obj, patientses.get(0).getLastMenses(), null != organization ? organization.getName() : "")); | |
639 | + MaternalDeliverModel model = (MaternalDeliverModel) obj; | |
640 | + if(model.getYn() == YnEnums.YES.getId()){ | |
641 | + listData.add(new AntData((MaternalDeliverModel) obj, patientses.get(0).getLastMenses(), null != organization ? organization.getName() : "")); | |
642 | + } | |
638 | 643 | } else if (obj instanceof StopPregModel) { |
639 | - listData.add(new AntData(stopPregs.get(0), patientses.get(0).getLastMenses(), null != organization ? organization.getName() : "")); | |
644 | + StopPregModel model=(StopPregModel)obj; | |
645 | + if(model.getYn() == YnEnums.YES.getId()) { | |
646 | + listData.add(new AntData(stopPregs.get(0), patientses.get(0).getLastMenses(), null != organization ? organization.getName() : "")); | |
647 | + } | |
640 | 648 | } |
641 | 649 | |
642 | 650 | //产后复查记录 |
643 | 651 | |
644 | 652 | |
... | ... | @@ -656,29 +664,34 @@ |
656 | 664 | Collections.reverse(sortList); |
657 | 665 | } |
658 | 666 | } |
659 | - PatientsQuery patientsQuery1 = new PatientsQuery(); | |
660 | - patientsQuery1.setYn(YnEnums.YES.getId()); | |
661 | - patientsQuery1.setPid(pid); | |
662 | - patientsQuery1.setBookbuildingDateStart(new Date(listDate.get(0).getDate().getTime())); | |
663 | - patientsQuery1.setType(1); | |
664 | - patientsQuery1.setBuildType(1); | |
665 | - List<Patients> patientsList = patientsService.queryPatient(patientsQuery1); | |
666 | - List list1 = new ArrayList(); | |
667 | - List<SortIn> tmp = new ArrayList(); | |
668 | - for (Patients patients : patientsList) { | |
669 | - tmp.add(new SortIn(patients)); | |
667 | + if(list.size()>count){ | |
668 | + //分娩记录剩下的建档 | |
669 | + PatientsQuery patientsQuery1 = new PatientsQuery(); | |
670 | + patientsQuery1.setYn(YnEnums.YES.getId()); | |
671 | + patientsQuery1.setPid(pid); | |
672 | + patientsQuery1.setBookbuildingDateStart(new Date(listDate.get(0).getDate().getTime())); | |
673 | + patientsQuery1.setType(1); | |
674 | + patientsQuery1.setBuildType(1); | |
675 | + List<Patients> patientsList = patientsService.queryPatient(patientsQuery1); | |
676 | + List list1 = new ArrayList(); | |
677 | + List<SortIn> tmp = new ArrayList(); | |
678 | + for (Patients patients : patientsList) { | |
679 | + tmp.add(new SortIn(patients)); | |
680 | + } | |
681 | + sortList(tmp); | |
682 | + Date min = null; | |
683 | + if (!tmp.isEmpty()) { | |
684 | + min = tmp.get(tmp.size() - 1).getDate(); | |
685 | + } | |
686 | + List l = buildPatientList(new Date(), patientsList, list1, min, false); | |
687 | + if (!l.isEmpty()) { | |
688 | + sort(l); | |
689 | + sortList.add(l); | |
690 | + } | |
670 | 691 | } |
671 | - sortList(tmp); | |
672 | - Date min = null; | |
673 | - if (!tmp.isEmpty()) { | |
674 | - min = tmp.get(tmp.size() - 1).getDate(); | |
675 | - } | |
676 | - List l = buildPatientList(new Date(), patientsList, list1, min, false); | |
677 | - if (!l.isEmpty()) { | |
678 | - sort(l); | |
679 | - sortList.add(l); | |
680 | - } | |
692 | + | |
681 | 693 | } else { |
694 | + //没有终止的情况 | |
682 | 695 | List list1 = new ArrayList(); |
683 | 696 | List<SortIn> tmp = new ArrayList(); |
684 | 697 | for (Patients patients : list) { |
685 | 698 | |
... | ... | @@ -1006,12 +1019,14 @@ |
1006 | 1019 | antExQuery.setYn(YnEnums.YES.getId()); |
1007 | 1020 | antExQuery.setHospitalId(hospital); |
1008 | 1021 | List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); |
1009 | - | |
1022 | + //TODO 需要根据时间去查询是否是本院最后一条记录 | |
1010 | 1023 | if(CollectionUtils.isNotEmpty(list)){ |
1011 | 1024 | antExQuery.setStart(new Date(list.get(0).getCheckDate().getTime()+40000)); |
1012 | 1025 | } |
1013 | 1026 | antExQuery.setId(null); |
1014 | - list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
1027 | + list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
1028 | + | |
1029 | + | |
1015 | 1030 | if(CollectionUtils.isEmpty(list)){ |
1016 | 1031 | antenatalExaminationService.updateOneAnt(antEx, antExQueryRequest.getId()); |
1017 | 1032 | }else{ |