Commit b01039e03613a0236fb77b5e97f82e2f3462cdfe
1 parent
855e245e19
Exists in
master
and in
6 other branches
听力诊断模块
Showing 3 changed files with 423 additions and 337 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
View file @
b01039e
| 1 | 1 | package com.lyms.platform.operate.web.controller; |
| 2 | 2 | |
| 3 | +import com.alibaba.fastjson.JSONObject; | |
| 3 | 4 | import com.lyms.platform.common.annotation.TokenRequired; |
| 4 | 5 | import com.lyms.platform.common.base.BaseController; |
| 5 | 6 | import com.lyms.platform.common.base.LoginContext; |
| ... | ... | @@ -23,6 +24,7 @@ |
| 23 | 24 | import org.springframework.web.bind.annotation.ResponseBody; |
| 24 | 25 | |
| 25 | 26 | import javax.servlet.http.HttpServletRequest; |
| 27 | +import java.util.ArrayList; | |
| 26 | 28 | import java.util.HashMap; |
| 27 | 29 | import java.util.List; |
| 28 | 30 | import java.util.Map; |
| ... | ... | @@ -68,7 +70,7 @@ |
| 68 | 70 | @ResponseBody |
| 69 | 71 | @TokenRequired |
| 70 | 72 | public BaseResponse checkBabyFollowUp(String babyId) { |
| 71 | - | |
| 73 | + InitFollowUp initHearingDiagnose = new InitFollowUp(); | |
| 72 | 74 | if (StringUtils.isEmpty(babyId)) {//传入儿童档案id |
| 73 | 75 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id"); |
| 74 | 76 | } |
| 75 | 77 | |
| 76 | 78 | |
| 77 | 79 | |
| 78 | 80 | |
| 79 | 81 | |
| 80 | 82 | |
| 81 | 83 | |
| 82 | 84 | |
| 83 | 85 | |
| 84 | 86 | |
| 85 | 87 | |
| 86 | 88 | |
| 87 | 89 | |
| 88 | 90 | |
| 89 | 91 | |
| 90 | 92 | |
| 91 | 93 | |
| 92 | 94 | |
| 93 | 95 | |
| 94 | 96 | |
| 95 | 97 | |
| 96 | 98 | |
| 97 | 99 | |
| 98 | 100 | |
| 99 | 101 | |
| 100 | 102 | |
| 101 | 103 | |
| 102 | 104 | |
| 103 | 105 | |
| 104 | 106 | |
| 105 | 107 | |
| 106 | 108 | |
| 107 | 109 | |
| 108 | 110 | |
| 109 | 111 | |
| 110 | 112 | |
| 111 | 113 | |
| 112 | 114 | |
| 113 | 115 | |
| 114 | 116 | |
| 115 | 117 | |
| 116 | 118 | |
| 117 | 119 | |
| 118 | 120 | |
| ... | ... | @@ -108,382 +110,397 @@ |
| 108 | 110 | for (BabyPatientExtendEarHearingDiagnose hd : hdList) { |
| 109 | 111 | //有一条记录是已经确诊,可以进行随访 |
| 110 | 112 | if (hd.getIsconfirm() == 1) { |
| 111 | - isConfirm = true; | |
| 113 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(hd.getConfirmResult()))//确诊结果转换 ConfirmedEnums | |
| 114 | + { | |
| 115 | + String[] highFactors = hd.getConfirmResult().split(","); | |
| 116 | + List confiArr = new ArrayList(); | |
| 117 | + for (String hf : highFactors) { | |
| 118 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(hf)) { | |
| 119 | + String name = ConfirmedEnums.getTitle(Integer.parseInt(hf)); | |
| 120 | + JSONObject confiJo = new JSONObject(); | |
| 121 | + confiJo.put("id", hf); | |
| 122 | + confiJo.put("name", name); | |
| 123 | + confiArr.add(confiJo); | |
| 124 | + } | |
| 125 | + } | |
| 126 | + initHearingDiagnose.setConfirmResult(confiArr); | |
| 127 | + initHearingDiagnose.setConfirmData(DateUtil.getyyyy_MM_dd(hd.getConfirmTime())); | |
| 128 | + isConfirm = true; | |
| 129 | + } | |
| 112 | 130 | } |
| 113 | 131 | } |
| 114 | - if (!isConfirm) {// //若没有听诊记录或所有听诊记录都未确诊。提示:该儿童还未听力确诊,不能进行随访。 | |
| 115 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("当前儿童听诊记录还未有确诊记录不能进行随访"); | |
| 132 | + if (!isConfirm) {// //若没有听诊记录或所有听诊记录都未确诊。提示:该儿童还未听力确诊,不能进行随访。 | |
| 133 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("当前儿童听诊记录还未有确诊记录不能进行随访"); | |
| 134 | + } | |
| 135 | + //根据条件查询基础配置信息表 | |
| 136 | + return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 116 | 137 | } |
| 117 | - //根据条件查询基础配置信息表 | |
| 118 | - InitFollowUp initHearingDiagnose = new InitFollowUp(); | |
| 119 | - return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 120 | - } | |
| 121 | 138 | |
| 122 | - /** | |
| 123 | - * 进入新增听筛初始化数据 | |
| 124 | - * | |
| 125 | - * @return | |
| 126 | - */ | |
| 127 | - @RequestMapping(method = RequestMethod.GET, value = "/initScreen") | |
| 128 | - @ResponseBody | |
| 129 | - @TokenRequired | |
| 130 | - public BaseResponse initScreen() { | |
| 131 | - //根据条件查询基础配置信息表 | |
| 132 | - InitScreen initScreen = new InitScreen(); | |
| 133 | - initScreen.setHighRiskConfirms(EnumUtil.toJson(HighRiskEnum.class)); | |
| 134 | - initScreen.setDeafEnumsResult(DeafEnums.getDeafEnums()); | |
| 135 | - return initScreen.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 136 | - } | |
| 137 | - | |
| 138 | - /** | |
| 139 | - * 检测儿童是否能够听筛 | |
| 140 | - * | |
| 141 | - * @param babyId 儿童档案id | |
| 142 | - * @return | |
| 143 | - */ | |
| 144 | - @RequestMapping(method = RequestMethod.GET, value = "/checkBabySrccen") | |
| 145 | - @ResponseBody | |
| 146 | - @TokenRequired | |
| 147 | - public BaseResponse checkBabySrccen(String babyId, HttpServletRequest request) { | |
| 148 | - | |
| 149 | - LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 150 | - if (loginState == null) { | |
| 151 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 139 | + /** | |
| 140 | + * 进入新增听筛初始化数据 | |
| 141 | + * | |
| 142 | + * @return | |
| 143 | + */ | |
| 144 | + @RequestMapping(method = RequestMethod.GET, value = "/initScreen") | |
| 145 | + @ResponseBody | |
| 146 | + @TokenRequired | |
| 147 | + public BaseResponse initScreen () { | |
| 148 | + //根据条件查询基础配置信息表 | |
| 149 | + InitScreen initScreen = new InitScreen(); | |
| 150 | + initScreen.setHighRiskConfirms(EnumUtil.toJson(HighRiskEnum.class)); | |
| 151 | + initScreen.setDeafEnumsResult(DeafEnums.getDeafEnums()); | |
| 152 | + return initScreen.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 152 | 153 | } |
| 153 | 154 | |
| 155 | + /** | |
| 156 | + * 检测儿童是否能够听筛 | |
| 157 | + * | |
| 158 | + * @param babyId 儿童档案id | |
| 159 | + * @return | |
| 160 | + */ | |
| 161 | + @RequestMapping(method = RequestMethod.GET, value = "/checkBabySrccen") | |
| 162 | + @ResponseBody | |
| 163 | + @TokenRequired | |
| 164 | + public BaseResponse checkBabySrccen (String babyId, HttpServletRequest request){ | |
| 154 | 165 | |
| 155 | - if (StringUtils.isEmpty(babyId)) {//传入儿童档案id | |
| 156 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id"); | |
| 157 | - } | |
| 166 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 167 | + if (loginState == null) { | |
| 168 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 169 | + } | |
| 158 | 170 | |
| 159 | 171 | |
| 160 | - //查询儿童听力基础信息 | |
| 161 | - //根据babyId查询是否存 | |
| 162 | - BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery(); | |
| 163 | - earQuery.setBabyPatientId(babyId); | |
| 164 | - //当前登录人医院Id | |
| 165 | - String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 166 | - //获取院内医院集合 | |
| 167 | - List hospiIds = babyEarFacade.getOrgHospitalIds(hospitalId); | |
| 168 | - earQuery.setCreateHospitalIds((String[]) hospiIds.toArray(new String[hospiIds.size()])); | |
| 172 | + if (StringUtils.isEmpty(babyId)) {//传入儿童档案id | |
| 173 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id"); | |
| 174 | + } | |
| 169 | 175 | |
| 170 | - List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery); | |
| 171 | - //是否听力建档 | |
| 172 | - if (CollectionUtils.isEmpty(babyPatientExtendEars)) { | |
| 173 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("当前儿童还未完善听力建档"); | |
| 174 | - } | |
| 175 | 176 | |
| 176 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 177 | - } | |
| 177 | + //查询儿童听力基础信息 | |
| 178 | + //根据babyId查询是否存 | |
| 179 | + BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery(); | |
| 180 | + earQuery.setBabyPatientId(babyId); | |
| 181 | + //当前登录人医院Id | |
| 182 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 183 | + //获取院内医院集合 | |
| 184 | + List hospiIds = babyEarFacade.getOrgHospitalIds(hospitalId); | |
| 185 | + earQuery.setCreateHospitalIds((String[]) hospiIds.toArray(new String[hospiIds.size()])); | |
| 178 | 186 | |
| 179 | - /** | |
| 180 | - * 进入新增随访记录页面前,验证及初始化数据 | |
| 181 | - * | |
| 182 | - * @return | |
| 183 | - */ | |
| 184 | - @RequestMapping(method = RequestMethod.GET, value = "/initFollowUp") | |
| 185 | - @ResponseBody | |
| 186 | - @TokenRequired | |
| 187 | - public BaseResponse initFollowUp() { | |
| 188 | - //根据条件查询基础配置信息表 | |
| 189 | - InitFollowUp initHearingDiagnose = new InitFollowUp(); | |
| 190 | - initHearingDiagnose.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
| 191 | - return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 192 | - } | |
| 187 | + List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery); | |
| 188 | + //是否听力建档 | |
| 189 | + if (CollectionUtils.isEmpty(babyPatientExtendEars)) { | |
| 190 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("当前儿童还未完善听力建档"); | |
| 191 | + } | |
| 193 | 192 | |
| 194 | - /** | |
| 195 | - * 听力诊断列表管理初始化数据 | |
| 196 | - * | |
| 197 | - * @return | |
| 198 | - */ | |
| 199 | - @RequestMapping(method = RequestMethod.GET, value = "/initHearingDiagnoseListData") | |
| 200 | - @ResponseBody | |
| 201 | - @TokenRequired | |
| 202 | - public BaseResponse initHearingDiagnoseListData() { | |
| 203 | - InitHearingDiagnoseListData baseResponse = new InitHearingDiagnoseListData(); | |
| 204 | - //状态 | |
| 205 | - baseResponse.setStatus(EnumUtil.toJson(HdEnums.StatusEnums.class)); | |
| 206 | - baseResponse.setSource(EnumUtil.toJson(HdEnums.SourceEnums.class)); | |
| 207 | - baseResponse.setIsConfirm(EnumUtil.toJson(HdEnums.IsConfirmEnums.class)); | |
| 208 | - baseResponse.setConfirmResult(EnumUtil.toJson(HdEnums.ConfirmResultEnums.class)); | |
| 209 | - baseResponse.setConfirmLevel(EnumUtil.toJson(HdEnums.ConfirmLevelEnums.class)); | |
| 210 | - return baseResponse; | |
| 211 | - } | |
| 193 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 194 | + } | |
| 212 | 195 | |
| 213 | - /** | |
| 214 | - * 进入新增听力诊断页面前,验证及初始化数据 | |
| 215 | - * | |
| 216 | - * @return | |
| 217 | - */ | |
| 218 | - @RequestMapping(method = RequestMethod.GET, value = "/initHearingDiagnose") | |
| 219 | - @ResponseBody | |
| 220 | - public BaseResponse initHearingDiagnose(String babyId) { | |
| 221 | - //根据条件查询基础配置信息表 | |
| 222 | - InitHearingDiagnose initHearingDiagnose = new InitHearingDiagnose(); | |
| 223 | - initHearingDiagnose.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
| 224 | - initHearingDiagnose.setHearingDiagnosis(EnumUtil.toJson(HearingDiagnosisEnums.class)); | |
| 225 | - initHearingDiagnose.setHighRiskConfirms(EnumUtil.toJson(HighRiskEnum.class)); | |
| 226 | - initHearingDiagnose.setHandlingSuggestion(HdEnums.getHandlingSuggestionEnums()); | |
| 227 | - | |
| 228 | - //查询最后一次听诊时间 | |
| 229 | - //查询听诊记录 | |
| 230 | - BabyPatientExtendEarHearingDiagnoseQuery hdQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 231 | - hdQuery.setBabyId(babyId); | |
| 232 | - hdQuery.setSort("diagnose_time"); | |
| 233 | - List<BabyPatientExtendEarHearingDiagnose> hdList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(hdQuery); | |
| 234 | - if (CollectionUtils.isNotEmpty(hdList)) { | |
| 235 | - BabyPatientExtendEarHearingDiagnose ehd = hdList.get(hdList.size() - 1); | |
| 236 | - initHearingDiagnose.setDiagnoseTime(DateUtil.getyyyy_MM_dd(ehd.getDiagnoseTime())); | |
| 196 | + /** | |
| 197 | + * 进入新增随访记录页面前,验证及初始化数据 | |
| 198 | + * | |
| 199 | + * @return | |
| 200 | + */ | |
| 201 | + @RequestMapping(method = RequestMethod.GET, value = "/initFollowUp") | |
| 202 | + @ResponseBody | |
| 203 | + @TokenRequired | |
| 204 | + public BaseResponse initFollowUp () { | |
| 205 | + //根据条件查询基础配置信息表 | |
| 206 | + InitFollowUp initHearingDiagnose = new InitFollowUp(); | |
| 207 | + initHearingDiagnose.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
| 208 | + return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 237 | 209 | } |
| 238 | - return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 239 | - } | |
| 240 | 210 | |
| 241 | - /** | |
| 242 | - * 进入新增听力诊断页面前,验证及初始化数据 | |
| 243 | - * | |
| 244 | - * @return | |
| 245 | - */ | |
| 246 | - @RequestMapping(method = RequestMethod.GET, value = "/checkHearingDiagnose") | |
| 247 | - @ResponseBody | |
| 248 | - @TokenRequired | |
| 249 | - public BaseResponse checkHearingDiagnose(String babyId, HttpServletRequest request) { | |
| 250 | - //开发--跳过验证 | |
| 251 | - // if(StringUtils.isNotEmpty(babyId)){ | |
| 252 | - // //根据条件查询基础配置信息表 | |
| 253 | - // InitFollowUp aa = new InitFollowUp(); | |
| 254 | - // return aa.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 255 | - // } | |
| 256 | - //获取当前登录用户ID | |
| 257 | - LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 258 | - if (loginState == null) { | |
| 259 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 211 | + /** | |
| 212 | + * 听力诊断列表管理初始化数据 | |
| 213 | + * | |
| 214 | + * @return | |
| 215 | + */ | |
| 216 | + @RequestMapping(method = RequestMethod.GET, value = "/initHearingDiagnoseListData") | |
| 217 | + @ResponseBody | |
| 218 | + @TokenRequired | |
| 219 | + public BaseResponse initHearingDiagnoseListData () { | |
| 220 | + InitHearingDiagnoseListData baseResponse = new InitHearingDiagnoseListData(); | |
| 221 | + //状态 | |
| 222 | + baseResponse.setStatus(EnumUtil.toJson(HdEnums.StatusEnums.class)); | |
| 223 | + baseResponse.setSource(EnumUtil.toJson(HdEnums.SourceEnums.class)); | |
| 224 | + baseResponse.setIsConfirm(EnumUtil.toJson(HdEnums.IsConfirmEnums.class)); | |
| 225 | + baseResponse.setConfirmResult(EnumUtil.toJson(HdEnums.ConfirmResultEnums.class)); | |
| 226 | + baseResponse.setConfirmLevel(EnumUtil.toJson(HdEnums.ConfirmLevelEnums.class)); | |
| 227 | + return baseResponse; | |
| 260 | 228 | } |
| 261 | - //当前登录人医院Id | |
| 262 | - String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 263 | 229 | |
| 264 | - if (StringUtils.isEmpty(babyId)) {//传入儿童档案id | |
| 265 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id"); | |
| 230 | + /** | |
| 231 | + * 进入新增听力诊断页面前,验证及初始化数据 | |
| 232 | + * | |
| 233 | + * @return | |
| 234 | + */ | |
| 235 | + @RequestMapping(method = RequestMethod.GET, value = "/initHearingDiagnose") | |
| 236 | + @ResponseBody | |
| 237 | + public BaseResponse initHearingDiagnose (String babyId){ | |
| 238 | + //根据条件查询基础配置信息表 | |
| 239 | + InitHearingDiagnose initHearingDiagnose = new InitHearingDiagnose(); | |
| 240 | + initHearingDiagnose.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
| 241 | + initHearingDiagnose.setHearingDiagnosis(EnumUtil.toJson(HearingDiagnosisEnums.class)); | |
| 242 | + initHearingDiagnose.setHighRiskConfirms(EnumUtil.toJson(HighRiskEnum.class)); | |
| 243 | + initHearingDiagnose.setHandlingSuggestion(HdEnums.getHandlingSuggestionEnums()); | |
| 244 | + | |
| 245 | + //查询最后一次听诊时间 | |
| 246 | + //查询听诊记录 | |
| 247 | + BabyPatientExtendEarHearingDiagnoseQuery hdQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 248 | + hdQuery.setBabyId(babyId); | |
| 249 | + hdQuery.setSort("diagnose_time"); | |
| 250 | + List<BabyPatientExtendEarHearingDiagnose> hdList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(hdQuery); | |
| 251 | + if (CollectionUtils.isNotEmpty(hdList)) { | |
| 252 | + BabyPatientExtendEarHearingDiagnose ehd = hdList.get(hdList.size() - 1); | |
| 253 | + initHearingDiagnose.setDiagnoseTime(DateUtil.getyyyy_MM_dd(ehd.getDiagnoseTime())); | |
| 254 | + } | |
| 255 | + return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 266 | 256 | } |
| 267 | 257 | |
| 268 | - BabyPatientExtendEarScreenQuery query = new BabyPatientExtendEarScreenQuery(); | |
| 269 | - query.setCheckHospitalId(hospitalId); | |
| 270 | - query.setBabyId(babyId); | |
| 271 | - // d、本院:初筛未通过或复筛确诊 | |
| 272 | - List<BabyPatientExtendEarScreen> screenList = screenService.queryBabyPatientExtendEarScreen(query); | |
| 273 | - if (screenList == null || screenList.size() == 0) {//没有听筛记录,查询转诊记录 | |
| 274 | - //查询听力转诊申请 // e、外院:有申请记录则允许进行新增听力筛查 | |
| 275 | - HighriskChangeHospitalQuery hcQuery = new HighriskChangeHospitalQuery(); | |
| 276 | - hcQuery.setIntoOrgid(hospitalId); | |
| 277 | - hcQuery.setTargetId(babyId); | |
| 278 | - List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hcQuery); | |
| 279 | - if (hchList == null || hchList.size() == 0) {//没有找到听力转诊申请 | |
| 280 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("听诊诊断失败,儿童未做听筛"); | |
| 258 | + /** | |
| 259 | + * 进入新增听力诊断页面前,验证及初始化数据 | |
| 260 | + * | |
| 261 | + * @return | |
| 262 | + */ | |
| 263 | + @RequestMapping(method = RequestMethod.GET, value = "/checkHearingDiagnose") | |
| 264 | + @ResponseBody | |
| 265 | + @TokenRequired | |
| 266 | + public BaseResponse checkHearingDiagnose (String babyId, HttpServletRequest request){ | |
| 267 | + //开发--跳过验证 | |
| 268 | + // if(StringUtils.isNotEmpty(babyId)){ | |
| 269 | + // //根据条件查询基础配置信息表 | |
| 270 | + // InitFollowUp aa = new InitFollowUp(); | |
| 271 | + // return aa.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 272 | + // } | |
| 273 | + //获取当前登录用户ID | |
| 274 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 275 | + if (loginState == null) { | |
| 276 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 281 | 277 | } |
| 282 | - } else { | |
| 283 | - boolean isResu = false; | |
| 284 | - for (BabyPatientExtendEarScreen scr : screenList) { | |
| 285 | - if (scr.getOaeRight() == null) { | |
| 286 | - scr.setOaeRight(1); | |
| 278 | + //当前登录人医院Id | |
| 279 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 280 | + | |
| 281 | + if (StringUtils.isEmpty(babyId)) {//传入儿童档案id | |
| 282 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id"); | |
| 283 | + } | |
| 284 | + | |
| 285 | + BabyPatientExtendEarScreenQuery query = new BabyPatientExtendEarScreenQuery(); | |
| 286 | + query.setCheckHospitalId(hospitalId); | |
| 287 | + query.setBabyId(babyId); | |
| 288 | + // d、本院:初筛未通过或复筛确诊 | |
| 289 | + List<BabyPatientExtendEarScreen> screenList = screenService.queryBabyPatientExtendEarScreen(query); | |
| 290 | + if (screenList == null || screenList.size() == 0) {//没有听筛记录,查询转诊记录 | |
| 291 | + //查询听力转诊申请 // e、外院:有申请记录则允许进行新增听力筛查 | |
| 292 | + HighriskChangeHospitalQuery hcQuery = new HighriskChangeHospitalQuery(); | |
| 293 | + hcQuery.setIntoOrgid(hospitalId); | |
| 294 | + hcQuery.setTargetId(babyId); | |
| 295 | + List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hcQuery); | |
| 296 | + if (hchList == null || hchList.size() == 0) {//没有找到听力转诊申请 | |
| 297 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("听诊诊断失败,儿童未做听筛"); | |
| 287 | 298 | } |
| 288 | - if (scr.getOaeLeft() == null) { | |
| 289 | - scr.setOaeLeft(1); | |
| 299 | + } else { | |
| 300 | + boolean isResu = false; | |
| 301 | + for (BabyPatientExtendEarScreen scr : screenList) { | |
| 302 | + if (scr.getOaeRight() == null) { | |
| 303 | + scr.setOaeRight(1); | |
| 304 | + } | |
| 305 | + if (scr.getOaeLeft() == null) { | |
| 306 | + scr.setOaeLeft(1); | |
| 307 | + } | |
| 308 | + if (scr.getAabrLeft() == null) { | |
| 309 | + scr.setAabrLeft(1); | |
| 310 | + } | |
| 311 | + if (scr.getAabrRight() == null) { | |
| 312 | + scr.setAabrRight(1); | |
| 313 | + } | |
| 314 | + //只要有听筛未通过的就可以进入听诊了 | |
| 315 | + if (scr.getOaeLeft() == -1 || scr.getOaeRight() == -1 || scr.getAabrLeft() == -1 || scr.getAabrRight() == -1) {//1=通过 -1=未通过 | |
| 316 | + isResu = true; | |
| 317 | + break; | |
| 318 | + } | |
| 290 | 319 | } |
| 291 | - if (scr.getAabrLeft() == null) { | |
| 292 | - scr.setAabrLeft(1); | |
| 320 | + if (!isResu) { | |
| 321 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("当前儿童听筛已通过,不能进行听力诊断"); | |
| 293 | 322 | } |
| 294 | - if (scr.getAabrRight() == null) { | |
| 295 | - scr.setAabrRight(1); | |
| 296 | - } | |
| 297 | - //只要有听筛未通过的就可以进入听诊了 | |
| 298 | - if (scr.getOaeLeft() == -1 || scr.getOaeRight() == -1 || scr.getAabrLeft() == -1 || scr.getAabrRight() == -1) {//1=通过 -1=未通过 | |
| 299 | - isResu = true; | |
| 300 | - break; | |
| 301 | - } | |
| 302 | 323 | } |
| 303 | - if (!isResu) { | |
| 304 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("当前儿童听筛已通过,不能进行听力诊断"); | |
| 305 | - } | |
| 306 | - } | |
| 307 | 324 | |
| 308 | - //根据条件查询基础配置信息表 | |
| 309 | - InitHearingDiagnose initHearingDiagnose = new InitHearingDiagnose(); | |
| 310 | - initHearingDiagnose.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
| 325 | + //根据条件查询基础配置信息表 | |
| 326 | + InitHearingDiagnose initHearingDiagnose = new InitHearingDiagnose(); | |
| 327 | + initHearingDiagnose.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
| 311 | 328 | |
| 312 | - initHearingDiagnose.setHearingDiagnosis(EnumUtil.toJson(HearingDiagnosisEnums.class)); | |
| 329 | + initHearingDiagnose.setHearingDiagnosis(EnumUtil.toJson(HearingDiagnosisEnums.class)); | |
| 313 | 330 | |
| 314 | - initHearingDiagnose.setHighRiskConfirms(EnumUtil.toJson(HighRiskEnum.class)); | |
| 331 | + initHearingDiagnose.setHighRiskConfirms(EnumUtil.toJson(HighRiskEnum.class)); | |
| 315 | 332 | |
| 316 | - return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 317 | - } | |
| 318 | - | |
| 319 | - /** | |
| 320 | - * 随访模块列表管理初始化数据 | |
| 321 | - * | |
| 322 | - * @return | |
| 323 | - */ | |
| 324 | - @RequestMapping(method = RequestMethod.GET, value = "/initHighrFollowUpData") | |
| 325 | - @ResponseBody | |
| 326 | - @TokenRequired | |
| 327 | - public BaseResponse initHighrFollowUpData() { | |
| 328 | - InitFollowUpListData initFollowUpListData = new InitFollowUpListData(); | |
| 329 | - //确诊结果 | |
| 330 | - initFollowUpListData.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
| 331 | - //是否结案 | |
| 332 | - initFollowUpListData.setIsClose(EnumUtil.toJson(IsCloseEnums.class)); | |
| 333 | - //来源 | |
| 334 | - initFollowUpListData.setSource(EnumUtil.toJson(SourceEnums.class)); | |
| 335 | - //干预治疗 | |
| 336 | - initFollowUpListData.setTreatment(EnumUtil.toJson(TreatmentEnums.class)); | |
| 337 | - return initFollowUpListData.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 338 | - } | |
| 339 | - | |
| 340 | - /** | |
| 341 | - * 进入新增听力转诊页面前,验证及初始化数据 | |
| 342 | - * | |
| 343 | - * @param babyId 儿童档案ID | |
| 344 | - * @return | |
| 345 | - */ | |
| 346 | - @RequestMapping(method = RequestMethod.GET, value = "/initHighrChangeHosp") | |
| 347 | - @ResponseBody | |
| 348 | - @TokenRequired | |
| 349 | - public BaseResponse initHighrChangeHosp(String babyId, HttpServletRequest request) { | |
| 350 | - //根据babyId和当前医院id | |
| 351 | - //获取当前登录用户ID | |
| 352 | - LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 353 | - if (loginState == null) { | |
| 354 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 333 | + return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 355 | 334 | } |
| 356 | - //医院id | |
| 357 | - String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 358 | 335 | |
| 359 | - //根据医院id和儿童档案id获取听力筛查记录,获取一次初筛记录和最后一次复筛记录,将初筛和复筛的检测结果显示到转诊申请页。 | |
| 360 | - BabyPatientExtendEarScreenQuery query = new BabyPatientExtendEarScreenQuery(); | |
| 361 | - query.setCheckHospitalId(hospitalId); | |
| 362 | - query.setBabyId(babyId); | |
| 363 | - query.setStatus(0); | |
| 364 | - query.setSort("create_date"); | |
| 365 | - // d、本院:初筛未通过或复筛确诊 | |
| 366 | - List<BabyPatientExtendEarScreen> screenList = screenService.queryBabyPatientExtendEarScreen(query); | |
| 367 | - if (screenList == null && screenList.size() == 0) { | |
| 368 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("该儿童还未听筛记录不能进行听力转诊"); | |
| 336 | + /** | |
| 337 | + * 随访模块列表管理初始化数据 | |
| 338 | + * | |
| 339 | + * @return | |
| 340 | + */ | |
| 341 | + @RequestMapping(method = RequestMethod.GET, value = "/initHighrFollowUpData") | |
| 342 | + @ResponseBody | |
| 343 | + @TokenRequired | |
| 344 | + public BaseResponse initHighrFollowUpData () { | |
| 345 | + InitFollowUpListData initFollowUpListData = new InitFollowUpListData(); | |
| 346 | + //确诊结果 | |
| 347 | + initFollowUpListData.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
| 348 | + //是否结案 | |
| 349 | + initFollowUpListData.setIsClose(EnumUtil.toJson(IsCloseEnums.class)); | |
| 350 | + //来源 | |
| 351 | + initFollowUpListData.setSource(EnumUtil.toJson(SourceEnums.class)); | |
| 352 | + //干预治疗 | |
| 353 | + initFollowUpListData.setTreatment(EnumUtil.toJson(TreatmentEnums.class)); | |
| 354 | + return initFollowUpListData.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 369 | 355 | } |
| 370 | - //根据医院ID和babyid查询听筛初筛第一条记录和复筛最后一条记录进行并集。前端显示 | |
| 371 | - Map<String, String> map = new HashMap<>(); | |
| 372 | - //取第一条初筛记录结果 | |
| 373 | - BabyPatientExtendEarScreen firstScreen = screenList.get(0); | |
| 374 | 356 | |
| 375 | - if (firstScreen.getOaeLeft() == null) { | |
| 376 | - firstScreen.setOaeLeft(1); | |
| 377 | - } | |
| 378 | - if (firstScreen.getOaeRight() == null) { | |
| 379 | - firstScreen.setOaeRight(1); | |
| 380 | - } | |
| 381 | - if (firstScreen.getAabrLeft() == null) { | |
| 382 | - firstScreen.setAabrLeft(1); | |
| 383 | - } | |
| 384 | - if (firstScreen.getAabrRight() == null) { | |
| 385 | - firstScreen.setAabrRight(1); | |
| 386 | - } | |
| 387 | - //初筛未通过 | |
| 388 | - StringBuffer firstResu = new StringBuffer(); | |
| 389 | - if (firstScreen.getOaeLeft() == -1 || firstScreen.getOaeRight() == -1 || firstScreen.getAabrLeft() == -1 || firstScreen.getAabrRight() == -1) {//oae未通过 | |
| 390 | - firstResu.append("未通过("); | |
| 391 | - } | |
| 392 | - if ((firstScreen.getOaeLeft() == -1 || firstScreen.getAabrLeft() == -1) && (firstScreen.getOaeRight() == -1 || firstScreen.getAabrRight() == -1)) {//oae未通过 | |
| 393 | - firstResu.append("双耳"); | |
| 394 | - } else if (firstScreen.getOaeLeft() == -1 || firstScreen.getAabrLeft() == -1) {//oae未通过 | |
| 395 | - firstResu.append("左耳"); | |
| 396 | - } else if (firstScreen.getOaeRight() == -1 || firstScreen.getAabrRight() == -1) {//aabr未通过 | |
| 397 | - firstResu.append("右耳"); | |
| 398 | - } | |
| 399 | - if (StringUtils.isNotEmpty(firstResu.toString())) { | |
| 400 | - firstResu.append(")"); | |
| 401 | - } | |
| 357 | + /** | |
| 358 | + * 进入新增听力转诊页面前,验证及初始化数据 | |
| 359 | + * | |
| 360 | + * @param babyId 儿童档案ID | |
| 361 | + * @return | |
| 362 | + */ | |
| 363 | + @RequestMapping(method = RequestMethod.GET, value = "/initHighrChangeHosp") | |
| 364 | + @ResponseBody | |
| 365 | + @TokenRequired | |
| 366 | + public BaseResponse initHighrChangeHosp (String babyId, HttpServletRequest request){ | |
| 367 | + //根据babyId和当前医院id | |
| 368 | + //获取当前登录用户ID | |
| 369 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 370 | + if (loginState == null) { | |
| 371 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 372 | + } | |
| 373 | + //医院id | |
| 374 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 402 | 375 | |
| 403 | - map.put("firstResu", firstResu.toString()); | |
| 404 | - if ((firstScreen.getOaeLeft() == -1 || firstScreen.getOaeRight() == -1) && (firstScreen.getAabrLeft() == -1 || firstScreen.getAabrRight() == -1)) { | |
| 405 | - map.put("firstMethod", "OAE/AABR"); | |
| 406 | - } else if (firstScreen.getOaeLeft() == -1 || firstScreen.getOaeRight() == -1) { | |
| 407 | - map.put("firstMethod", "OAE"); | |
| 408 | - } else if (firstScreen.getAabrLeft() == -1 || firstScreen.getAabrRight() == -1) { | |
| 409 | - map.put("firstMethod", "AABR"); | |
| 410 | - } | |
| 411 | - //初筛时间 | |
| 412 | - map.put("firstTime", DateUtil.getyyyy_MM_dd(firstScreen.getScreenDate())); | |
| 413 | - | |
| 414 | - if (screenList.size() > 1) { | |
| 415 | - //取复筛记录最后一条结果 | |
| 416 | - BabyPatientExtendEarScreen endScreen = screenList.get(screenList.size() - 1); | |
| 417 | - //初筛未通过 | |
| 418 | - StringBuffer endResu = new StringBuffer(); | |
| 419 | - if ((endScreen.getOaeLeft() != null && endScreen.getOaeLeft() == -1) || (endScreen.getOaeRight() != null && endScreen.getOaeRight() == -1) || (endScreen.getAabrLeft() != null && endScreen.getAabrLeft() == -1) || (endScreen.getAabrRight() != null && endScreen.getAabrRight() == -1)) {//oae未通过 | |
| 420 | - endResu.append("未通过("); | |
| 376 | + //根据医院id和儿童档案id获取听力筛查记录,获取一次初筛记录和最后一次复筛记录,将初筛和复筛的检测结果显示到转诊申请页。 | |
| 377 | + BabyPatientExtendEarScreenQuery query = new BabyPatientExtendEarScreenQuery(); | |
| 378 | + query.setCheckHospitalId(hospitalId); | |
| 379 | + query.setBabyId(babyId); | |
| 380 | + query.setStatus(0); | |
| 381 | + query.setSort("create_date"); | |
| 382 | + // d、本院:初筛未通过或复筛确诊 | |
| 383 | + List<BabyPatientExtendEarScreen> screenList = screenService.queryBabyPatientExtendEarScreen(query); | |
| 384 | + if (screenList == null && screenList.size() == 0) { | |
| 385 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("该儿童还未听筛记录不能进行听力转诊"); | |
| 421 | 386 | } |
| 422 | - if (((endScreen.getOaeLeft() != null && endScreen.getOaeLeft() == -1) || (endScreen.getAabrLeft() != null && endScreen.getAabrLeft() == -1)) && ((endScreen.getOaeRight() != null && endScreen.getOaeRight() == -1) || (endScreen.getAabrRight() != null && endScreen.getAabrRight() == -1))) {//oae未通过 | |
| 423 | - endResu.append("双耳"); | |
| 387 | + //根据医院ID和babyid查询听筛初筛第一条记录和复筛最后一条记录进行并集。前端显示 | |
| 388 | + Map<String, String> map = new HashMap<>(); | |
| 389 | + //取第一条初筛记录结果 | |
| 390 | + BabyPatientExtendEarScreen firstScreen = screenList.get(0); | |
| 424 | 391 | |
| 425 | - } else if ((endScreen.getOaeLeft() != null && endScreen.getOaeLeft() == -1) || (endScreen.getAabrLeft() != null && endScreen.getAabrLeft() == -1)) {//oae未通过 | |
| 426 | - endResu.append("左耳"); | |
| 427 | - } else if ((endScreen.getOaeRight() != null && endScreen.getOaeRight() == -1) || (endScreen.getAabrRight() != null && endScreen.getAabrRight() == -1)) {//aabr未通过 | |
| 428 | - endResu.append("右耳"); | |
| 392 | + if (firstScreen.getOaeLeft() == null) { | |
| 393 | + firstScreen.setOaeLeft(1); | |
| 429 | 394 | } |
| 430 | - if (StringUtils.isNotEmpty(endResu.toString())) { | |
| 431 | - endResu.append(")"); | |
| 395 | + if (firstScreen.getOaeRight() == null) { | |
| 396 | + firstScreen.setOaeRight(1); | |
| 432 | 397 | } |
| 433 | - | |
| 434 | - map.put("endResu", endResu.toString()); | |
| 435 | - | |
| 436 | - if (endScreen.getOaeLeft() == null) { | |
| 437 | - endScreen.setOaeLeft(1); | |
| 398 | + if (firstScreen.getAabrLeft() == null) { | |
| 399 | + firstScreen.setAabrLeft(1); | |
| 438 | 400 | } |
| 439 | - if (endScreen.getOaeRight() == null) { | |
| 440 | - endScreen.setOaeRight(1); | |
| 401 | + if (firstScreen.getAabrRight() == null) { | |
| 402 | + firstScreen.setAabrRight(1); | |
| 441 | 403 | } |
| 442 | - if (endScreen.getAabrLeft() == null) { | |
| 443 | - endScreen.setAabrLeft(1); | |
| 404 | + //初筛未通过 | |
| 405 | + StringBuffer firstResu = new StringBuffer(); | |
| 406 | + if (firstScreen.getOaeLeft() == -1 || firstScreen.getOaeRight() == -1 || firstScreen.getAabrLeft() == -1 || firstScreen.getAabrRight() == -1) {//oae未通过 | |
| 407 | + firstResu.append("未通过("); | |
| 444 | 408 | } |
| 445 | - if (endScreen.getAabrRight() == null) { | |
| 446 | - endScreen.setAabrRight(1); | |
| 409 | + if ((firstScreen.getOaeLeft() == -1 || firstScreen.getAabrLeft() == -1) && (firstScreen.getOaeRight() == -1 || firstScreen.getAabrRight() == -1)) {//oae未通过 | |
| 410 | + firstResu.append("双耳"); | |
| 411 | + } else if (firstScreen.getOaeLeft() == -1 || firstScreen.getAabrLeft() == -1) {//oae未通过 | |
| 412 | + firstResu.append("左耳"); | |
| 413 | + } else if (firstScreen.getOaeRight() == -1 || firstScreen.getAabrRight() == -1) {//aabr未通过 | |
| 414 | + firstResu.append("右耳"); | |
| 447 | 415 | } |
| 416 | + if (StringUtils.isNotEmpty(firstResu.toString())) { | |
| 417 | + firstResu.append(")"); | |
| 418 | + } | |
| 448 | 419 | |
| 449 | - if ((endScreen.getOaeLeft() == -1 || endScreen.getOaeRight() == -1) && (endScreen.getAabrLeft() == -1 || endScreen.getAabrRight() == -1)) { | |
| 450 | - map.put("endMethod", "OAE/AABR"); | |
| 451 | - } else if (endScreen.getOaeLeft() == -1 || endScreen.getOaeRight() == -1) { | |
| 452 | - map.put("endMethod", "OAE"); | |
| 453 | - } else if (endScreen.getAabrLeft() == -1 || endScreen.getAabrRight() == -1) { | |
| 454 | - map.put("endMethod", "AABR"); | |
| 420 | + map.put("firstResu", firstResu.toString()); | |
| 421 | + if ((firstScreen.getOaeLeft() == -1 || firstScreen.getOaeRight() == -1) && (firstScreen.getAabrLeft() == -1 || firstScreen.getAabrRight() == -1)) { | |
| 422 | + map.put("firstMethod", "OAE/AABR"); | |
| 423 | + } else if (firstScreen.getOaeLeft() == -1 || firstScreen.getOaeRight() == -1) { | |
| 424 | + map.put("firstMethod", "OAE"); | |
| 425 | + } else if (firstScreen.getAabrLeft() == -1 || firstScreen.getAabrRight() == -1) { | |
| 426 | + map.put("firstMethod", "AABR"); | |
| 455 | 427 | } |
| 456 | 428 | //初筛时间 |
| 457 | - map.put("endTime", DateUtil.getyyyy_MM_dd(endScreen.getScreenDate())); | |
| 429 | + map.put("firstTime", DateUtil.getyyyy_MM_dd(firstScreen.getScreenDate())); | |
| 430 | + | |
| 431 | + if (screenList.size() > 1) { | |
| 432 | + //取复筛记录最后一条结果 | |
| 433 | + BabyPatientExtendEarScreen endScreen = screenList.get(screenList.size() - 1); | |
| 434 | + //初筛未通过 | |
| 435 | + StringBuffer endResu = new StringBuffer(); | |
| 436 | + if ((endScreen.getOaeLeft() != null && endScreen.getOaeLeft() == -1) || (endScreen.getOaeRight() != null && endScreen.getOaeRight() == -1) || (endScreen.getAabrLeft() != null && endScreen.getAabrLeft() == -1) || (endScreen.getAabrRight() != null && endScreen.getAabrRight() == -1)) {//oae未通过 | |
| 437 | + endResu.append("未通过("); | |
| 438 | + } | |
| 439 | + if (((endScreen.getOaeLeft() != null && endScreen.getOaeLeft() == -1) || (endScreen.getAabrLeft() != null && endScreen.getAabrLeft() == -1)) && ((endScreen.getOaeRight() != null && endScreen.getOaeRight() == -1) || (endScreen.getAabrRight() != null && endScreen.getAabrRight() == -1))) {//oae未通过 | |
| 440 | + endResu.append("双耳"); | |
| 441 | + | |
| 442 | + } else if ((endScreen.getOaeLeft() != null && endScreen.getOaeLeft() == -1) || (endScreen.getAabrLeft() != null && endScreen.getAabrLeft() == -1)) {//oae未通过 | |
| 443 | + endResu.append("左耳"); | |
| 444 | + } else if ((endScreen.getOaeRight() != null && endScreen.getOaeRight() == -1) || (endScreen.getAabrRight() != null && endScreen.getAabrRight() == -1)) {//aabr未通过 | |
| 445 | + endResu.append("右耳"); | |
| 446 | + } | |
| 447 | + if (StringUtils.isNotEmpty(endResu.toString())) { | |
| 448 | + endResu.append(")"); | |
| 449 | + } | |
| 450 | + | |
| 451 | + map.put("endResu", endResu.toString()); | |
| 452 | + | |
| 453 | + if (endScreen.getOaeLeft() == null) { | |
| 454 | + endScreen.setOaeLeft(1); | |
| 455 | + } | |
| 456 | + if (endScreen.getOaeRight() == null) { | |
| 457 | + endScreen.setOaeRight(1); | |
| 458 | + } | |
| 459 | + if (endScreen.getAabrLeft() == null) { | |
| 460 | + endScreen.setAabrLeft(1); | |
| 461 | + } | |
| 462 | + if (endScreen.getAabrRight() == null) { | |
| 463 | + endScreen.setAabrRight(1); | |
| 464 | + } | |
| 465 | + | |
| 466 | + if ((endScreen.getOaeLeft() == -1 || endScreen.getOaeRight() == -1) && (endScreen.getAabrLeft() == -1 || endScreen.getAabrRight() == -1)) { | |
| 467 | + map.put("endMethod", "OAE/AABR"); | |
| 468 | + } else if (endScreen.getOaeLeft() == -1 || endScreen.getOaeRight() == -1) { | |
| 469 | + map.put("endMethod", "OAE"); | |
| 470 | + } else if (endScreen.getAabrLeft() == -1 || endScreen.getAabrRight() == -1) { | |
| 471 | + map.put("endMethod", "AABR"); | |
| 472 | + } | |
| 473 | + //初筛时间 | |
| 474 | + map.put("endTime", DateUtil.getyyyy_MM_dd(endScreen.getScreenDate())); | |
| 475 | + } | |
| 476 | + BaseResponse baseResp = new BaseResponse(); | |
| 477 | + baseResp.setObject(map); | |
| 478 | + return baseResp.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 458 | 479 | } |
| 459 | - BaseResponse baseResp = new BaseResponse(); | |
| 460 | - baseResp.setObject(map); | |
| 461 | - return baseResp.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 462 | - } | |
| 463 | 480 | |
| 464 | - /** | |
| 465 | - * 添加儿童建档 | |
| 466 | - * | |
| 467 | - * @return | |
| 468 | - */ | |
| 469 | - @RequestMapping(method = RequestMethod.POST) | |
| 470 | - @ResponseBody | |
| 471 | - @TokenRequired | |
| 472 | - public BaseObjectResponse add(BabyPatientExtendEar ear, BabyPatientExtendEarBirth earBirth, | |
| 473 | - BabyPatientExtendEarMother earMother, BabyPatientExtendEarFamily earFamily, HttpServletRequest request) { | |
| 474 | - return babyPatientExtendEarService.insert(ear, earBirth, earMother, earFamily, getUserId(request)); | |
| 475 | - } | |
| 481 | + /** | |
| 482 | + * 添加儿童建档 | |
| 483 | + * | |
| 484 | + * @return | |
| 485 | + */ | |
| 486 | + @RequestMapping(method = RequestMethod.POST) | |
| 487 | + @ResponseBody | |
| 488 | + @TokenRequired | |
| 489 | + public BaseObjectResponse add (BabyPatientExtendEar ear, BabyPatientExtendEarBirth earBirth, | |
| 490 | + BabyPatientExtendEarMother earMother, BabyPatientExtendEarFamily earFamily, HttpServletRequest request){ | |
| 491 | + return babyPatientExtendEarService.insert(ear, earBirth, earMother, earFamily, getUserId(request)); | |
| 492 | + } | |
| 476 | 493 | |
| 477 | - /** | |
| 478 | - * 获取 添加儿童建档界面的 下拉列表数据 | |
| 479 | - * | |
| 480 | - * @return | |
| 481 | - */ | |
| 482 | - @RequestMapping(value = "/configs", method = RequestMethod.GET) | |
| 483 | - @ResponseBody | |
| 484 | - public BaseObjectResponse configs() { | |
| 485 | - return babyPatientExtendEarService.getConfigs(); | |
| 486 | - } | |
| 494 | + /** | |
| 495 | + * 获取 添加儿童建档界面的 下拉列表数据 | |
| 496 | + * | |
| 497 | + * @return | |
| 498 | + */ | |
| 499 | + @RequestMapping(value = "/configs", method = RequestMethod.GET) | |
| 500 | + @ResponseBody | |
| 501 | + public BaseObjectResponse configs () { | |
| 502 | + return babyPatientExtendEarService.getConfigs(); | |
| 503 | + } | |
| 487 | 504 | |
| 488 | -} | |
| 505 | + } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
b01039e
| ... | ... | @@ -13,7 +13,10 @@ |
| 13 | 13 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 14 | 14 | import com.lyms.platform.common.result.BaseResponse; |
| 15 | 15 | import com.lyms.platform.common.utils.*; |
| 16 | -import com.lyms.platform.operate.web.request.*; | |
| 16 | +import com.lyms.platform.operate.web.request.BabyBookbuildingAddRequest; | |
| 17 | +import com.lyms.platform.operate.web.request.BabyGuideSmsequest; | |
| 18 | +import com.lyms.platform.operate.web.request.BabyManageRequest; | |
| 19 | +import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; | |
| 17 | 20 | import com.lyms.platform.operate.web.result.*; |
| 18 | 21 | import com.lyms.platform.operate.web.utils.BabyListTask; |
| 19 | 22 | import com.lyms.platform.operate.web.utils.GrowthCountTask; |
| 20 | 23 | |
| ... | ... | @@ -1260,8 +1263,8 @@ |
| 1260 | 1263 | result.setMalformation(model.getMalformation()); |
| 1261 | 1264 | result.setApgarScore(JsonUtil.str2Obj(model.getApgarScore(), Map.class)); |
| 1262 | 1265 | |
| 1263 | - | |
| 1264 | 1266 | result.setHighRisk(model.getHighRisk()); |
| 1267 | + | |
| 1265 | 1268 | //result.setHighRiskReason(model.getHighRiskReason()); |
| 1266 | 1269 | result.setExpVip(model.getExpVip()); |
| 1267 | 1270 | result.setMremark(model.getMremark() == null ? "" : model.getMremark()); |
| ... | ... | @@ -1818,6 +1821,62 @@ |
| 1818 | 1821 | return objectResponse; |
| 1819 | 1822 | } |
| 1820 | 1823 | |
| 1824 | + public HighScoreResult queryRisk(List<String> id, boolean n) { | |
| 1825 | + HighScoreResult highScoreResult = new HighScoreResult(); | |
| 1826 | + BasicConfigQuery | |
| 1827 | + basicConfigQuery = new BasicConfigQuery(); | |
| 1828 | + List data = new ArrayList(); | |
| 1829 | + List dat1a = new ArrayList(); | |
| 1830 | + Integer score = null; | |
| 1831 | + if (CollectionUtils.isNotEmpty(id)) { | |
| 1832 | + score = 0; | |
| 1833 | + for (String i : id) { | |
| 1834 | + basicConfigQuery.setId(i); | |
| 1835 | + List<BasicConfig> basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 1836 | + if (CollectionUtils.isNotEmpty(basicConfigs)) { | |
| 1837 | + for (BasicConfig basicConfig : basicConfigs) { | |
| 1838 | + Map<String, Object> map = new HashMap<>(); | |
| 1839 | + map.put("id", basicConfig.getId()); | |
| 1840 | + map.put("name", basicConfig.getName()); | |
| 1841 | + map.put("code", basicConfig.getCode()); | |
| 1842 | + basicConfigQuery.setId(basicConfig.getParentId()); | |
| 1843 | + List<BasicConfig> basicConfigs2 = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 1844 | + if (CollectionUtils.isNotEmpty(basicConfigs2)) { | |
| 1845 | + for (BasicConfig bc : basicConfigs2) { | |
| 1846 | + String name = bc.getName(); | |
| 1847 | + if (name.indexOf("预警") > -1) { | |
| 1848 | + name = name.replace("预警", ""); | |
| 1849 | + } | |
| 1850 | + map.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name)); | |
| 1851 | + } | |
| 1852 | + } | |
| 1853 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(basicConfig.getCode())) { | |
| 1854 | + score += org.apache.commons.lang.math.NumberUtils.toInt(basicConfig.getCode(), 0); | |
| 1855 | + } | |
| 1856 | + if (n) { | |
| 1857 | + BasicConfig basicConfig1 = basicConfigService.getOneBasicConfigById(basicConfig.getParentId()); | |
| 1858 | + if (null != basicConfig1) { | |
| 1859 | + Map<String, Object> map1 = new HashMap<>(); | |
| 1860 | + map1.put("id", basicConfig1.getId()); | |
| 1861 | + String name = basicConfig1.getName(); | |
| 1862 | + if (name.indexOf("预警") > -1) { | |
| 1863 | + name = name.replace("预警", ""); | |
| 1864 | + } | |
| 1865 | + map1.put("name", name); | |
| 1866 | + map1.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name)); | |
| 1867 | + dat1a.add(map1); | |
| 1868 | + } | |
| 1869 | + } | |
| 1870 | + data.add(map); | |
| 1871 | + } | |
| 1872 | + } | |
| 1873 | + } | |
| 1874 | + } | |
| 1875 | + highScoreResult.setHighRisk(data); | |
| 1876 | + highScoreResult.setScore(score); | |
| 1877 | + highScoreResult.setLevel(dat1a); | |
| 1878 | + return highScoreResult; | |
| 1879 | + } | |
| 1821 | 1880 | |
| 1822 | 1881 | public List queryRisk(List<String> id) { |
| 1823 | 1882 | BasicConfigQuery |
| ... | ... | @@ -2409,8 +2468,8 @@ |
| 2409 | 2468 | result.setDueType(babyModel.getDueType()); |
| 2410 | 2469 | result.setMalformation(babyModel.getMalformation()); |
| 2411 | 2470 | result.setApgarScore(JsonUtil.str2Obj(babyModel.getApgarScore(), Map.class)); |
| 2412 | - result.setmHighRiskReason(babyModel.getmHighRiskReason()); | |
| 2413 | - | |
| 2471 | + //母亲高危因素 | |
| 2472 | + result.setmHighRiskReason2(queryRisk(babyModel.getmHighRiskReason(),false).getHighRisk()); | |
| 2414 | 2473 | result.setFatherProfessionTypeId(babyModel.getFproTypeId()); |
| 2415 | 2474 | } else { |
| 2416 | 2475 | patientsQuery.setPhoneOrCert(cardNo); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/InitFollowUp.java
View file @
b01039e
| ... | ... | @@ -13,6 +13,16 @@ |
| 13 | 13 | public class InitFollowUp extends BaseResponse { |
| 14 | 14 | //确诊结果 |
| 15 | 15 | private List<Map<String, Object>> confirmResult; |
| 16 | + //确诊时间 | |
| 17 | + private String confirmData; | |
| 18 | + | |
| 19 | + public String getConfirmData() { | |
| 20 | + return confirmData; | |
| 21 | + } | |
| 22 | + | |
| 23 | + public void setConfirmData(String confirmData) { | |
| 24 | + this.confirmData = confirmData; | |
| 25 | + } | |
| 16 | 26 | |
| 17 | 27 | public List<Map<String, Object>> getConfirmResult() { |
| 18 | 28 | return confirmResult; |