Commit 59229b729c9a384963a26bdf331e5bb2a4f49591
1 parent
20605e4c95
Exists in
master
and in
6 other branches
小程序录入添加复诊记录
Showing 1 changed file with 33 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
59229b7
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
10 | 10 | import com.lyms.platform.common.result.BaseResponse; |
11 | 11 | import com.lyms.platform.common.utils.*; |
12 | +import com.lyms.platform.operate.web.request.AntExAddRequest; | |
12 | 13 | import com.lyms.platform.operate.web.request.AntExManagerQueryRequest; |
13 | 14 | import com.lyms.platform.operate.web.request.CjStatisticsQueryRequest; |
14 | 15 | import com.lyms.platform.operate.web.result.AntExManagerResult; |
... | ... | @@ -76,6 +77,9 @@ |
76 | 77 | @Autowired |
77 | 78 | private MongoTemplate mongoTemplate; |
78 | 79 | |
80 | + @Autowired | |
81 | + private AntenatalExaminationFacade antenatalExaminationFacade; | |
82 | + | |
79 | 83 | public void syncAntRecordToList(String hospitalId) { |
80 | 84 | recordService.syncAntRecordToList(hospitalId); |
81 | 85 | } |
82 | 86 | |
... | ... | @@ -874,7 +878,36 @@ |
874 | 878 | */ |
875 | 879 | public BaseResponse inputWxData(String fuh, String abdominalGirth, String fhr, String pid, String hospitalId, String nextTime) { |
876 | 880 | WxMeasureInfoModel wxMeasureInfo = new WxMeasureInfoModel(); |
881 | + boolean falg = true; | |
877 | 882 | if (StringUtils.isNotEmpty(pid) && StringUtils.isNotEmpty(hospitalId)) { |
883 | + List<AntenatalExaminationModel> examinationModel = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)), AntenatalExaminationModel.class); | |
884 | + if (CollectionUtils.isNotEmpty(examinationModel)) { | |
885 | + for (AntenatalExaminationModel model : examinationModel) { | |
886 | + if (StringUtils.isNotEmpty(DateUtil.getyyyy_MM_dd(model.getCheckDate())) && | |
887 | + DateUtil.getyyyy_MM_dd(new Date()).equals(DateUtil.getyyyy_MM_dd(model.getCheckDate()))) { | |
888 | + falg = false; | |
889 | + } | |
890 | + } | |
891 | + } | |
892 | + if (falg) { | |
893 | + //创建一条复诊记录 | |
894 | + Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId)), Patients.class); | |
895 | + if (null != patients) { | |
896 | + AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(patients.getId())), AntExChuModel.class); | |
897 | + if (null != antExChuModel) { | |
898 | + AntExAddRequest antExAddRequest = new AntExAddRequest(); | |
899 | + antExAddRequest.setCheckDate(DateUtil.getyyyy_MM_dd(new Date())); | |
900 | + antExAddRequest.setCheckDate("1000000185"); | |
901 | + antExAddRequest.setDiagnosisOther(DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));// diagnosisOther: "29+4周妊娠 " | |
902 | + antExAddRequest.setCurrentDueDate(DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));//currentDueDate: "孕29周+4天" | |
903 | + antExAddRequest.setGuide("个人卫生 受激素影响怀孕后肤质与孕前不一样,保养皮肤请做好日常清洁并避免使用刺激性的护肤品与保养品。\\r\\n心理调节 心理状态不佳更需家人陪伴与支持,可与丈夫一起上孕妇学校课程、或与丈夫携手散步、又或让丈夫给您进行甜蜜按摩。\\r\\n营养 虽然孕期体重增加过多会增加你的高血压和怀上巨大儿的可能性。但是也不要进入饮食的误区,靠节食来减缓体重增长的速度。正确的方法是,请医生给你一些均衡饮食的建议,使你能够达到孕期的标准体重。\\r\\n运动 骨盆底肌肉练习:从现在起,你可以开始做骨盆底肌肉练习了,这个运动可以帮助你分娩的更快、更容易。骨盆底肌肉练习的步骤是:收缩肛门、阴道,再放松。重复这个动作30次。\\r\\n其他 当宝贝活动较多的时候,可跟老公一起给宝贝读些优美的诗歌,享受一家人的幸福时光。\\r\\n"); | |
904 | + antExAddRequest.setParentId(patients.getId()); | |
905 | + antExAddRequest.setPid(pid); | |
906 | + antExAddRequest.setRiskFactor(patients.getRiskFactorId()); | |
907 | + antenatalExaminationFacade.addOneAntEx(antExAddRequest, 1000000185); | |
908 | + } | |
909 | + } | |
910 | + } | |
878 | 911 | List<Map> listMap = new ArrayList<>(); |
879 | 912 | Map<String, Object> yumInfosMap = new LinkedHashMap<>(); |
880 | 913 | yumInfosMap.put("inputTime", DateUtil.getyyyy_MM_dd(new Date())); |
... | ... | @@ -1040,8 +1073,6 @@ |
1040 | 1073 | } |
1041 | 1074 | return list; |
1042 | 1075 | }*/ |
1043 | - | |
1044 | - | |
1045 | 1076 | public static String getPinYinHeadChar(String str) { |
1046 | 1077 | StringBuilder sb = new StringBuilder(); |
1047 | 1078 | for (int i = 0; i < str.length(); i++) { |