Commit e8592bded61b61a8eb058c6a1b2c02dc9be97060
1 parent
043add5c75
Exists in
master
and in
6 other branches
听力诊断配置文件
Showing 3 changed files with 37 additions and 1 deletions
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarHearingDiagnose.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HighriskChangeHospitalController.java
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarHearingDiagnose.xml
View file @
e8592bd
... | ... | @@ -458,6 +458,13 @@ |
458 | 458 | <if test="hospitalId != null and hospitalId != ''"> |
459 | 459 | and hospital_id = #{hospitalId,jdbcType=VARCHAR} |
460 | 460 | </if> |
461 | + <if test="checkHospitalIds != null and checkHospitalIds != ''"> | |
462 | + and hospital_id in | |
463 | + <foreach item="item" index="index" collection="checkHospitalIds" open="(" separator="," close=")"> | |
464 | + #{item} | |
465 | + </foreach> | |
466 | + </if> | |
467 | + | |
461 | 468 | <if test="diagnoseTime != null"> |
462 | 469 | and diagnose_time = #{diagnoseTime,jdbcType=TIMESTAMP} |
463 | 470 | </if> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
e8592bd
... | ... | @@ -74,14 +74,37 @@ |
74 | 74 | */ |
75 | 75 | @RequestMapping(method = RequestMethod.GET, value = "/getHearingDiagnose") |
76 | 76 | @ResponseBody |
77 | - public BaseResponse getHearingDiagnose(String babyId) { | |
77 | + public BaseResponse getHearingDiagnose(String babyId, HttpServletRequest request) { | |
78 | + //获取当前登录用户ID | |
79 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
80 | + if (loginState == null) { | |
81 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
82 | + } | |
83 | + //当前登录人医院Id | |
84 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
85 | + | |
78 | 86 | BabyPatientExtendEarHearingDiagnoseQuery query = new BabyPatientExtendEarHearingDiagnoseQuery(); |
79 | 87 | query.setBabyId(babyId); |
88 | + //查询听力转诊申请 // e、外院:有申请记录则允许进行新增听力筛查 | |
89 | + HighriskChangeHospitalQuery hcQuery = new HighriskChangeHospitalQuery(); | |
90 | + hcQuery.setIntoOrgid(hospitalId); | |
91 | + hcQuery.setTargetId(babyId); | |
92 | + List<String> hospitalIds = new ArrayList<>(); | |
93 | + hospitalIds.add(hospitalId); | |
94 | + List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hcQuery); | |
95 | + if(hchList.size()>0){ | |
96 | + for(HighriskChangeHospital h:hchList){ | |
97 | + hospitalIds.add(h.getOutOrgid()); | |
98 | + } | |
99 | + } | |
100 | + query.setCheckHospitalIds(hospitalIds); | |
101 | + | |
80 | 102 | List<BabyPatientExtendEarHearingDiagnose> behdList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(query); |
81 | 103 | List<Map<String, String>> list = new ArrayList<>(); |
82 | 104 | for (BabyPatientExtendEarHearingDiagnose hd : behdList) { |
83 | 105 | Map<String, String> fuMap = new HashMap<>(); |
84 | 106 | fuMap.put("id", hd.getId()); |
107 | + fuMap.put("hospitalId", hd.getHospitalId()); | |
85 | 108 | fuMap.put("hdTime", DateUtil.getyyyy_MM_dd(hd.getDiagnoseTime())); |
86 | 109 | list.add(fuMap); |
87 | 110 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HighriskChangeHospitalController.java
View file @
e8592bd
... | ... | @@ -33,6 +33,9 @@ |
33 | 33 | @Autowired |
34 | 34 | private AutoMatchFacade autoMatchFacade; |
35 | 35 | |
36 | + //转诊记录 | |
37 | + @Autowired | |
38 | + private HighriskChangeHospitalService highchangeService; | |
36 | 39 | |
37 | 40 | |
38 | 41 | |
... | ... | @@ -85,6 +88,9 @@ |
85 | 88 | if (loginState == null) { |
86 | 89 | return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); |
87 | 90 | } |
91 | + //医院id | |
92 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
93 | + | |
88 | 94 | //医院id |
89 | 95 | List<HighriskChangeHospital> HighriskChangeHospitalList = highriskChangeHospitalService.queryHighriskChangeHospital(query); |
90 | 96 | return FrontEndResult.ini().setData(HighriskChangeHospitalList).setPageInfo(query.getPageInfo()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); |