Commit 76dfe4e91dab2cfd03e64ce4ecfc77ccde56107c
Exists in
master
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
76dfe4e
| ... | ... | @@ -1063,92 +1063,174 @@ |
| 1063 | 1063 | childbirthManagerQueryModel.setPatientId(patients.getId()); |
| 1064 | 1064 | childbirthManagerQueryModel.setMaternalDeliverId(maternalDeliverModel.getId()); |
| 1065 | 1065 | // 居住地 |
| 1066 | - childbirthManagerQueryModel.setAddress(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); | |
| 1066 | + if (childbirthManagerRequest.getInitQuery().contains("address")) { | |
| 1067 | + childbirthManagerQueryModel.setAddress(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); | |
| 1068 | + } | |
| 1067 | 1069 | // 电话转换 |
| 1068 | 1070 | childbirthManagerQueryModel.setPhone(DefenceUtils.getPhone(patients.getPhone())); |
| 1069 | 1071 | childbirthManagerQueryModel.setHusbandPhone(DefenceUtils.getPhone(patients.getHusbandPhone())); |
| 1070 | 1072 | // 加密身份证号 |
| 1071 | 1073 | childbirthManagerQueryModel.setCardNo(DefenceUtils.getId(patients.getCardNo())); |
| 1072 | 1074 | // 查询分娩方式 |
| 1073 | - String deliveryModeJson = maternalDeliverModel.getDeliveryMode(); | |
| 1074 | - Map<String, String> deliveryModeMap = JsonUtil.getMap(deliveryModeJson); | |
| 1075 | - if (MapUtils.isNotEmpty(deliveryModeMap) && StringUtils.isNotEmpty(deliveryModeMap.get("fmfs"))) { | |
| 1076 | - for (FmTypeEnums fmTypeEnums : FmTypeEnums.values()) { | |
| 1077 | - if (fmTypeEnums.getId().equals(deliveryModeMap.get("fmfs"))) { | |
| 1078 | - childbirthManagerQueryModel.setDeliveryMode(fmTypeEnums.getName()); | |
| 1079 | - break; | |
| 1075 | + if (childbirthManagerRequest.getInitQuery().contains("deliveryMode")) { | |
| 1076 | + String deliveryModeJson = maternalDeliverModel.getDeliveryMode(); | |
| 1077 | + Map<String, String> deliveryModeMap = JsonUtil.getMap(deliveryModeJson); | |
| 1078 | + if (MapUtils.isNotEmpty(deliveryModeMap) && StringUtils.isNotEmpty(deliveryModeMap.get("fmfs"))) { | |
| 1079 | + for (FmTypeEnums fmTypeEnums : FmTypeEnums.values()) { | |
| 1080 | + if (fmTypeEnums.getId().equals(deliveryModeMap.get("fmfs"))) { | |
| 1081 | + childbirthManagerQueryModel.setDeliveryMode(fmTypeEnums.getName()); | |
| 1082 | + break; | |
| 1083 | + } | |
| 1080 | 1084 | } |
| 1085 | + } else { | |
| 1086 | + childbirthManagerQueryModel.setDeliveryMode(""); | |
| 1081 | 1087 | } |
| 1082 | - } else { | |
| 1083 | - childbirthManagerQueryModel.setDeliveryMode(""); | |
| 1084 | 1088 | } |
| 1085 | 1089 | // 产妇情况 |
| 1086 | - if (StringUtils.isNotBlank(maternalDeliverModel.getMaternalInfo())) { | |
| 1087 | - for (CfEnums cfEnums : CfEnums.values()) { | |
| 1088 | - if (cfEnums.getId().equals(maternalDeliverModel.getMaternalInfo())) { | |
| 1089 | - childbirthManagerQueryModel.setMaternalInfo(cfEnums.getName()); | |
| 1090 | - break; | |
| 1090 | + if (childbirthManagerRequest.getInitQuery().contains("maternalInfo")) { | |
| 1091 | + if (StringUtils.isNotBlank(maternalDeliverModel.getMaternalInfo())) { | |
| 1092 | + for (CfEnums cfEnums : CfEnums.values()) { | |
| 1093 | + if (cfEnums.getId().equals(maternalDeliverModel.getMaternalInfo())) { | |
| 1094 | + childbirthManagerQueryModel.setMaternalInfo(cfEnums.getName()); | |
| 1095 | + break; | |
| 1096 | + } | |
| 1091 | 1097 | } |
| 1092 | 1098 | } |
| 1093 | 1099 | } |
| 1094 | 1100 | // 查询接生医生 |
| 1095 | 1101 | try { |
| 1096 | - childbirthManagerQueryModel.setDeliverDoctor(usersService.getUsers(Integer.valueOf(maternalDeliverModel.getDeliverDoctor())).getName()); | |
| 1102 | + if (childbirthManagerRequest.getInitQuery().contains("deliverDoctor")) { | |
| 1103 | + childbirthManagerQueryModel.setDeliverDoctor(usersService.getUsers(Integer.valueOf(maternalDeliverModel.getDeliverDoctor())).getName()); | |
| 1104 | + } | |
| 1097 | 1105 | } catch (Exception e) { |
| 1098 | 1106 | // 什么都不干,这么干是为了避开原始数据的问题 |
| 1099 | 1107 | } |
| 1100 | 1108 | childbirthManagerQueryModel.setAge(DateUtil.getAge(patients.getBirth())); |
| 1101 | 1109 | // 查询活产数 |
| 1102 | - BabyModelQuery babyModelQuery = new BabyModelQuery(); | |
| 1103 | - babyModelQuery.setYn(YnEnums.YES.getId()); | |
| 1104 | - babyModelQuery.setParentId(patients.getId()); | |
| 1105 | - babyModelQuery.setPregnancyOut(RenShenJieJuEnums.O.getId()); | |
| 1106 | - List<BabyModel> babyModelList = babyService.queryBabyWithQuery(babyModelQuery); | |
| 1107 | - if (CollectionUtils.isNotEmpty(babyModelList)) { | |
| 1108 | - childbirthManagerQueryModel.setLivingNumber(babyModelList.size()); | |
| 1109 | - }else{ | |
| 1110 | - childbirthManagerQueryModel.setLivingNumber(0); | |
| 1110 | + if (childbirthManagerRequest.getInitQuery().contains("livingNumber")) { | |
| 1111 | + BabyModelQuery babyModelQuery = new BabyModelQuery(); | |
| 1112 | + babyModelQuery.setYn(YnEnums.YES.getId()); | |
| 1113 | + babyModelQuery.setParentId(patients.getId()); | |
| 1114 | + babyModelQuery.setPregnancyOut(RenShenJieJuEnums.O.getId()); | |
| 1115 | + List<BabyModel> babyModelList = babyService.queryBabyWithQuery(babyModelQuery); | |
| 1116 | + if (CollectionUtils.isNotEmpty(babyModelList)) { | |
| 1117 | + childbirthManagerQueryModel.setLivingNumber(babyModelList.size()); | |
| 1118 | + } else { | |
| 1119 | + childbirthManagerQueryModel.setLivingNumber(0); | |
| 1120 | + } | |
| 1121 | + | |
| 1122 | + // 妊娠结局,儿童性别,儿童体重,儿童身长,Apgar1分钟,Apgar5分钟,Apgar10分钟,窒息分钟数,新生儿疾病,畸形 | |
| 1123 | + if (childbirthManagerRequest.getInitQuery().contains("pregnancyOut") || childbirthManagerRequest.getInitQuery().contains("sex") || childbirthManagerRequest.getInitQuery().contains("babyWeight") || childbirthManagerRequest.getInitQuery().contains("babyHeight") || childbirthManagerRequest.getInitQuery().contains("apgarScorePf1") || childbirthManagerRequest.getInitQuery().contains("apgarScorePf5") || childbirthManagerRequest.getInitQuery().contains("apgarScorePf10") || childbirthManagerRequest.getInitQuery().contains("asphyxiaM") || childbirthManagerRequest.getInitQuery().contains("babyHealthy") || childbirthManagerRequest.getInitQuery().contains("malformation")) { | |
| 1124 | + if (CollectionUtils.isNotEmpty(babyModelList)) { | |
| 1125 | + String pregnancyOut = ""; | |
| 1126 | + String sex = ""; | |
| 1127 | + String babyWeight = ""; | |
| 1128 | + String babyHeight = ""; | |
| 1129 | + String apgarScorePf1 = ""; | |
| 1130 | + String apgarScorePf5 = ""; | |
| 1131 | + String apgarScorePf10 = ""; | |
| 1132 | + String asphyxiaM = ""; | |
| 1133 | + String babyHealthy = ""; | |
| 1134 | + String malformation = ""; | |
| 1135 | + try { | |
| 1136 | + for (BabyModel babyModel : babyModelList) { | |
| 1137 | + if (childbirthManagerRequest.getInitQuery().contains("pregnancyOut")) { | |
| 1138 | + for (RenShenJieJuEnums renShenJieJuEnums : RenShenJieJuEnums.values()) { | |
| 1139 | + if (renShenJieJuEnums.getId().equals(babyModel.getPregnancyOut())) { | |
| 1140 | + pregnancyOut += renShenJieJuEnums.getName() + ","; | |
| 1141 | + break; | |
| 1142 | + } | |
| 1143 | + } | |
| 1144 | + } | |
| 1145 | + if (childbirthManagerRequest.getInitQuery().contains("sex")) { | |
| 1146 | + for (SexEnum sexEnum : SexEnum.values()) { | |
| 1147 | + if (sexEnum.getId().equals(babyModel.getSex())) { | |
| 1148 | + sex += sexEnum.getText() + ","; | |
| 1149 | + break; | |
| 1150 | + } | |
| 1151 | + } | |
| 1152 | + } | |
| 1153 | + babyWeight += babyModel.getBabyWeight() == null ? "" : babyModel.getBabyWeight() + ","; | |
| 1154 | + babyHeight += babyModel.getBabyHeight() == null ? "" : babyModel.getBabyHeight() + ","; | |
| 1155 | + asphyxiaM += babyModel.getAsphyxiaM() == null ? "" : babyModel.getAsphyxiaM() + ","; | |
| 1156 | + babyHealthy += babyModel.getBabyHealthy() == null ? "" : babyModel.getBabyHealthy() + ","; | |
| 1157 | + malformation += babyModel.getMalformation() == null ? "" : babyModel.getMalformation() + ","; | |
| 1158 | + Map<String, String> map = JsonUtil.getMap(babyModel.getApgarScore()); | |
| 1159 | + if (MapUtils.isNotEmpty(map)) { | |
| 1160 | + apgarScorePf1 += map.get("pf1") == null ? "" : map.get("pf1") + ","; | |
| 1161 | + apgarScorePf5 += map.get("pf5") == null ? "" : map.get("pf5") + ","; | |
| 1162 | + apgarScorePf10 += map.get("pf10") == null ? "" : map.get("pf10") + ","; | |
| 1163 | + } | |
| 1164 | + } | |
| 1165 | + } catch (Exception e) { | |
| 1166 | + // 什么都不干,这么干是为了避开原始数据的问题 | |
| 1167 | + } | |
| 1168 | + childbirthManagerQueryModel.setPregnancyOut(pregnancyOut.length() == 0 ? "" : pregnancyOut.substring(0, pregnancyOut.length() - 1)); | |
| 1169 | + childbirthManagerQueryModel.setSex(sex.length() == 0 ? "" : sex.substring(0, sex.length() - 1)); | |
| 1170 | + childbirthManagerQueryModel.setBabyWeight(babyWeight.length() == 0 ? "" : babyWeight.substring(0, babyWeight.length() - 1)); | |
| 1171 | + childbirthManagerQueryModel.setBabyHeight(babyHeight.length() == 0 ? "" : babyHeight.substring(0, babyHeight.length() - 1)); | |
| 1172 | + childbirthManagerQueryModel.setApgarScorePf1(apgarScorePf1.length() == 0 ? "" : apgarScorePf1.substring(0, apgarScorePf1.length() - 1)); | |
| 1173 | + childbirthManagerQueryModel.setApgarScorePf5(apgarScorePf5.length() == 0 ? "" : apgarScorePf5.substring(0, apgarScorePf5.length() - 1)); | |
| 1174 | + childbirthManagerQueryModel.setApgarScorePf10(apgarScorePf10.length() == 0 ? "" : apgarScorePf10.substring(0, apgarScorePf10.length() - 1)); | |
| 1175 | + childbirthManagerQueryModel.setAsphyxiaM(asphyxiaM.length() == 0 ? "" : asphyxiaM.substring(0, asphyxiaM.length() - 1)); | |
| 1176 | + childbirthManagerQueryModel.setBabyHealthy(babyHealthy.length() == 0 ? "" : babyHealthy.substring(0, babyHealthy.length() - 1)); | |
| 1177 | + childbirthManagerQueryModel.setMalformation(malformation.length() == 0 ? "" : malformation.substring(0, malformation.length() - 1)); | |
| 1178 | + } | |
| 1179 | + } | |
| 1180 | + try { | |
| 1181 | + if (childbirthManagerRequest.getInitQuery().contains("fmHospital")) { | |
| 1182 | + childbirthManagerQueryModel.setFmHospital(organizationService.getOrganization(Integer.valueOf(maternalDeliverModel.getFmHospital())).getName()); | |
| 1183 | + } | |
| 1184 | + } catch (Exception e) { | |
| 1185 | + // 什么都不干,这么干是为了避开原始数据的问题 | |
| 1186 | + } | |
| 1187 | + | |
| 1111 | 1188 | } |
| 1112 | 1189 | |
| 1113 | 1190 | // 开始拼装自定义查询结果 |
| 1114 | 1191 | // 胎方位,胎心率,胎先露 |
| 1115 | - // 这个泛型不会出错,传入的就是这个 | |
| 1116 | - @SuppressWarnings("unchecked") | |
| 1117 | - List<MatDeliverAddRequest.Placenta> placentaList = maternalDeliverModel.getPlacentas(); | |
| 1118 | - if (CollectionUtils.isNotEmpty(placentaList)) { | |
| 1119 | - String fetalPosition = ""; | |
| 1120 | - String heartRate = ""; | |
| 1121 | - String fetalPresentation = ""; | |
| 1122 | - for (Object obj : placentaList) { | |
| 1123 | - if ("com.lyms.platform.operate.web.request.MatDeliverAddRequest$Placenta".equals(obj.getClass().getName())) { | |
| 1124 | - MatDeliverAddRequest.Placenta placenta = (MatDeliverAddRequest.Placenta) obj; | |
| 1125 | - for (FetalPositionEnums fetalPositionEnums : FetalPositionEnums.values()) { | |
| 1126 | - if (fetalPositionEnums.getId().equals(placenta.getFetalPosition())) { | |
| 1127 | - fetalPosition += fetalPositionEnums.getName() + ","; | |
| 1128 | - break; | |
| 1192 | + if (childbirthManagerRequest.getInitQuery().contains("fetalPosition") || childbirthManagerRequest.getInitQuery().contains("heartRate") || childbirthManagerRequest.getInitQuery().contains("fetalPresentation")) { | |
| 1193 | + // 这个泛型不会出错,传入的就是这个 | |
| 1194 | + @SuppressWarnings("unchecked") | |
| 1195 | + List<MatDeliverAddRequest.Placenta> placentaList = maternalDeliverModel.getPlacentas(); | |
| 1196 | + if (CollectionUtils.isNotEmpty(placentaList)) { | |
| 1197 | + String fetalPosition = ""; | |
| 1198 | + String heartRate = ""; | |
| 1199 | + String fetalPresentation = ""; | |
| 1200 | + for (Object obj : placentaList) { | |
| 1201 | + if ("com.lyms.platform.operate.web.request.MatDeliverAddRequest$Placenta".equals(obj.getClass().getName())) { | |
| 1202 | + MatDeliverAddRequest.Placenta placenta = (MatDeliverAddRequest.Placenta) obj; | |
| 1203 | + if (childbirthManagerRequest.getInitQuery().contains("fetalPosition")) { | |
| 1204 | + for (FetalPositionEnums fetalPositionEnums : FetalPositionEnums.values()) { | |
| 1205 | + if (fetalPositionEnums.getId().equals(placenta.getFetalPosition())) { | |
| 1206 | + fetalPosition += fetalPositionEnums.getName() + ","; | |
| 1207 | + break; | |
| 1208 | + } | |
| 1209 | + } | |
| 1129 | 1210 | } |
| 1211 | + heartRate += placenta.getHeartRate() == null ? "" : placenta.getHeartRate().toString() + ","; | |
| 1212 | + fetalPresentation += placenta.getFetalPresentation() == null ? "" : placenta.getFetalPresentation() + ","; | |
| 1130 | 1213 | } |
| 1131 | - heartRate += placenta.getHeartRate() == null ? "" : placenta.getHeartRate().toString() + ","; | |
| 1132 | - fetalPresentation += placenta.getFetalPresentation() == null ? "" : placenta.getFetalPresentation() + ","; | |
| 1133 | - } | |
| 1134 | - if ("java.util.LinkedHashMap".equals(obj.getClass().getName())) { | |
| 1135 | - Map<String, String> placenta = JsonUtil.getMap(obj.toString()); | |
| 1136 | - if (MapUtils.isNotEmpty(placenta)) { | |
| 1137 | - for (FetalPositionEnums fetalPositionEnums : FetalPositionEnums.values()) { | |
| 1138 | - if (fetalPositionEnums.getId().equals(placenta.get("fetalPosition"))) { | |
| 1139 | - fetalPosition += fetalPositionEnums.getName() + ","; | |
| 1140 | - break; | |
| 1214 | + if ("java.util.LinkedHashMap".equals(obj.getClass().getName())) { | |
| 1215 | + Map<String, String> placenta = JsonUtil.getMap(obj.toString()); | |
| 1216 | + if (childbirthManagerRequest.getInitQuery().contains("fetalPosition")) { | |
| 1217 | + if (MapUtils.isNotEmpty(placenta)) { | |
| 1218 | + for (FetalPositionEnums fetalPositionEnums : FetalPositionEnums.values()) { | |
| 1219 | + if (fetalPositionEnums.getId().equals(placenta.get("fetalPosition"))) { | |
| 1220 | + fetalPosition += fetalPositionEnums.getName() + ","; | |
| 1221 | + break; | |
| 1222 | + } | |
| 1223 | + } | |
| 1224 | + heartRate += placenta.get("heartRate") == null ? "" : placenta.get("heartRate") + ","; | |
| 1225 | + fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation") + ","; | |
| 1141 | 1226 | } |
| 1142 | 1227 | } |
| 1143 | - heartRate += placenta.get("heartRate") == null ? "" : placenta.get("heartRate") + ","; | |
| 1144 | - fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation") + ","; | |
| 1145 | 1228 | } |
| 1146 | 1229 | } |
| 1230 | + childbirthManagerQueryModel.setFetalPosition(fetalPosition.length() == 0 ? "" : fetalPosition.substring(0, fetalPosition.length() - 1)); | |
| 1231 | + childbirthManagerQueryModel.setHeartRate(heartRate.length() == 0 ? "" : heartRate.substring(0, heartRate.length() - 1)); | |
| 1232 | + childbirthManagerQueryModel.setFetalPresentation(fetalPresentation.length() == 0 ? "" : fetalPresentation.substring(0, fetalPresentation.length() - 1)); | |
| 1147 | 1233 | } |
| 1148 | - | |
| 1149 | - childbirthManagerQueryModel.setFetalPosition(fetalPosition.length() == 0 ? "" : fetalPosition.substring(0, fetalPosition.length() - 1)); | |
| 1150 | - childbirthManagerQueryModel.setHeartRate(heartRate.length() == 0 ? "" : heartRate.substring(0, heartRate.length() - 1)); | |
| 1151 | - childbirthManagerQueryModel.setFetalPresentation(fetalPresentation.length() == 0 ? "" : fetalPresentation.substring(0, fetalPresentation.length() - 1)); | |
| 1152 | 1234 | } |
| 1153 | 1235 | // 第一产程,第二产程,第三产程 |
| 1154 | 1236 | Map<String, Map<String, String>> prodprocessMap = JsonUtil.getDoubleMap(maternalDeliverModel.getProdprocess()); |
| 1155 | 1237 | |
| 1156 | 1238 | |
| 1157 | 1239 | |
| 1158 | 1240 | |
| 1159 | 1241 | |
| ... | ... | @@ -1178,95 +1260,42 @@ |
| 1178 | 1260 | childbirthManagerQueryModel.setChBpSzy1(chBpMap.get("szy")); |
| 1179 | 1261 | } |
| 1180 | 1262 | // 胎盘娩出方式,胎盘大小,胎盘重量,脐带长度,脐带是否异常,脐带异常类型 |
| 1181 | - List<MaternalDeliverModel.ExtPlacenta> extPlacentaList = maternalDeliverModel.getExtPlacentas(); | |
| 1182 | - if (CollectionUtils.isNotEmpty(extPlacentaList)) { | |
| 1183 | - String tpmcType = ""; | |
| 1184 | - String tpSize = ""; | |
| 1185 | - String tpWeight = ""; | |
| 1186 | - String umbilicalCordLength = ""; | |
| 1187 | - String umbilicalCordEx = ""; | |
| 1188 | - String umbilicalCordExType = ""; | |
| 1189 | - try { | |
| 1190 | - for (MaternalDeliverModel.ExtPlacenta extPlacenta : extPlacentaList) { | |
| 1191 | - for (TpmcTypeEnums tpmcTypeEnums : TpmcTypeEnums.values()) { | |
| 1192 | - if (tpmcTypeEnums.getId().equals(extPlacenta.getTpmcType())) { | |
| 1193 | - tpmcType += tpmcTypeEnums.getName() + ","; | |
| 1194 | - break; | |
| 1263 | + if (childbirthManagerRequest.getInitQuery().contains("tpmcType") || childbirthManagerRequest.getInitQuery().contains("tpSize") || childbirthManagerRequest.getInitQuery().contains("tpWeight") || childbirthManagerRequest.getInitQuery().contains("umbilicalCordLength") || childbirthManagerRequest.getInitQuery().contains("umbilicalCordEx") || childbirthManagerRequest.getInitQuery().contains("umbilicalCordExType")) { | |
| 1264 | + List<MaternalDeliverModel.ExtPlacenta> extPlacentaList = maternalDeliverModel.getExtPlacentas(); | |
| 1265 | + if (CollectionUtils.isNotEmpty(extPlacentaList)) { | |
| 1266 | + String tpmcType = ""; | |
| 1267 | + String tpSize = ""; | |
| 1268 | + String tpWeight = ""; | |
| 1269 | + String umbilicalCordLength = ""; | |
| 1270 | + String umbilicalCordEx = ""; | |
| 1271 | + String umbilicalCordExType = ""; | |
| 1272 | + try { | |
| 1273 | + for (MaternalDeliverModel.ExtPlacenta extPlacenta : extPlacentaList) { | |
| 1274 | + if (childbirthManagerRequest.getInitQuery().contains("tpmcType")) { | |
| 1275 | + for (TpmcTypeEnums tpmcTypeEnums : TpmcTypeEnums.values()) { | |
| 1276 | + if (tpmcTypeEnums.getId().equals(extPlacenta.getTpmcType())) { | |
| 1277 | + tpmcType += tpmcTypeEnums.getName() + ","; | |
| 1278 | + break; | |
| 1279 | + } | |
| 1280 | + } | |
| 1195 | 1281 | } |
| 1282 | + tpSize += extPlacenta.getTpSize() == null ? "" : extPlacenta.getTpSize() + ","; | |
| 1283 | + tpWeight += extPlacenta.getTpWeight() == null ? "" : extPlacenta.getTpWeight() + ","; | |
| 1284 | + umbilicalCordLength += extPlacenta.getUmbilicalCordLength() == null ? "" : extPlacenta.getUmbilicalCordLength() + ","; | |
| 1285 | + umbilicalCordEx += extPlacenta.getUmbilicalCordEx() == null ? "" : extPlacenta.getUmbilicalCordEx() + ","; | |
| 1286 | + umbilicalCordExType += extPlacenta.getUmbilicalCordExType() == null ? "" : extPlacenta.getUmbilicalCordExType() + ","; | |
| 1196 | 1287 | } |
| 1197 | - tpSize += extPlacenta.getTpSize() == null ? "" : extPlacenta.getTpSize() + ","; | |
| 1198 | - tpWeight += extPlacenta.getTpWeight() == null ? "" : extPlacenta.getTpWeight() + ","; | |
| 1199 | - umbilicalCordLength += extPlacenta.getUmbilicalCordLength() == null ? "" : extPlacenta.getUmbilicalCordLength() + ","; | |
| 1200 | - umbilicalCordEx += extPlacenta.getUmbilicalCordEx() == null ? "" : extPlacenta.getUmbilicalCordEx() + ","; | |
| 1201 | - umbilicalCordExType += extPlacenta.getUmbilicalCordExType() == null ? "" : extPlacenta.getUmbilicalCordExType() + ","; | |
| 1288 | + } catch (Exception e) { | |
| 1289 | + // 什么都不干,这么干是为了避开原始数据的问题 | |
| 1202 | 1290 | } |
| 1203 | - } catch (Exception e) { | |
| 1204 | - // 什么都不干,这么干是为了避开原始数据的问题 | |
| 1291 | + childbirthManagerQueryModel.setTpmcType(tpmcType.length() == 0 ? "" : tpmcType.substring(0, tpmcType.length() - 1)); | |
| 1292 | + childbirthManagerQueryModel.setTpSize(tpSize.length() == 0 ? "" : tpSize.substring(0, tpSize.length() - 1)); | |
| 1293 | + childbirthManagerQueryModel.setTpWeight(tpWeight.length() == 0 ? "" : tpWeight.substring(0, tpWeight.length() - 1)); | |
| 1294 | + childbirthManagerQueryModel.setUmbilicalCordLength(umbilicalCordLength.length() == 0 ? "" : umbilicalCordLength.substring(0, umbilicalCordLength.length() - 1)); | |
| 1295 | + childbirthManagerQueryModel.setUmbilicalCordEx(umbilicalCordEx.length() == 0 ? "" : umbilicalCordEx.substring(0, umbilicalCordEx.length() - 1)); | |
| 1296 | + childbirthManagerQueryModel.setUmbilicalCordExType(umbilicalCordExType.length() == 0 ? "" : umbilicalCordExType.substring(0, umbilicalCordExType.length() - 1)); | |
| 1205 | 1297 | } |
| 1206 | - childbirthManagerQueryModel.setTpmcType(tpmcType.length() == 0 ? "" : tpmcType.substring(0, tpmcType.length() - 1)); | |
| 1207 | - childbirthManagerQueryModel.setTpSize(tpSize.length() == 0 ? "" : tpSize.substring(0, tpSize.length() - 1)); | |
| 1208 | - childbirthManagerQueryModel.setTpWeight(tpWeight.length() == 0 ? "" : tpWeight.substring(0, tpWeight.length() - 1)); | |
| 1209 | - childbirthManagerQueryModel.setUmbilicalCordLength(umbilicalCordLength.length() == 0 ? "" : umbilicalCordLength.substring(0, umbilicalCordLength.length() - 1)); | |
| 1210 | - childbirthManagerQueryModel.setUmbilicalCordEx(umbilicalCordEx.length() == 0 ? "" : umbilicalCordEx.substring(0, umbilicalCordEx.length() - 1)); | |
| 1211 | - childbirthManagerQueryModel.setUmbilicalCordExType(umbilicalCordExType.length() == 0 ? "" : umbilicalCordExType.substring(0, umbilicalCordExType.length() - 1)); | |
| 1212 | 1298 | } |
| 1213 | - // 妊娠结局,儿童性别,儿童体重,儿童身长,Apgar1分钟,Apgar5分钟,Apgar10分钟,窒息分钟数,新生儿疾病,畸形 | |
| 1214 | - if (CollectionUtils.isNotEmpty(babyModelList)) { | |
| 1215 | - String pregnancyOut = ""; | |
| 1216 | - String sex = ""; | |
| 1217 | - String babyWeight = ""; | |
| 1218 | - String babyHeight = ""; | |
| 1219 | - String apgarScorePf1 = ""; | |
| 1220 | - String apgarScorePf5 = ""; | |
| 1221 | - String apgarScorePf10 = ""; | |
| 1222 | - String asphyxiaM = ""; | |
| 1223 | - String babyHealthy = ""; | |
| 1224 | - String malformation = ""; | |
| 1225 | - try { | |
| 1226 | - for (BabyModel babyModel : babyModelList) { | |
| 1227 | - for (RenShenJieJuEnums renShenJieJuEnums : RenShenJieJuEnums.values()) { | |
| 1228 | - if (renShenJieJuEnums.getId().equals(babyModel.getPregnancyOut())) { | |
| 1229 | - pregnancyOut += renShenJieJuEnums.getName() + ","; | |
| 1230 | - break; | |
| 1231 | - } | |
| 1232 | - } | |
| 1233 | - for (SexEnum sexEnum : SexEnum.values()) { | |
| 1234 | - if (sexEnum.getId().equals(babyModel.getSex())) { | |
| 1235 | - sex += sexEnum.getText() + ","; | |
| 1236 | - break; | |
| 1237 | - } | |
| 1238 | - } | |
| 1239 | - babyWeight += babyModel.getBabyWeight() == null ? "" : babyModel.getBabyWeight() + ","; | |
| 1240 | - babyHeight += babyModel.getBabyHeight() == null ? "" : babyModel.getBabyHeight() + ","; | |
| 1241 | - asphyxiaM += babyModel.getAsphyxiaM() == null ? "" : babyModel.getAsphyxiaM() + ","; | |
| 1242 | - babyHealthy += babyModel.getBabyHealthy() == null ? "" : babyModel.getBabyHealthy() + ","; | |
| 1243 | - malformation += babyModel.getMalformation() == null ? "" : babyModel.getMalformation() + ","; | |
| 1244 | - Map<String, String> map = JsonUtil.getMap(babyModel.getApgarScore()); | |
| 1245 | - if (MapUtils.isNotEmpty(map)) { | |
| 1246 | - apgarScorePf1 += map.get("pf1") == null ? "" : map.get("pf1") + ","; | |
| 1247 | - apgarScorePf5 += map.get("pf5") == null ? "" : map.get("pf5") + ","; | |
| 1248 | - apgarScorePf10 += map.get("pf10") == null ? "" : map.get("pf10") + ","; | |
| 1249 | - } | |
| 1250 | - } | |
| 1251 | - } catch (Exception e) { | |
| 1252 | - // 什么都不干,这么干是为了避开原始数据的问题 | |
| 1253 | - } | |
| 1254 | - childbirthManagerQueryModel.setPregnancyOut(pregnancyOut.length() == 0 ? "" : pregnancyOut.substring(0, pregnancyOut.length() - 1)); | |
| 1255 | - childbirthManagerQueryModel.setSex(sex.length() == 0 ? "" : sex.substring(0, sex.length() - 1)); | |
| 1256 | - childbirthManagerQueryModel.setBabyWeight(babyWeight.length() == 0 ? "" : babyWeight.substring(0, babyWeight.length() - 1)); | |
| 1257 | - childbirthManagerQueryModel.setBabyHeight(babyHeight.length() == 0 ? "" : babyHeight.substring(0, babyHeight.length() - 1)); | |
| 1258 | - childbirthManagerQueryModel.setApgarScorePf1(apgarScorePf1.length() == 0 ? "" : apgarScorePf1.substring(0, apgarScorePf1.length() - 1)); | |
| 1259 | - childbirthManagerQueryModel.setApgarScorePf5(apgarScorePf5.length() == 0 ? "" : apgarScorePf5.substring(0, apgarScorePf5.length() - 1)); | |
| 1260 | - childbirthManagerQueryModel.setApgarScorePf10(apgarScorePf10.length() == 0 ? "" : apgarScorePf10.substring(0, apgarScorePf10.length() - 1)); | |
| 1261 | - childbirthManagerQueryModel.setAsphyxiaM(asphyxiaM.length() == 0 ? "" : asphyxiaM.substring(0, asphyxiaM.length() - 1)); | |
| 1262 | - childbirthManagerQueryModel.setBabyHealthy(babyHealthy.length() == 0 ? "" : babyHealthy.substring(0, babyHealthy.length() - 1)); | |
| 1263 | - childbirthManagerQueryModel.setMalformation(malformation.length() == 0 ? "" : malformation.substring(0, malformation.length() - 1)); | |
| 1264 | - } | |
| 1265 | - try { | |
| 1266 | - childbirthManagerQueryModel.setFmHospital(organizationService.getOrganization(Integer.valueOf(maternalDeliverModel.getFmHospital())).getName()); | |
| 1267 | - } catch (Exception e) { | |
| 1268 | - // 什么都不干,这么干是为了避开原始数据的问题 | |
| 1269 | - } | |
| 1270 | 1299 | // 拼装自定义查询结果结束 |
| 1271 | 1300 | |
| 1272 | 1301 | childbirthManagerQueryModelList.add(childbirthManagerQueryModel); |
| ... | ... | @@ -1296,6 +1325,7 @@ |
| 1296 | 1325 | } |
| 1297 | 1326 | } |
| 1298 | 1327 | babyModelQuery.setDueType(StringUtils.isEmpty(newBabyManagerRequest.getDueType()) ? null : newBabyManagerRequest.getDueType()); |
| 1328 | + babyModelQuery.setParentId(StringUtils.isEmpty(newBabyManagerRequest.getPatientId()) ? null : newBabyManagerRequest.getPatientId()); | |
| 1299 | 1329 | if (!newBabyManagerRequest.isExcel()) { |
| 1300 | 1330 | babyModelQuery.setPage(newBabyManagerRequest.getPage()); |
| 1301 | 1331 | babyModelQuery.setLimit(newBabyManagerRequest.getLimit()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/NewBabyManagerRequest.java
View file @
76dfe4e
| ... | ... | @@ -32,6 +32,16 @@ |
| 32 | 32 | |
| 33 | 33 | private Integer operatorId; |
| 34 | 34 | |
| 35 | + private String patientId; | |
| 36 | + | |
| 37 | + public String getPatientId() { | |
| 38 | + return patientId; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setPatientId(String patientId) { | |
| 42 | + this.patientId = patientId; | |
| 43 | + } | |
| 44 | + | |
| 35 | 45 | public boolean isExcel() { |
| 36 | 46 | return isExcel; |
| 37 | 47 | } |