Commit 3570c3e45d85aa09f7f4c3fe7a29be0218119f75
1 parent
da6ca2b2f6
Exists in
master
and in
6 other branches
高危检查列表
Showing 6 changed files with 104 additions and 12 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/AntExRecordModel.java
- platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
- platform-msg-generate/src/main/java/com/lyms/platform/msg/remote/AmsMessageService.java
- platform-msg-generate/src/main/resources/config.properties
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
platform-dal/src/main/java/com/lyms/platform/pojo/AntExRecordModel.java
View file @
3570c3e
... | ... | @@ -52,6 +52,10 @@ |
52 | 52 | private List hLevel; |
53 | 53 | //风险因素 |
54 | 54 | private List hRisk; |
55 | + | |
56 | + //增加风险因素 | |
57 | + private List incrhRisk; | |
58 | + | |
55 | 59 | //风险因素 |
56 | 60 | private List screenResult ; |
57 | 61 | private String pid; |
... | ... | @@ -86,6 +90,14 @@ |
86 | 90 | |
87 | 91 | |
88 | 92 | private Integer first; // 1否 2 是,是否当前医院第一次初诊 德州需求 |
93 | + | |
94 | + public List getIncrhRisk() { | |
95 | + return incrhRisk; | |
96 | + } | |
97 | + | |
98 | + public void setIncrhRisk(List incrhRisk) { | |
99 | + this.incrhRisk = incrhRisk; | |
100 | + } | |
89 | 101 | |
90 | 102 | public List getScreenResult() { |
91 | 103 | return screenResult; |
platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
View file @
3570c3e
... | ... | @@ -61,7 +61,16 @@ |
61 | 61 | private String areaId; |
62 | 62 | private String streetId; |
63 | 63 | private Integer type; |
64 | + private String neqId; | |
64 | 65 | |
66 | + public String getNeqId() { | |
67 | + return neqId; | |
68 | + } | |
69 | + | |
70 | + public void setNeqId(String neqId) { | |
71 | + this.neqId = neqId; | |
72 | + } | |
73 | + | |
65 | 74 | public Integer getFirst() { |
66 | 75 | return first; |
67 | 76 | } |
... | ... | @@ -437,6 +446,10 @@ |
437 | 446 | if(CollectionUtils.isNotEmpty(parentIds)){ |
438 | 447 | condition = condition.and("parentId", parentIds, MongoOper.IN); |
439 | 448 | } |
449 | + if (null != neqId) { | |
450 | + condition = condition.and("id", neqId, MongoOper.NE); | |
451 | + } | |
452 | + | |
440 | 453 | if (null != pid) { |
441 | 454 | condition = condition.and("pid", pid, MongoOper.IS); |
442 | 455 | } |
platform-msg-generate/src/main/java/com/lyms/platform/msg/remote/AmsMessageService.java
View file @
3570c3e
... | ... | @@ -173,7 +173,7 @@ |
173 | 173 | // } |
174 | 174 | |
175 | 175 | public static void main(String[] args) { |
176 | - Map<String,List<MessageContent>> list = getMessageTemplateMap("197", | |
176 | + Map<String,List<MessageContent>> list = getMessageTemplateMap("2100001718", | |
177 | 177 | AmsServiceTypeEnum.CHILD_GUIDE); |
178 | 178 | List<MessageContent> msgs = list.get("0周"); |
179 | 179 | System.out.println(list); |
platform-msg-generate/src/main/resources/config.properties
View file @
3570c3e
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | |
5 | 5 | #AMS地址 线上:http://data.api.healthbaby.com.cn/v1/messages 测试:http://data.api.stage.healthbaby.com.cn/v1/messages |
6 | 6 | #演示地址 https://stage-rp-data-api.healthbaby.com.cn/v1/messages |
7 | -ams_url=http://data.api.stage.healthbaby.com.cn/v1/messages | |
7 | +ams_url=http://data.api.healthbaby.com.cn/v1/messages | |
8 | 8 | |
9 | 9 | #短信当天发送时间 如16:00 |
10 | 10 | send_time=16:00 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
3570c3e
... | ... | @@ -661,6 +661,8 @@ |
661 | 661 | |
662 | 662 | List<AntExRecordModel> riskList = new ArrayList<>(); |
663 | 663 | |
664 | + AntExRecordQuery beforeRecordQuery = new AntExRecordQuery(); | |
665 | + | |
664 | 666 | if (map.size() > 0) |
665 | 667 | { |
666 | 668 | for (String patientId : map.keySet()) |
667 | 669 | |
668 | 670 | |
669 | 671 | |
670 | 672 | |
671 | 673 | |
... | ... | @@ -670,23 +672,88 @@ |
670 | 672 | { |
671 | 673 | if (list.size() == 1) |
672 | 674 | { |
673 | - AntExRecordModel after = list.get(0); | |
674 | - if (!(after.gethRisk() != null && after.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) | |
675 | - || !CollectionUtils.isNotEmpty(after.gethRisk())) | |
675 | + AntExRecordModel oneRecord = list.get(0); | |
676 | + if (!(CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && oneRecord.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6"))) | |
676 | 677 | { |
677 | - riskList.add(after); | |
678 | + if (CollectionUtils.isNotEmpty(oneRecord.gethRisk())) | |
679 | + { | |
680 | + beforeRecordQuery.setParentId(patientId); | |
681 | + beforeRecordQuery.setCheckTimeEnd(oneRecord.getCheckTime()); | |
682 | + beforeRecordQuery.setNeqId(oneRecord.getId()); | |
683 | + List<AntExRecordModel> beforeAntRecords = recordService.queryAntExRecords(beforeRecordQuery); | |
684 | + if (CollectionUtils.isNotEmpty(beforeAntRecords)) | |
685 | + { | |
686 | + AntExRecordModel twoRecord = beforeAntRecords.get(0); | |
687 | + List currentRiskList = oneRecord.gethRisk(); | |
688 | + List beforeRiskList = twoRecord.gethRisk(); | |
689 | + if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) | |
690 | + { | |
691 | + oneRecord.setIncrhRisk(currentRiskList); | |
692 | + riskList.add(oneRecord); | |
693 | + } | |
694 | + else if (CollectionUtils.isNotEmpty(beforeRiskList) ) | |
695 | + { | |
696 | + List incrHrisk = new ArrayList(); | |
697 | + for (Object riskId : currentRiskList) | |
698 | + { | |
699 | + if (!beforeRiskList.contains(riskId)) | |
700 | + { | |
701 | + incrHrisk.add(riskId); | |
702 | + } | |
703 | + } | |
704 | + if (CollectionUtils.isNotEmpty(incrHrisk)) | |
705 | + { | |
706 | + oneRecord.setIncrhRisk(incrHrisk); | |
707 | + riskList.add(oneRecord); | |
708 | + } | |
709 | + } | |
710 | + } | |
711 | + else | |
712 | + { | |
713 | + oneRecord.setIncrhRisk(oneRecord.gethRisk()); | |
714 | + riskList.add(oneRecord); | |
715 | + } | |
716 | + } | |
678 | 717 | } |
679 | - | |
680 | 718 | } |
681 | - else if (list.size() == 2) | |
719 | + else if (list.size() > 1) | |
682 | 720 | { |
683 | - AntExRecordModel after = list.get(0); | |
684 | - AntExRecordModel before = list.get(1); | |
721 | + AntExRecordModel oneRecord = list.get(0); | |
722 | + | |
723 | + if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && oneRecord.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) | |
724 | + { | |
725 | + continue; | |
726 | + } | |
727 | + | |
728 | + AntExRecordModel twoRecord = list.get(1); | |
729 | + | |
730 | + List currentRiskList = oneRecord.gethRisk(); | |
731 | + List beforeRiskList = twoRecord.gethRisk(); | |
732 | + if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) | |
733 | + { | |
734 | + oneRecord.setIncrhRisk(currentRiskList); | |
735 | + riskList.add(oneRecord); | |
736 | + } | |
737 | + else if (CollectionUtils.isNotEmpty(beforeRiskList) ) | |
738 | + { | |
739 | + List incrHrisk = new ArrayList(); | |
740 | + for (Object riskId : currentRiskList) | |
741 | + { | |
742 | + if (!beforeRiskList.contains(riskId)) | |
743 | + { | |
744 | + incrHrisk.add(riskId); | |
745 | + } | |
746 | + } | |
747 | + if (CollectionUtils.isNotEmpty(incrHrisk)) | |
748 | + { | |
749 | + oneRecord.setIncrhRisk(incrHrisk); | |
750 | + riskList.add(oneRecord); | |
751 | + } | |
752 | + } | |
685 | 753 | } |
686 | 754 | } |
687 | 755 | } |
688 | 756 | } |
689 | - | |
690 | 757 | |
691 | 758 | return null; |
692 | 759 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
3570c3e
... | ... | @@ -2496,7 +2496,7 @@ |
2496 | 2496 | |
2497 | 2497 | if(patients.getSendMsgTime()!=null){ |
2498 | 2498 | String sendMsgTime = DateUtil.getyyyy_MM_dd1(patients.getSendMsgTime()); |
2499 | - Integer day = DateUtil.daysBetween(new Date(),patients.getSendMsgTime()); | |
2499 | + Integer day = DateUtil.daysBetween(patients.getSendMsgTime(),new Date()); | |
2500 | 2500 | |
2501 | 2501 | String sendMsg = "(上次发送时间"+sendMsgTime+"【"+day+"天前】)"; |
2502 | 2502 | antexListResult.setLastSendMsg(sendMsg); |