Commit 1c5958eb582cac266e7bdce85d2a8c0b44ffa69f
1 parent
eee6ff867a
Exists in
dev
#fix:新增卫宁对接接口、贫血专病等功能
Showing 7 changed files with 341 additions and 1 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IBloodPressureService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
View file @
1c5958e
| 1 | 1 | package com.lyms.platform.operate.web.controller; |
| 2 | 2 | |
| 3 | +import com.google.common.base.Strings; | |
| 3 | 4 | import com.lyms.hospitalapi.dtdyrm.IdtdyrmFmService; |
| 4 | 5 | import com.lyms.platform.biz.service.*; |
| 5 | 6 | import com.lyms.platform.common.annotation.TokenRequired; |
| 6 | 7 | |
| ... | ... | @@ -12,7 +13,9 @@ |
| 12 | 13 | import com.lyms.platform.common.utils.*; |
| 13 | 14 | import com.lyms.platform.operate.web.facade.*; |
| 14 | 15 | import com.lyms.platform.operate.web.request.*; |
| 16 | +import com.lyms.platform.operate.web.result.AntExManagerResult; | |
| 15 | 17 | import com.lyms.platform.operate.web.result.HighScoreResult; |
| 18 | +import com.lyms.platform.operate.web.service.IBloodPressureService; | |
| 16 | 19 | import com.lyms.platform.operate.web.service.PatientWeightService; |
| 17 | 20 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
| 18 | 21 | import com.lyms.platform.operate.web.utils.FunvCommonUtil; |
| ... | ... | @@ -53,6 +56,8 @@ |
| 53 | 56 | @Autowired |
| 54 | 57 | private BloodPressureService bloodPressureService; |
| 55 | 58 | @Autowired |
| 59 | + private IBloodPressureService iBloodPressureService; | |
| 60 | + @Autowired | |
| 56 | 61 | private AntenatalExaminationService antExService; |
| 57 | 62 | @Autowired |
| 58 | 63 | private BasicConfigService basicConfigService; |
| ... | ... | @@ -1186,6 +1191,144 @@ |
| 1186 | 1191 | str= HttpClientUtil.doGet(MEMBER_BABY_URL+"/wx/pc/articles/precise" ,params,"utf-8",null); |
| 1187 | 1192 | } |
| 1188 | 1193 | return str; |
| 1194 | + } | |
| 1195 | + | |
| 1196 | + @Autowired | |
| 1197 | + private AntExRecordFacade antExRecordFacade; | |
| 1198 | + @Autowired | |
| 1199 | + private AntExRecordService recordService; | |
| 1200 | + | |
| 1201 | + /** | |
| 1202 | + * 根据身份证号获取患者是否建档及五色数据(his调用) | |
| 1203 | + * @param cardNo | |
| 1204 | + * @return | |
| 1205 | + */ | |
| 1206 | + @RequestMapping(method = RequestMethod.GET,value = "/dt/getDTPatient") | |
| 1207 | + @ResponseBody | |
| 1208 | + public BaseResponse getWxPatients(@RequestParam("cardNo") String cardNo){ | |
| 1209 | + BaseResponse baseResponse=new BaseResponse(); | |
| 1210 | + if (Strings.isNullOrEmpty(cardNo)){ | |
| 1211 | + baseResponse.setErrorcode(-1); | |
| 1212 | + baseResponse.setErrormsg("参数异常"); | |
| 1213 | + return baseResponse; | |
| 1214 | + } | |
| 1215 | + PatientsQuery patientsQuery =new PatientsQuery(); | |
| 1216 | + patientsQuery.setYn(1); | |
| 1217 | + patientsQuery.setHospitalId(hospitalId); | |
| 1218 | + patientsQuery.setCardNo(cardNo); | |
| 1219 | + List<Patients> patientsList=patientsService.queryPatient(patientsQuery); | |
| 1220 | + if (CollectionUtils.isEmpty(patientsList)){ | |
| 1221 | + baseResponse.setErrorcode(10001); | |
| 1222 | + baseResponse.setErrormsg("当前患者未建档"); | |
| 1223 | + return baseResponse; | |
| 1224 | + } | |
| 1225 | + | |
| 1226 | + AntExRecordQuery antExRecordQuery=new AntExRecordQuery(); | |
| 1227 | + antExRecordQuery.setParentId(patientsList.get(0).getId()); | |
| 1228 | + List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery, Sort.Direction.DESC, "created"); | |
| 1229 | + if (CollectionUtils.isEmpty(antExRecordModelList)){ | |
| 1230 | + baseResponse.setErrorcode(10001); | |
| 1231 | + baseResponse.setErrormsg("产检记录不存在"); | |
| 1232 | + return baseResponse; | |
| 1233 | + } | |
| 1234 | + List<AntExManagerResult> data = antExRecordFacade.getAntExRecords(antExRecordModelList, hospitalId, false, null); | |
| 1235 | + if (CollectionUtils.isNotEmpty(data)){ | |
| 1236 | + AntExManagerResult antExManagerResult= data.get(0); | |
| 1237 | + Map<String,Object> params=new HashMap<>(); | |
| 1238 | + //TODO 过滤rLevel大同要求只返回最高级别的颜色等级 紫-红-橙-黄-绿 | |
| 1239 | + params.put("rLevel",getObjectRLevel(antExManagerResult.getrLevel())); | |
| 1240 | + params.put("riskFactor",antExManagerResult.getRiskFactor()); | |
| 1241 | + params.put("nextCheckTime",antExManagerResult.getNextCheckTime()); | |
| 1242 | + params.put("username",antExManagerResult.getName()); | |
| 1243 | + baseResponse.setObject(params); | |
| 1244 | + baseResponse.setErrorcode(0); | |
| 1245 | + baseResponse.setErrormsg("成功"); | |
| 1246 | + } | |
| 1247 | + return baseResponse; | |
| 1248 | + } | |
| 1249 | + | |
| 1250 | + /** | |
| 1251 | + * 获取最高优先级的风险等级 | |
| 1252 | + * 按优先级: 紫色(1) > 红色(2) > 橙色(3) > 黄色(4) > 绿色(5) | |
| 1253 | + */ | |
| 1254 | + private static Map<String, String> getObjectRLevel(List<Map> rLevel) { | |
| 1255 | + if (rLevel == null || rLevel.isEmpty()) { | |
| 1256 | + return new HashMap<>(); | |
| 1257 | + } | |
| 1258 | + | |
| 1259 | + // 定义颜色优先级表(数字越小优先级越高) | |
| 1260 | + Map<String, Integer> priorityMap = new HashMap<>(); | |
| 1261 | + priorityMap.put("紫色", 1); | |
| 1262 | + priorityMap.put("红色", 2); | |
| 1263 | + priorityMap.put("橙色", 3); | |
| 1264 | + priorityMap.put("黄色", 4); | |
| 1265 | + priorityMap.put("绿色", 5); | |
| 1266 | + | |
| 1267 | + Map<String, String> highestPriorityMap = null; | |
| 1268 | + int highestPriority = Integer.MAX_VALUE; | |
| 1269 | + | |
| 1270 | + // 遍历找到优先级最高的 | |
| 1271 | + for (Map<String, String> item : rLevel) { | |
| 1272 | + String name = item.get("name"); | |
| 1273 | + if (priorityMap.containsKey(name)) { | |
| 1274 | + int currentPriority = priorityMap.get(name); | |
| 1275 | + if (currentPriority < highestPriority) { | |
| 1276 | + highestPriority = currentPriority; | |
| 1277 | + highestPriorityMap = item; | |
| 1278 | + } | |
| 1279 | + } | |
| 1280 | + } | |
| 1281 | + | |
| 1282 | + return highestPriorityMap != null ? highestPriorityMap : new HashMap<String, String>(); | |
| 1283 | + } | |
| 1284 | + | |
| 1285 | + /** | |
| 1286 | + * 根据身份证号获取患者自动化测量数据 | |
| 1287 | + * @param cardNo | |
| 1288 | + * @return | |
| 1289 | + */ | |
| 1290 | + @RequestMapping(method = RequestMethod.GET,value = "/dt/getDTPatientBase") | |
| 1291 | + @ResponseBody | |
| 1292 | + public BaseResponse getWxPatientsBase(@RequestParam("cardNo") String cardNo){ | |
| 1293 | + | |
| 1294 | + BaseResponse baseResponse=new BaseResponse(); | |
| 1295 | + if (Strings.isNullOrEmpty(cardNo)){ | |
| 1296 | + baseResponse.setErrorcode(-1); | |
| 1297 | + baseResponse.setErrormsg("参数异常"); | |
| 1298 | + return baseResponse; | |
| 1299 | + } | |
| 1300 | + PatientsQuery patientsQuery =new PatientsQuery(); | |
| 1301 | + patientsQuery.setYn(1); | |
| 1302 | + patientsQuery.setHospitalId(hospitalId); | |
| 1303 | + patientsQuery.setCardNo(cardNo); | |
| 1304 | + List<Patients> patientsList=patientsService.queryPatient(patientsQuery); | |
| 1305 | + if (CollectionUtils.isEmpty(patientsList)){ | |
| 1306 | + baseResponse.setErrorcode(10001); | |
| 1307 | + baseResponse.setErrormsg("当前患者未建档"); | |
| 1308 | + return baseResponse; | |
| 1309 | + } | |
| 1310 | + Patients patients= patientsList.get(0); | |
| 1311 | + PatientWeight patientWeight= patientWeightService1.queryPatientWeight(patients.getPid()); | |
| 1312 | + if (patientWeight==null){ | |
| 1313 | + baseResponse.setErrorcode(10002); | |
| 1314 | + baseResponse.setErrormsg("当前患者还未录入自动化测量数据"); | |
| 1315 | + return baseResponse; | |
| 1316 | + } | |
| 1317 | + Map<String,Object> params=new HashMap<>(); | |
| 1318 | + params.put("beforeWeight",StringUtils.isEmpty(patientWeight.getBeforeWeight())? "" : patientWeight.getBeforeWeight()+"kg"); | |
| 1319 | + params.put("beforeHeight",StringUtils.isEmpty(patientWeight.getBeforeHeight())? "" : patientWeight.getBeforeHeight()+"cm"); | |
| 1320 | + params.put("nowWeight",StringUtils.isEmpty(patientWeight.getNowWeight())? "" : patientWeight.getNowWeight()+"kg"); | |
| 1321 | + | |
| 1322 | + BloodPressure bloodPressure= iBloodPressureService.getLastInfo(patients.getPid()); | |
| 1323 | + String blood=""; | |
| 1324 | + if (bloodPressure!=null&&StringUtils.isNotEmpty(bloodPressure.getSsy())){ | |
| 1325 | + blood=bloodPressure.getSsy() + "/" + bloodPressure.getSzy() + "mmHg"; | |
| 1326 | + } | |
| 1327 | + params.put("bloodPressure",blood); | |
| 1328 | + baseResponse.setObject(params); | |
| 1329 | + baseResponse.setErrorcode(0); | |
| 1330 | + baseResponse.setErrormsg("成功"); | |
| 1331 | + return baseResponse; | |
| 1189 | 1332 | } |
| 1190 | 1333 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
1c5958e
| ... | ... | @@ -254,6 +254,19 @@ |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | /** |
| 257 | + * 孕妇管理-专病-贫血专病管理 | |
| 258 | + * | |
| 259 | + * @param patientsQueryRequest | |
| 260 | + * @return 返回结果 | |
| 261 | + */ | |
| 262 | + @RequestMapping(value = "/anaemia", method = RequestMethod.GET) | |
| 263 | + @ResponseBody | |
| 264 | + @TokenRequired | |
| 265 | + public BaseResponse queryAnaemiaAllPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest, HttpServletRequest request) { | |
| 266 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 267 | + return patientFacade.queryAnaemiaAllPuerpera(patientsQueryRequest, null, 1, loginState.getId(), "true", Boolean.FALSE); | |
| 268 | + } | |
| 269 | + /** | |
| 257 | 270 | * 血压全部孕妇管理 |
| 258 | 271 | * |
| 259 | 272 | * @param patientsQueryRequest |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
1c5958e
| ... | ... | @@ -1343,6 +1343,171 @@ |
| 1343 | 1343 | } |
| 1344 | 1344 | }); |
| 1345 | 1345 | } |
| 1346 | + /** | |
| 1347 | + * 查询贫血专病管理 | |
| 1348 | + * | |
| 1349 | + * @param riskPatientsQueryRequest | |
| 1350 | + * @param isHighRisk 控制是否是高危 | |
| 1351 | + * @param type 控制类型 1孕妇 3产妇 | |
| 1352 | + * @return | |
| 1353 | + */ | |
| 1354 | + public BaseResponse queryAnaemiaAllPuerpera(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) { | |
| 1355 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
| 1356 | + | |
| 1357 | + //组合请求 | |
| 1358 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + //查询符合条件的孕妇 | |
| 1362 | + StopWatch stopWatch = new StopWatch("queryPatient1 -" + hospital); | |
| 1363 | + stopWatch.start(); | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + Query yn = null; | |
| 1367 | + | |
| 1368 | + //妊娠合并贫血(Hb 60-110g/L) 轻度缺铁性贫血(100-109g/L)中度缺铁性贫血(70-99g/L)轻度妊娠期贫血(100-109g/l)(缺铁性) | |
| 1369 | + //轻度妊娠期贫血(100-109g/l)(巨幼细胞性) 轻度妊娠期贫血(100-109g/l)(再生障碍性) 中度妊娠期贫血(70-99g/l)(缺铁性) | |
| 1370 | + //中度妊娠期贫血(70-99g/l)(巨幼细胞性) 中度妊娠期贫血(70-99g/l)(再生障碍性) 中度妊娠期贫血(70-99g/l)(未分类) 轻度妊娠期贫血(100-109g/l)(未分类) | |
| 1371 | + //重度贫血(Hb40-60g/L) 极重度贫血(Hb<40g/L)极重度贫血(<40 g/L)(缺铁性)极重度贫血(<40 g/L)(巨幼细胞) | |
| 1372 | + //极重度贫血(<40 g/L)(再生障碍性) 极重度贫血(<40 g/L)(未分类)重度妊娠期贫血(40-69g/L)(缺铁性)重度妊娠期贫血(40-69g/L)(巨幼细胞性) | |
| 1373 | + //重度妊娠期贫血(40-69g/l)(再生障碍性) 重度妊娠期贫血(40-69g/l)(未分类)再生障碍性贫血 | |
| 1374 | + if ("1".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1375 | + Criteria criteria2 = Criteria.where("name").is("妊娠合并贫血(Hb 60-110g/L)"); | |
| 1376 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1377 | + | |
| 1378 | + } else if ("2".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1379 | + Criteria criteria2 = Criteria.where("name").is("轻度缺铁性贫血(100-109g/L)"); | |
| 1380 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1381 | + | |
| 1382 | + } else if ("3".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1383 | + Criteria criteria3 = Criteria.where("name").is("中度缺铁性贫血(70-99g/L)"); | |
| 1384 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1385 | + }else if ("4".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1386 | + Criteria criteria2 = Criteria.where("name").is("轻度妊娠期贫血(100-109g/l)(缺铁性)"); | |
| 1387 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1388 | + | |
| 1389 | + } else if ("5".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1390 | + Criteria criteria2 = Criteria.where("name").is("轻度妊娠期贫血(100-109g/l)(巨幼细胞性)"); | |
| 1391 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1392 | + | |
| 1393 | + } else if ("6".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1394 | + Criteria criteria3 = Criteria.where("name").is("轻度妊娠期贫血(100-109g/l)(再生障碍性)"); | |
| 1395 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1396 | + } else if ("7".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1397 | + Criteria criteria2 = Criteria.where("name").is("轻度妊娠期贫血(100-109g/l)(未分类)"); | |
| 1398 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1399 | + | |
| 1400 | + } else if ("8".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1401 | + Criteria criteria2 = Criteria.where("name").is("中度妊娠期贫血(70-99g/l)(缺铁性)"); | |
| 1402 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1403 | + | |
| 1404 | + } else if ("9".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1405 | + Criteria criteria3 = Criteria.where("name").is("中度妊娠期贫血(70-99g/l)(巨幼细胞性)"); | |
| 1406 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1407 | + }else if ("10".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1408 | + Criteria criteria2 = Criteria.where("name").is("中度妊娠期贫血(70-99g/l)(再生障碍性)"); | |
| 1409 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1410 | + | |
| 1411 | + } else if ("11".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1412 | + Criteria criteria3 = Criteria.where("name").is("中度妊娠期贫血(70-99g/l)(未分类)"); | |
| 1413 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1414 | + }else if ("12".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1415 | + Criteria criteria2 = Criteria.where("name").is("重度贫血(Hb40-60g/L)"); | |
| 1416 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1417 | + | |
| 1418 | + } else if ("13".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1419 | + Criteria criteria2 = Criteria.where("name").is("重度妊娠期贫血(40-69g/L)(缺铁性)"); | |
| 1420 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1421 | + | |
| 1422 | + } else if ("14".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1423 | + Criteria criteria3 = Criteria.where("name").is("重度妊娠期贫血(40-69g/L)(巨幼细胞性)"); | |
| 1424 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1425 | + }else if ("15".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1426 | + Criteria criteria2 = Criteria.where("name").is("重度妊娠期贫血(40-69g/l)(再生障碍性)"); | |
| 1427 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1428 | + | |
| 1429 | + } else if ("16".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1430 | + Criteria criteria3 = Criteria.where("name").is("重度妊娠期贫血(40-69g/l)(未分类)"); | |
| 1431 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1432 | + }else if ("17".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1433 | + Criteria criteria3 = Criteria.where("name").is("极重度贫血(Hb<40g/L)"); | |
| 1434 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1435 | + }else if ("18".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1436 | + Criteria criteria2 = Criteria.where("name").is("极重度贫血(Hb<40g/L)(缺铁性)"); | |
| 1437 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1438 | + | |
| 1439 | + } else if ("19".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1440 | + Criteria criteria2 = Criteria.where("name").is("极重度贫血(<40 g/L)(巨幼细胞)"); | |
| 1441 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1442 | + | |
| 1443 | + } else if ("20".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1444 | + Criteria criteria3 = Criteria.where("name").is("极重度贫血(<40 g/L)(再生障碍性)"); | |
| 1445 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1446 | + }else if ("21".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1447 | + Criteria criteria2 = Criteria.where("name").is("极重度贫血(<40 g/L)(未分类)"); | |
| 1448 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria2)); | |
| 1449 | + | |
| 1450 | + } else if ("22".equals(riskPatientsQueryRequest.getTwinsType())) { | |
| 1451 | + Criteria criteria3 = Criteria.where("name").is("再生障碍性贫血"); | |
| 1452 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria3)); | |
| 1453 | + }else { | |
| 1454 | + Criteria criteria1 = Criteria.where("name").is("妊娠合并贫血(Hb 60-110g/L)"); | |
| 1455 | + Criteria criteria2 = Criteria.where("name").is("轻度缺铁性贫血(100-109g/L)"); | |
| 1456 | + Criteria criteria3 = Criteria.where("name").is("中度缺铁性贫血(70-99g/L)"); | |
| 1457 | + Criteria criteria4 = Criteria.where("name").is("轻度妊娠期贫血(100-109g/l)(缺铁性)"); | |
| 1458 | + Criteria criteria5 = Criteria.where("name").is("轻度妊娠期贫血(100-109g/l)(巨幼细胞性)"); | |
| 1459 | + Criteria criteria6 = Criteria.where("name").is("轻度妊娠期贫血(100-109g/l)(再生障碍性)"); | |
| 1460 | + Criteria criteria11 = Criteria.where("name").is("轻度妊娠期贫血(100-109g/l)(未分类)"); | |
| 1461 | + | |
| 1462 | + Criteria criteria7 = Criteria.where("name").is("中度妊娠期贫血(70-99g/l)(缺铁性)"); | |
| 1463 | + Criteria criteria8 = Criteria.where("name").is("中度妊娠期贫血(70-99g/l)(巨幼细胞性)"); | |
| 1464 | + Criteria criteria9 = Criteria.where("name").is("中度妊娠期贫血(70-99g/l)(再生障碍性)"); | |
| 1465 | + Criteria criteria10 = Criteria.where("name").is("中度妊娠期贫血(70-99g/l)(未分类)"); | |
| 1466 | + | |
| 1467 | + Criteria criteria12 = Criteria.where("name").is("重度贫血(Hb40-60g/L)"); | |
| 1468 | + Criteria criteria17 = Criteria.where("name").is("重度妊娠期贫血(40-69g/L)(缺铁性)"); | |
| 1469 | + Criteria criteria18 = Criteria.where("name").is("重度妊娠期贫血(40-69g/L)(巨幼细胞性)"); | |
| 1470 | + Criteria criteria19 = Criteria.where("name").is("重度妊娠期贫血(40-69g/l)(再生障碍性)"); | |
| 1471 | + Criteria criteria20 = Criteria.where("name").is("重度妊娠期贫血(40-69g/l)(未分类)"); | |
| 1472 | + | |
| 1473 | + Criteria criteria22 = Criteria.where("name").is("极重度贫血(Hb<40g/L)"); | |
| 1474 | + Criteria criteria13 = Criteria.where("name").is("极重度贫血(Hb<40g/L)(缺铁性)"); | |
| 1475 | + Criteria criteria14 = Criteria.where("name").is("极重度贫血(<40 g/L)(巨幼细胞)"); | |
| 1476 | + Criteria criteria15 = Criteria.where("name").is("极重度贫血(<40 g/L)(再生障碍性)"); | |
| 1477 | + Criteria criteria16 = Criteria.where("name").is("极重度贫血(<40 g/L)(未分类)"); | |
| 1478 | + | |
| 1479 | + Criteria criteria21 = Criteria.where("name").is("再生障碍性贫血"); | |
| 1480 | + //yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria4)); | |
| 1481 | + yn = Query.query(Criteria.where("yn").is(1).orOperator(criteria1, criteria2, criteria3,criteria4,criteria5, criteria6, criteria7,criteria8, | |
| 1482 | + criteria9, criteria10, criteria11,criteria12,criteria13, criteria14, criteria15,criteria16,criteria17, criteria18, criteria19,criteria20,criteria21, criteria22 | |
| 1483 | + )); | |
| 1484 | + } | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + List <BasicConfig> models = mongoTemplate.find(yn, BasicConfig.class); | |
| 1488 | + List <String> rFactorList = new ArrayList <>(); | |
| 1489 | + if (models != null && models.size() > 0) { | |
| 1490 | + for (int i = 0; i < models.size(); i++) { | |
| 1491 | + rFactorList.add(models.get(i).getId()); | |
| 1492 | + } | |
| 1493 | + } | |
| 1494 | + patientsQuery.setrFactorList(rFactorList); | |
| 1495 | + List <Patients> patientses = patientsService.queryPatientBySort(patientsQuery, riskPatientsQueryRequest.getSort(), riskPatientsQueryRequest.getOrder()); | |
| 1496 | + stopWatch.stop(); | |
| 1497 | + | |
| 1498 | + logger.info(stopWatch.toString()); | |
| 1499 | + List data = new ArrayList <QuanChanResult>(); | |
| 1500 | + if (CollectionUtils.isNotEmpty(patientses)) { | |
| 1501 | + if (type == 1) { | |
| 1502 | + //处理全部孕妇的情况 | |
| 1503 | + data = convertToTwinsPatient(riskPatientsQueryRequest, patientses, userId, hospital); | |
| 1504 | + } | |
| 1505 | + } | |
| 1506 | +// patientsQuery.mysqlBuild(data.size()); | |
| 1507 | + return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data).setPageInfo(patientsQuery.getPageInfo()); | |
| 1508 | + | |
| 1509 | + } | |
| 1510 | + | |
| 1346 | 1511 | |
| 1347 | 1512 | /** |
| 1348 | 1513 | * 查询双胎全部孕妇管理 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IBloodPressureService.java
View file @
1c5958e
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java
View file @
1c5958e
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
1c5958e
| ... | ... | @@ -852,6 +852,21 @@ |
| 852 | 852 | } |
| 853 | 853 | } |
| 854 | 854 | |
| 855 | + @Override | |
| 856 | + public BloodPressure getLastInfo(String parentId) { | |
| 857 | + | |
| 858 | + Query query = new Query(); | |
| 859 | + query.addCriteria(Criteria.where("pid").is(parentId)); | |
| 860 | + query.with(new Sort(Sort.Direction.DESC, "modified")); | |
| 861 | + List<BloodPressure> bloodPressures = mongoTemplate.find( | |
| 862 | + query, BloodPressure.class); | |
| 863 | + BloodPressure bloodPressure = null; | |
| 864 | + if (CollectionUtils.isNotEmpty(bloodPressures)) { | |
| 865 | + bloodPressure = bloodPressures.get(0); | |
| 866 | + } | |
| 867 | + return bloodPressure; | |
| 868 | + } | |
| 869 | + | |
| 855 | 870 | public void getSeries(Map<String, Map<Integer, Double>> series, String bmiStr, String bregmatic) { |
| 856 | 871 | Map<Integer, Double> highMap = new LinkedHashMap<>(); |
| 857 | 872 | Map<Integer, Double> normalMap = new LinkedHashMap<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
1c5958e
| ... | ... | @@ -868,7 +868,7 @@ |
| 868 | 868 | * @param pid |
| 869 | 869 | * @return |
| 870 | 870 | */ |
| 871 | - private PatientWeight queryPatientWeight(String pid) { | |
| 871 | + public PatientWeight queryPatientWeight(String pid) { | |
| 872 | 872 | Query query = new Query(); |
| 873 | 873 | query.addCriteria(Criteria.where("pid").is(pid).and("nowWeight").ne("")); |
| 874 | 874 | query.with(new Sort(Sort.Direction.DESC, "modified")); |