Commit 32ba6d118070ec9d2982da846b08fbb847b1148b
1 parent
296a726fc9
Exists in
master
and in
6 other branches
小程序获取机构医生列表信息
Showing 3 changed files with 118 additions and 54 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/StopPregnancyController.java
View file @
32ba6d1
... | ... | @@ -27,36 +27,38 @@ |
27 | 27 | |
28 | 28 | /** |
29 | 29 | * 添加/更新 终止妊娠 |
30 | + * | |
30 | 31 | * @param request |
31 | 32 | * @return |
32 | 33 | */ |
33 | 34 | @RequestMapping(method = RequestMethod.POST, value = "/addOrUpStopPreg") |
34 | 35 | @ResponseBody |
35 | 36 | @TokenRequired |
36 | - public BaseResponse addOrUpStopPreg(@Valid @RequestBody StopPregRequest params,HttpServletRequest request) { | |
37 | - if (!StringUtils.isEmpty(params.getId())) | |
38 | - { | |
37 | + public BaseResponse addOrUpStopPreg(@Valid @RequestBody StopPregRequest params, HttpServletRequest request) { | |
38 | + if (!StringUtils.isEmpty(params.getId())) { | |
39 | 39 | return stopPregnancyFacade.updateStopPreg(params); |
40 | 40 | } |
41 | 41 | |
42 | 42 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
43 | - return stopPregnancyFacade.addStopPreg(params,loginState.getId()); | |
43 | + return stopPregnancyFacade.addStopPreg(params, loginState.getId()); | |
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
47 | - *查询终止妊娠记录 | |
47 | + * 查询终止妊娠记录 | |
48 | + * | |
48 | 49 | * @param id 孕妇建档Id |
49 | 50 | * @return |
50 | 51 | */ |
51 | 52 | @RequestMapping(method = RequestMethod.GET, value = "/queryStopPreg/{id}") |
52 | 53 | @ResponseBody |
53 | - public BaseResponse queryStopPreg(@PathVariable("id")String id) { | |
54 | + public BaseResponse queryStopPreg(@PathVariable("id") String id) { | |
54 | 55 | return stopPregnancyFacade.queryStopPreg(id); |
55 | 56 | } |
56 | 57 | |
57 | 58 | |
58 | 59 | /** |
59 | 60 | * 返回该医院可选择的录入人 |
61 | + * | |
60 | 62 | * @return |
61 | 63 | */ |
62 | 64 | @RequestMapping(method = RequestMethod.GET, value = "/queryInPerson") |
63 | 65 | |
... | ... | @@ -66,8 +68,10 @@ |
66 | 68 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
67 | 69 | return stopPregnancyFacade.queryInPerson(loginState.getId()); |
68 | 70 | } |
71 | + | |
69 | 72 | /** |
70 | 73 | * 返回该医院可选择的录入人 |
74 | + * | |
71 | 75 | * @return |
72 | 76 | */ |
73 | 77 | @RequestMapping(method = RequestMethod.GET, value = "/queryInPerson2") |
... | ... | @@ -77,5 +81,17 @@ |
77 | 81 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
78 | 82 | return stopPregnancyFacade.queryInPerson2(loginState.getId()); |
79 | 83 | } |
84 | + | |
85 | + /** | |
86 | + * 小程序返回机构下医生的列表 | |
87 | + **/ | |
88 | + @RequestMapping(method = RequestMethod.GET, value = "/wx/queryInPerson3") | |
89 | + @ResponseBody | |
90 | + @TokenRequired | |
91 | + public BaseResponse queryInPerson3(String orgId) { | |
92 | + return stopPregnancyFacade.queryInPerson3(Integer.parseInt(orgId)); | |
93 | + } | |
94 | + | |
95 | + | |
80 | 96 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
32ba6d1
... | ... | @@ -81,6 +81,9 @@ |
81 | 81 | @Autowired |
82 | 82 | private AntenatalExaminationFacade antenatalExaminationFacade; |
83 | 83 | |
84 | + @Autowired | |
85 | + private ModularFunctionConfigService modularFunctionConfigServcie; | |
86 | + | |
84 | 87 | public void syncAntRecordToList(String hospitalId) { |
85 | 88 | recordService.syncAntRecordToList(hospitalId); |
86 | 89 | } |
87 | 90 | |
88 | 91 | |
89 | 92 | |
90 | 93 | |
... | ... | @@ -880,51 +883,66 @@ |
880 | 883 | public BaseResponse inputWxData(String fuh, String abdominalGirth, String fhr, String pid, String hospitalId, String nextTime) { |
881 | 884 | WxMeasureInfoModel wxMeasureInfo = new WxMeasureInfoModel(); |
882 | 885 | boolean falg = true; |
886 | + String value = null; | |
883 | 887 | if (StringUtils.isNotEmpty(pid) && StringUtils.isNotEmpty(hospitalId)) { |
884 | - List<AntenatalExaminationModel> examinationModel = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)), AntenatalExaminationModel.class); | |
885 | - if (CollectionUtils.isNotEmpty(examinationModel)) { | |
886 | - for (AntenatalExaminationModel model : examinationModel) { | |
887 | - if (StringUtils.isNotEmpty(DateUtil.getyyyy_MM_dd(model.getCheckDate())) && | |
888 | - DateUtil.getyyyy_MM_dd(new Date()).equals(DateUtil.getyyyy_MM_dd(model.getCheckDate()))) { | |
889 | - falg = false; | |
888 | + //查询当前医院是否有配置此权限 | |
889 | + ModularFunctionConfigModel functionConfigModel = mongoTemplate.findOne(Query.query(Criteria.where("hospitalId").is(hospitalId)), ModularFunctionConfigModel.class); | |
890 | + if (null != functionConfigModel) { | |
891 | + List<Map<String, Object>> mapList = functionConfigModel.getConfigs(); | |
892 | + if (CollectionUtils.isNotEmpty(mapList)) { | |
893 | + for (Map<String, Object> map : mapList) { | |
894 | + if (map.get("type").toString().equals("88")) { | |
895 | + value = map.get("value").toString(); | |
896 | + } | |
890 | 897 | } |
891 | 898 | } |
892 | 899 | } |
893 | - if (falg) { | |
894 | - //创建一条复诊记录 | |
895 | - Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId).and("type").is(1)), Patients.class); | |
896 | - if (null != patients) { | |
897 | - AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(patients.getId())), AntExChuModel.class); | |
898 | - if (null != antExChuModel) { | |
899 | - AntExAddRequest antExAddRequest = new AntExAddRequest(); | |
900 | - antExAddRequest.setCheckDate(DateUtil.getyyyy_MM_dd(new Date())); | |
901 | - antExAddRequest.setCheckDoctor("1000000185"); | |
902 | - antExAddRequest.setDiagnosisOther(DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));// diagnosisOther: "29+4周妊娠 " | |
903 | - antExAddRequest.setCurrentDueDate(DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));//currentDueDate: "孕29周+4天" | |
904 | - antExAddRequest.setGuide("个人卫生 受激素影响怀孕后肤质与孕前不一样,保养皮肤请做好日常清洁并避免使用刺激性的护肤品与保养品。" + | |
905 | - "心理调节 心理状态不佳更需家人陪伴与支持,可与丈夫一起上孕妇学校课程、或与丈夫携手散步、又或让丈夫给您进行甜蜜按摩。" + | |
906 | - "营养 虽然孕期体重增加过多会增加你的高血压和怀上巨大儿的可能性。但是也不要进入饮食的误区,靠节食来减缓体重增长的速度。" + | |
907 | - "正确的方法是,请医生给你一些均衡饮食的建议,使你能够达到孕期的标准体重。" + | |
908 | - "运动 骨盆底肌肉练习:从现在起,你可以开始做骨盆底肌肉练习了,这个运动可以帮助你分娩的更快、更容易。" + | |
909 | - "骨盆底肌肉练习的步骤是:收缩肛门、阴道,再放松。重复这个动作30次。" + | |
910 | - "其他 当宝贝活动较多的时候,可跟老公一起给宝贝读些优美的诗歌,享受一家人的幸福时光。"); | |
911 | - antExAddRequest.setParentId(patients.getId()); | |
912 | - antExAddRequest.setPid(pid); | |
913 | - antExAddRequest.setRiskFactor(patients.getRiskFactorId()); | |
914 | - antExAddRequest.setGongGao(fuh); | |
915 | - antExAddRequest.setAbdominalCircumference(abdominalGirth); | |
916 | - List<String> list = JsonUtil.jkstr2Obj(fhr, List.class); | |
917 | - if (CollectionUtils.isNotEmpty(list)) { | |
918 | - List<MatDeliverAddRequest.Placenta> placentaList = new ArrayList<>(); | |
919 | - for (String l : list) { | |
920 | - MatDeliverAddRequest.Placenta placenta = new MatDeliverAddRequest.Placenta(); | |
921 | - placenta.setHeartRate(Double.parseDouble(l)); | |
922 | - placentaList.add(placenta); | |
900 | + if (value != null && "2".equals(value)) { | |
901 | + List<AntenatalExaminationModel> examinationModel = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)), AntenatalExaminationModel.class); | |
902 | + if (CollectionUtils.isNotEmpty(examinationModel)) { | |
903 | + for (AntenatalExaminationModel model : examinationModel) { | |
904 | + if (StringUtils.isNotEmpty(DateUtil.getyyyy_MM_dd(model.getCheckDate())) && | |
905 | + DateUtil.getyyyy_MM_dd(new Date()).equals(DateUtil.getyyyy_MM_dd(model.getCheckDate()))) { | |
906 | + falg = false; | |
907 | + } | |
908 | + } | |
909 | + } | |
910 | + if (falg) { | |
911 | + //创建一条复诊记录 | |
912 | + Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId).and("type").is(1)), Patients.class); | |
913 | + if (null != patients) { | |
914 | + AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(patients.getId())), AntExChuModel.class); | |
915 | + if (null != antExChuModel) { | |
916 | + AntExAddRequest antExAddRequest = new AntExAddRequest(); | |
917 | + antExAddRequest.setCheckDate(DateUtil.getyyyy_MM_dd(new Date())); | |
918 | + antExAddRequest.setCheckDoctor("1000000185"); | |
919 | + antExAddRequest.setDiagnosisOther(DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));// diagnosisOther: "29+4周妊娠 " | |
920 | + antExAddRequest.setCurrentDueDate(DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));//currentDueDate: "孕29周+4天" | |
921 | + antExAddRequest.setGuide("个人卫生 受激素影响怀孕后肤质与孕前不一样,保养皮肤请做好日常清洁并避免使用刺激性的护肤品与保养品。" + | |
922 | + "心理调节 心理状态不佳更需家人陪伴与支持,可与丈夫一起上孕妇学校课程、或与丈夫携手散步、又或让丈夫给您进行甜蜜按摩。" + | |
923 | + "营养 虽然孕期体重增加过多会增加你的高血压和怀上巨大儿的可能性。但是也不要进入饮食的误区,靠节食来减缓体重增长的速度。" + | |
924 | + "正确的方法是,请医生给你一些均衡饮食的建议,使你能够达到孕期的标准体重。" + | |
925 | + "运动 骨盆底肌肉练习:从现在起,你可以开始做骨盆底肌肉练习了,这个运动可以帮助你分娩的更快、更容易。" + | |
926 | + "骨盆底肌肉练习的步骤是:收缩肛门、阴道,再放松。重复这个动作30次。" + | |
927 | + "其他 当宝贝活动较多的时候,可跟老公一起给宝贝读些优美的诗歌,享受一家人的幸福时光。"); | |
928 | + antExAddRequest.setParentId(patients.getId()); | |
929 | + antExAddRequest.setPid(pid); | |
930 | + antExAddRequest.setRiskFactor(patients.getRiskFactorId()); | |
931 | + antExAddRequest.setGongGao(fuh); | |
932 | + antExAddRequest.setAbdominalCircumference(abdominalGirth); | |
933 | + List<String> list = JsonUtil.jkstr2Obj(fhr, List.class); | |
934 | + if (CollectionUtils.isNotEmpty(list)) { | |
935 | + List<MatDeliverAddRequest.Placenta> placentaList = new ArrayList<>(); | |
936 | + for (String l : list) { | |
937 | + MatDeliverAddRequest.Placenta placenta = new MatDeliverAddRequest.Placenta(); | |
938 | + placenta.setHeartRate(Double.parseDouble(l)); | |
939 | + placentaList.add(placenta); | |
940 | + } | |
941 | + antExAddRequest.setTireData(placentaList); | |
942 | + antExAddRequest.setTireNumber(list.size() + ""); | |
923 | 943 | } |
924 | - antExAddRequest.setTireData(placentaList); | |
925 | - antExAddRequest.setTireNumber(list.size() + ""); | |
944 | + antenatalExaminationFacade.addOneAntEx(antExAddRequest, 1000000185); | |
926 | 945 | } |
927 | - antenatalExaminationFacade.addOneAntEx(antExAddRequest, 1000000185); | |
928 | 946 | } |
929 | 947 | } |
930 | 948 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java
View file @
32ba6d1
... | ... | @@ -113,7 +113,7 @@ |
113 | 113 | patient.setFmDate(DateUtil.parseYMD(request.getStopDate())); |
114 | 114 | yunBookbuildingService.updatePregnant(patient, patient.getId()); |
115 | 115 | //终止妊娠生成追访信息 |
116 | - addTrackDownInfo(patient.getOperator(),patient); | |
116 | + addTrackDownInfo(patient.getOperator(), patient); | |
117 | 117 | } |
118 | 118 | } |
119 | 119 | } |
... | ... | @@ -181,7 +181,7 @@ |
181 | 181 | for (Patients patient : patients) { |
182 | 182 | if (patient != null) { |
183 | 183 | String hid = patient.getHospitalId(); |
184 | - if (StringUtils.isNotEmpty(groupId) &&CollectionUtils.isNotEmpty(hos)&& hos.contains(hospital)) { | |
184 | + if (StringUtils.isNotEmpty(groupId) && CollectionUtils.isNotEmpty(hos) && hos.contains(hospital)) { | |
185 | 185 | pat = patient; |
186 | 186 | } else if (StringUtils.isNotEmpty(hid) && hid.equals(request.getHospitalId())) { |
187 | 187 | pat = patient; |
... | ... | @@ -191,8 +191,7 @@ |
191 | 191 | //终止妊娠状态 |
192 | 192 | patient.setDueStatus(1); |
193 | 193 | |
194 | - if (patient.getServiceType() != null) | |
195 | - { | |
194 | + if (patient.getServiceType() != null) { | |
196 | 195 | //更新状态为过期 |
197 | 196 | //判断其为增值服务还是 标准服务 |
198 | 197 | if (patient.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId()) { |
... | ... | @@ -208,7 +207,7 @@ |
208 | 207 | //分娩状态 0未终止妊娠 1终止妊娠 |
209 | 208 | yunBookbuildingService.updatePregnant(patient, patient.getId()); |
210 | 209 | //终止妊娠生成追访信息 |
211 | - addTrackDownInfo(userId,patient); | |
210 | + addTrackDownInfo(userId, patient); | |
212 | 211 | } |
213 | 212 | } |
214 | 213 | |
... | ... | @@ -250,6 +249,7 @@ |
250 | 249 | |
251 | 250 | /** |
252 | 251 | * 初诊、复诊添加或更新追访信息 |
252 | + * | |
253 | 253 | * @param userId |
254 | 254 | * @param patient |
255 | 255 | */ |
256 | 256 | |
257 | 257 | |
... | ... | @@ -268,15 +268,15 @@ |
268 | 268 | //当前孕妇是孕28周后,进入产后复查追访,否则结束流程 |
269 | 269 | int dueWeek = DateUtil.getWeek2(patient.getLastMenses(), patient.getBookbuildingDate()); |
270 | 270 | |
271 | - if(dueWeek>=28){//进入产后复查 | |
271 | + if (dueWeek >= 28) {//进入产后复查 | |
272 | 272 | trackDownRecord.setTrackType(TrackDownDateEnums.F.getId()); |
273 | 273 | //--终止妊娠后不显示追访 |
274 | 274 | trackDownRecord.setStatus(1); |
275 | - }else{//结束流程 | |
275 | + } else {//结束流程 | |
276 | 276 | //--终止妊娠后不显示追访 |
277 | 277 | trackDownRecord.setStatus(0); |
278 | 278 | } |
279 | - trackDownService.addOrupdateTrackDownRecord(userId,trackDownRecord); | |
279 | + trackDownService.addOrupdateTrackDownRecord(userId, trackDownRecord); | |
280 | 280 | } |
281 | 281 | |
282 | 282 | private StopPregModel getStopPregModel(StopPregRequest request) { |
... | ... | @@ -470,7 +470,7 @@ |
470 | 470 | usersQuery.setYn(YnEnums.YES.getId()); |
471 | 471 | usersQuery.setOrgId(dbuser.getOrgId()); |
472 | 472 | usersQuery.setEnable(1); |
473 | - List<Integer> lis =new ArrayList<>(); | |
473 | + List<Integer> lis = new ArrayList<>(); | |
474 | 474 | lis.add(1); |
475 | 475 | lis.add(2); |
476 | 476 | lis.add(3); |
... | ... | @@ -496,5 +496,35 @@ |
496 | 496 | objectResponse.setErrormsg("成功"); |
497 | 497 | return objectResponse; |
498 | 498 | } |
499 | + | |
500 | + | |
501 | + /*** | |
502 | + * 小程序根据机构返回机构下所有医生列表 | |
503 | + * */ | |
504 | + | |
505 | + public BaseResponse queryInPerson3(Integer orgId) { | |
506 | + List<Map> list = new ArrayList<>(); | |
507 | + if (null != orgId) { | |
508 | + UsersQuery usersQuery = new UsersQuery(); | |
509 | + usersQuery.setYn(YnEnums.YES.getId()); | |
510 | + usersQuery.setOrgId(orgId); | |
511 | + usersQuery.setEnable(1); | |
512 | + List<Users> users = usersService.queryUsers(usersQuery); | |
513 | + if (CollectionUtils.isNotEmpty(users)) { | |
514 | + for (Users user : users) { | |
515 | + Map pmap = new HashMap(); | |
516 | + pmap.put("id", user.getId()); | |
517 | + pmap.put("name", user.getName()); | |
518 | + list.add(pmap); | |
519 | + } | |
520 | + } | |
521 | + } | |
522 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
523 | + objectResponse.setData(list); | |
524 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
525 | + objectResponse.setErrormsg("成功"); | |
526 | + return objectResponse; | |
527 | + } | |
528 | + | |
499 | 529 | } |