Commit ecbc6c6a14015ba699c19f8e87dbb9177e10a77d
1 parent
10fbdd5306
Exists in
dev
#fix:优化艾梅乙危急值管理功能
Showing 5 changed files with 106 additions and 35 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.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-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
View file @
ecbc6c6
... | ... | @@ -258,14 +258,14 @@ |
258 | 258 | crisisItem.setName(model.getType()); |
259 | 259 | crisisItem.setClassify(model.getType()); |
260 | 260 | crisisItem.setClassifyName(model.getType()); |
261 | - crisisItem.setResult(item.getResult()); | |
261 | + crisisItem.setResult(item.getResult().trim()); | |
262 | 262 | //crisisItem.setFlag(item.getFlag()); |
263 | 263 | crisisItem.setItemCode(code); |
264 | 264 | crisisItem.setItemName(name); |
265 | 265 | crisisItem.setRef(item.getRef()); |
266 | 266 | crisisItem.setUnit(item.getUnit()); |
267 | 267 | lisCrisisItemService.addLisCrisisItem(crisisItem); |
268 | - String result= getResult(code,name,item.getResult().trim()); | |
268 | + String result= getResult(code,name,crisisItem); | |
269 | 269 | if (StringUtils.isNotEmpty(result)){ |
270 | 270 | params.put(code, result); |
271 | 271 | } |
272 | 272 | |
273 | 273 | |
274 | 274 | |
275 | 275 | |
276 | 276 | |
277 | 277 | |
278 | 278 | |
279 | 279 | |
280 | 280 | |
... | ... | @@ -813,59 +813,50 @@ |
813 | 813 | |
814 | 814 | } |
815 | 815 | |
816 | - private static String getResult(String code,String name,String result){ | |
816 | + private String getResult(String code,String name,LisCrisisItem crisisItem){ | |
817 | 817 | if (code.equals("HBcAb")){ |
818 | 818 | if ("乙型肝炎核心抗体(发光法)".equals(name)){ |
819 | - return result; | |
819 | + return crisisItem.getResult(); | |
820 | 820 | } |
821 | 821 | }else if (code.equals("HBeAb")){ |
822 | 822 | if ("乙型肝炎e抗体(发光法)".equals(name)){ |
823 | - return result; | |
823 | + return crisisItem.getResult(); | |
824 | 824 | } |
825 | 825 | }else if (code.equals("HBeAg")){ |
826 | 826 | if ("乙型肝炎e抗原(发光法)".equals(name)){ |
827 | - return result; | |
827 | + return buildEmergency(crisisItem); | |
828 | 828 | } |
829 | 829 | }else if (code.equals("HBsAb")){ |
830 | 830 | if ("乙型肝炎表面抗体(发光法)".equals(name)){ |
831 | - return result; | |
831 | + return buildEmergency(crisisItem); | |
832 | 832 | } |
833 | 833 | }else if (code.equals("HBsAg")){ |
834 | 834 | if ("乙型肝炎表面抗原(发光法)".equals(name)){ |
835 | - return result; | |
835 | + return buildEmergency(crisisItem); | |
836 | 836 | } |
837 | 837 | }else { |
838 | - return result; | |
838 | + return crisisItem.getResult(); | |
839 | 839 | } |
840 | 840 | return null; |
841 | 841 | } |
842 | 842 | |
843 | - private boolean buildEmergency(String result, ReferValue referValue) { | |
844 | - boolean b = false; | |
845 | - if (StringUtils.isEmpty(result)) { | |
846 | - return b; | |
847 | - } | |
848 | - if ("阴性".equals(result)||"阳性".equals(result)){ | |
849 | - return true; | |
850 | - } | |
851 | - BigDecimal bd = new BigDecimal(result); | |
852 | - if (StringUtils.isNotBlank(referValue.getEmergencyMin()) && StringUtils.isNotBlank(referValue.getEmergencyMax())) { | |
853 | - if (bd.compareTo(new BigDecimal(referValue.getEmergencyMin())) < 0 || | |
854 | - bd.compareTo(new BigDecimal((referValue.getEmergencyMax()))) > 0) { | |
855 | - b = true; | |
843 | + | |
844 | + | |
845 | + private static String buildEmergency(LisCrisisItem crisisItem) { | |
846 | + String result =crisisItem.getResult(); | |
847 | + String ref=crisisItem.getRef(); | |
848 | + if (StringUtils.isNotEmpty(result)&&StringUtils.isNotEmpty(ref)){ | |
849 | + String array[]= result.split("<"); | |
850 | + String arrays[]= ref.split("<"); | |
851 | + BigDecimal b=new BigDecimal(array[1]); | |
852 | + BigDecimal a=new BigDecimal(arrays[1]); | |
853 | + if (b.compareTo(a)>0){ | |
854 | + return "阳性"; | |
855 | + }else { | |
856 | + return "阴性"; | |
856 | 857 | } |
857 | - } else { | |
858 | - if (StringUtils.isNotBlank(referValue.getEmergencyMin())) { | |
859 | - if (bd.compareTo(new BigDecimal(referValue.getEmergencyMin())) < 0) { | |
860 | - b = true; | |
861 | - } | |
862 | - } else if (StringUtils.isNotBlank(referValue.getEmergencyMax())) { | |
863 | - if (bd.compareTo(new BigDecimal(referValue.getEmergencyMax())) > 0) { | |
864 | - b = true; | |
865 | - } | |
866 | - } | |
867 | 858 | } |
868 | - return b; | |
859 | + return null; | |
869 | 860 | } |
870 | 861 | |
871 | 862 |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
ecbc6c6
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | import com.lyms.platform.common.dao.operator.MongoCondition; |
6 | 6 | import com.lyms.platform.common.dao.operator.MongoOper; |
7 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
8 | +import com.lyms.platform.common.enums.DiseaseTypeEnums; | |
8 | 9 | import com.lyms.platform.common.utils.JsonUtil; |
9 | 10 | import com.lyms.platform.common.utils.StringUtils; |
10 | 11 | import org.apache.commons.collections.CollectionUtils; |
11 | 12 | |
... | ... | @@ -454,8 +455,18 @@ |
454 | 455 | private boolean dtFm=false; |
455 | 456 | |
456 | 457 | private String allPats; |
458 | + //大同艾梅乙查询 | |
459 | + private String diseaseType; | |
457 | 460 | private MongoCondition condition2; |
458 | 461 | |
462 | + public String getDiseaseType() { | |
463 | + return diseaseType; | |
464 | + } | |
465 | + | |
466 | + public void setDiseaseType(String diseaseType) { | |
467 | + this.diseaseType = diseaseType; | |
468 | + } | |
469 | + | |
459 | 470 | public String getAllPats() { |
460 | 471 | return allPats; |
461 | 472 | } |
462 | 473 | |
... | ... | @@ -1400,7 +1411,41 @@ |
1400 | 1411 | c1 = c.orCondition(new MongoCondition[]{con1, con2}).getCriteria(); |
1401 | 1412 | } |
1402 | 1413 | } |
1414 | + if(StringUtils.isNotEmpty(diseaseType)){ | |
1415 | + MongoCondition c = MongoCondition.newInstance(); | |
1416 | + List <MongoCondition> mongoCondits = new ArrayList <>(); | |
1417 | + //乙肝查询 | |
1418 | + // hBcAbJ;//乙肝表面抗原 | |
1419 | + // hBeAbJ;//乙肝表面抗体 | |
1420 | + // hBeAgj;//乙肝e抗原 | |
1421 | + // hBsAbJ;//乙肝e抗体 阳 | |
1422 | + // hBsAgJ;//乙肝核心抗体 | |
1423 | + if (diseaseType.equals(DiseaseTypeEnums.YIGAN.getName())) { | |
1424 | + mongoCondits.add(new MongoCondition("hBcAbJ", "阳", MongoOper.LIKE)); | |
1425 | + mongoCondits.add(new MongoCondition("hBeAbJ", "阳", MongoOper.LIKE)); | |
1426 | + mongoCondits.add(new MongoCondition("hBeAgj", "阳", MongoOper.LIKE)); | |
1427 | + mongoCondits.add(new MongoCondition("hBsAbJ", "阴", MongoOper.LIKE)); | |
1428 | + mongoCondits.add(new MongoCondition("hBsAgJ", "阳", MongoOper.LIKE)); | |
1403 | 1429 | |
1430 | + }else if (diseaseType.equals(DiseaseTypeEnums.MEIDU.getName())) { | |
1431 | + //梅毒查询 | |
1432 | + mongoCondits.add(new MongoCondition("tp", "阳", MongoOper.LIKE).orCondition(new MongoCondition("syjg", "", MongoOper.NE))); | |
1433 | + mongoCondits.add(new MongoCondition("HIVJ", "阳", MongoOper.LIKE).orCondition(new MongoCondition("hivkt", "", MongoOper.NE))); | |
1434 | + }else { | |
1435 | + mongoCondits.add(new MongoCondition("hBcAbJ", "阳", MongoOper.LIKE)); | |
1436 | + mongoCondits.add(new MongoCondition("hBeAbJ", "阳", MongoOper.LIKE)); | |
1437 | + mongoCondits.add(new MongoCondition("hBeAgj", "阳", MongoOper.LIKE)); | |
1438 | + mongoCondits.add(new MongoCondition("hBsAbJ", "阴", MongoOper.LIKE)); | |
1439 | + mongoCondits.add(new MongoCondition("hBsAgJ", "阳", MongoOper.LIKE)); | |
1440 | + mongoCondits.add(new MongoCondition("tp", "阳", MongoOper.LIKE).orCondition(new MongoCondition("syjg", "", MongoOper.NE))); | |
1441 | + mongoCondits.add(new MongoCondition("HIVJ", "阳", MongoOper.LIKE).orCondition(new MongoCondition("hivkt", "", MongoOper.NE))); | |
1442 | + } | |
1443 | + if (c1 != null) { | |
1444 | + c1 = c1.andOperator(c.orCondition(mongoCondits.toArray(new MongoCondition[mongoCondits.size()])).getCriteria()); | |
1445 | + } else { | |
1446 | + c1 = c.orCondition(mongoCondits.toArray(new MongoCondition[mongoCondits.size()])).getCriteria(); | |
1447 | + } | |
1448 | + } | |
1404 | 1449 | if (existRiskLevel) { |
1405 | 1450 | MongoCondition c = MongoCondition.newInstance(); |
1406 | 1451 | MongoCondition con1 = MongoCondition.newInstance("riskLevelId", "224b2329-cb82-4da3-a071-8527f8283aab", MongoOper.LIKE); // 紫色 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
ecbc6c6
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
ecbc6c6
... | ... | @@ -297,6 +297,8 @@ |
297 | 297 | return patientFacade.queryCesareanAllPuerpera(patientsQueryRequest, null, 1, loginState.getId(), "true", Boolean.FALSE); |
298 | 298 | } |
299 | 299 | |
300 | + | |
301 | + | |
300 | 302 | /** |
301 | 303 | * 高龄孕产妇全部孕妇管理 |
302 | 304 | * |
... | ... | @@ -618,7 +620,18 @@ |
618 | 620 | LoginContext loginState = (LoginContext) request1.getAttribute("loginContext"); |
619 | 621 | return patientFacade.patientGuildSms(patientGuideSmsRequest, loginState.getId()); |
620 | 622 | } |
621 | - | |
623 | + /** | |
624 | + * 艾梅乙孕妇管理 | |
625 | + * | |
626 | + * @return 返回结果 | |
627 | + */ | |
628 | + @RequestMapping(value = "/queryAmyPatients", method = RequestMethod.GET) | |
629 | + @ResponseBody | |
630 | + @TokenRequired | |
631 | + public BaseResponse queryAmyPatients(String diseaseType,Integer page,Integer limit, HttpServletRequest request){ | |
632 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
633 | + return patientFacade.queryAmyPatients(loginState.getId(),diseaseType,page,limit); | |
634 | + } | |
622 | 635 | /** |
623 | 636 | * 区域高危孕妇管理 |
624 | 637 | * |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
ecbc6c6
... | ... | @@ -704,7 +704,26 @@ |
704 | 704 | |
705 | 705 | return patientsQuery; |
706 | 706 | } |
707 | + /** | |
708 | + * 大同艾梅乙查询 | |
709 | + * @param userId | |
710 | + * @return | |
711 | + */ | |
712 | + public BaseResponse queryAmyPatients(Integer userId,String diseaseType,Integer page,Integer limit){ | |
713 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
714 | + PatientsQuery patientsQuery =new PatientsQuery(); | |
715 | + patientsQuery.setDtFm(true); | |
716 | + patientsQuery.setPage(page); | |
717 | + patientsQuery.setLimit(limit); | |
718 | + patientsQuery.setHospitalId(hospital); | |
719 | + patientsQuery.setYn(1); | |
720 | + patientsQuery.setType(1); | |
721 | + patientsQuery.setDiseaseType(diseaseType); | |
722 | + List <Patients> patientses = patientsService.queryPatient(patientsQuery); | |
723 | + List data = convertToQuanPatient(patientses, userId, hospital); | |
724 | + return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(patientsQuery.getPageInfo()); | |
707 | 725 | |
726 | + } | |
708 | 727 | |
709 | 728 | /** |
710 | 729 | * 查询高危孕妇 |
... | ... | @@ -1711,6 +1730,7 @@ |
1711 | 1730 | // patientsQuery.mysqlBuild(data.size()); |
1712 | 1731 | return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data).setPageInfo(patientsQuery.getPageInfo()); |
1713 | 1732 | } |
1733 | + | |
1714 | 1734 | |
1715 | 1735 | |
1716 | 1736 | /** |