Commit 597f00b5f44bf4de8efe3236ac41029742f17a4d
1 parent
ad70080b90
Exists in
master
and in
6 other branches
分娩作废产检劵
Showing 1 changed file with 46 additions and 22 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
597f00b
| ... | ... | @@ -1050,7 +1050,6 @@ |
| 1050 | 1050 | listData.add(new AntData(patients, null != organization ? organization.getName() : "")); |
| 1051 | 1051 | } |
| 1052 | 1052 | |
| 1053 | - | |
| 1054 | 1053 | if (null == dueDate && null != patients.getFmDate()) { |
| 1055 | 1054 | dueDate = patients.getFmDate(); |
| 1056 | 1055 | } |
| 1057 | 1056 | |
| 1058 | 1057 | |
| 1059 | 1058 | |
| 1060 | 1059 | |
| ... | ... | @@ -1113,35 +1112,60 @@ |
| 1113 | 1112 | listData.add(new AntData((MaternalDeliverModel) obj, patientses.get(0).getLastMenses(), null != organization ? organization.getName() : "")); |
| 1114 | 1113 | } |
| 1115 | 1114 | } |
| 1116 | - | |
| 1117 | - PostReviewQuery postReviewQuery = new PostReviewQuery(); | |
| 1118 | - if (list.size() - 1 > i) { | |
| 1119 | - postReviewQuery.setStart(dueDate); | |
| 1120 | - if (CollectionUtils.isNotEmpty(listDate)) { | |
| 1121 | - //下次建档记录前都是产后复查,如果没有下个产程的数据就直接显示 | |
| 1122 | - if (listDate.size() > 1 && i > 1) { | |
| 1123 | - postReviewQuery.setEnd(listDate.get(i - 1).getDate()); | |
| 1115 | + //终止妊娠的情况 | |
| 1116 | + if(null!=patients.getDueStatus()&&1==patients.getDueStatus()){ | |
| 1117 | + StopPregQuery stopPregQuery=new StopPregQuery(); | |
| 1118 | + stopPregQuery.setYn(YnEnums.YES.getId()); | |
| 1119 | + stopPregQuery.setPid(pid); | |
| 1120 | + if (list.size() - 1 > i) { | |
| 1121 | + stopPregQuery.setStopDateStart(dueDate); | |
| 1122 | + if (CollectionUtils.isNotEmpty(listDate)) { | |
| 1123 | + //下次建档记录前都是产后复查,如果没有下个产程的数据就直接显示 | |
| 1124 | + if (listDate.size() > 1 && i > 1) { | |
| 1125 | + stopPregQuery.setStopDateEnd(listDate.get(i - 1).getDate()); | |
| 1126 | + } | |
| 1124 | 1127 | } |
| 1125 | 1128 | } |
| 1126 | - } | |
| 1127 | - postReviewQuery.setYn(YnEnums.YES.getId()); | |
| 1128 | - postReviewQuery.setPid(pid); | |
| 1129 | + List<StopPregModel> models =stopPregnancyService.queryStopPreg(stopPregQuery); | |
| 1130 | + if(CollectionUtils.isNotEmpty(models)){ | |
| 1131 | + for(StopPregModel stop:models){ | |
| 1132 | + if (null != stop.getHospitalId()) { | |
| 1133 | + organization = organizationService.getOrganization(Integer.valueOf(stop.getHospitalId())); | |
| 1134 | + } | |
| 1135 | + listData.add(new AntData(stop, patients.getLastMenses() , null != organization ? organization.getName() : "")); | |
| 1136 | + } | |
| 1137 | + } | |
| 1138 | + }else{ | |
| 1139 | + PostReviewQuery postReviewQuery = new PostReviewQuery(); | |
| 1140 | + if (list.size() - 1 > i) { | |
| 1141 | + postReviewQuery.setStart(dueDate); | |
| 1142 | + if (CollectionUtils.isNotEmpty(listDate)) { | |
| 1143 | + //下次建档记录前都是产后复查,如果没有下个产程的数据就直接显示 | |
| 1144 | + if (listDate.size() > 1 && i > 1) { | |
| 1145 | + postReviewQuery.setEnd(listDate.get(i - 1).getDate()); | |
| 1146 | + } | |
| 1147 | + } | |
| 1148 | + } | |
| 1149 | + postReviewQuery.setYn(YnEnums.YES.getId()); | |
| 1150 | + postReviewQuery.setPid(pid); | |
| 1129 | 1151 | |
| 1130 | - //产后复查记录 | |
| 1131 | - List<PostReviewModel> reviewModels = postReviewService.findWithList(postReviewQuery); | |
| 1132 | - if (CollectionUtils.isNotEmpty(reviewModels)) { | |
| 1133 | - if (CollectionUtils.isNotEmpty(listData)) { | |
| 1134 | - for (PostReviewModel postReviewModel : reviewModels) { | |
| 1135 | - if (postReviewModel.getYn() == YnEnums.YES.getId()) { | |
| 1136 | - if (null != postReviewModel.getHospitalId()) { | |
| 1137 | - organization = organizationService.getOrganization(Integer.valueOf(postReviewModel.getHospitalId())); | |
| 1138 | - } | |
| 1152 | + //产后复查记录 | |
| 1153 | + List<PostReviewModel> reviewModels = postReviewService.findWithList(postReviewQuery); | |
| 1154 | + if (CollectionUtils.isNotEmpty(reviewModels)) { | |
| 1155 | + if (CollectionUtils.isNotEmpty(listData)) { | |
| 1156 | + for (PostReviewModel postReviewModel : reviewModels) { | |
| 1157 | + if (postReviewModel.getYn() == YnEnums.YES.getId()) { | |
| 1158 | + if (null != postReviewModel.getHospitalId()) { | |
| 1159 | + organization = organizationService.getOrganization(Integer.valueOf(postReviewModel.getHospitalId())); | |
| 1160 | + } | |
| 1139 | 1161 | |
| 1140 | - listData.add(new AntData(postReviewModel, null != organization ? organization.getName() : "", dueDate)); | |
| 1162 | + listData.add(new AntData(postReviewModel, null != organization ? organization.getName() : "", dueDate)); | |
| 1163 | + } | |
| 1141 | 1164 | } |
| 1142 | 1165 | } |
| 1143 | 1166 | } |
| 1144 | 1167 | } |
| 1168 | + | |
| 1145 | 1169 | iterator.remove(); |
| 1146 | 1170 | if (CollectionUtils.isNotEmpty(listData)) { |
| 1147 | 1171 | sort(listData); |