Commit 2a4675e2d8863e5bed62271704a6a3b959e7290b
1 parent
45146210d7
Exists in
master
and in
6 other branches
妇科检查
Showing 4 changed files with 254 additions and 63 deletions
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/HearDiagnManageListResult.java
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
View file @
2a4675e
| ... | ... | @@ -223,9 +223,7 @@ |
| 223 | 223 | <if test="nextTime != null"> |
| 224 | 224 | and next_time = #{nextTime,jdbcType=TIMESTAMP} |
| 225 | 225 | </if> |
| 226 | - <if test="ifdel != null and ifdel >= 0"> | |
| 227 | - and ifdel = #{ifdel,jdbcType=INTEGER} | |
| 228 | - </if> | |
| 226 | + and ifdel =0 | |
| 229 | 227 | <if test="ifclose != null and ifclose >= 0"> |
| 230 | 228 | and ifclose = #{ifclose,jdbcType=INTEGER} |
| 231 | 229 | </if> |
| ... | ... | @@ -286,6 +284,7 @@ |
| 286 | 284 | <if test="babyId != null and babyId != ''"> |
| 287 | 285 | and baby_id = #{babyId,jdbcType=VARCHAR} |
| 288 | 286 | </if> |
| 287 | + and ifdel = 0 | |
| 289 | 288 | </where> |
| 290 | 289 | </select> |
| 291 | 290 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
2a4675e
| ... | ... | @@ -500,8 +500,8 @@ |
| 500 | 500 | @TokenRequired |
| 501 | 501 | public BaseResponse addBabyPatientExtendEarFollowUp(@Valid BabyPatientExtendEarFollowUp obj, |
| 502 | 502 | HttpServletRequest request) { |
| 503 | - // BaseResponse basResp = validata(obj); | |
| 504 | - // if (basResp.getErrorcode() != 0) return basResp; | |
| 503 | + BaseResponse basResp = validata(obj); | |
| 504 | + if (basResp.getErrorcode() != 0) return basResp; | |
| 505 | 505 | //获取当前登录用户ID |
| 506 | 506 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 507 | 507 | if (loginState == null) { |
| 508 | 508 | |
| ... | ... | @@ -536,37 +536,37 @@ |
| 536 | 536 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访时间"); |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | - if (obj.getFollowAddr() == null) {//随访地址 | |
| 540 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访地址"); | |
| 541 | - } | |
| 542 | - | |
| 543 | - if (obj.getMarkTime() == null) {//确诊时间 | |
| 544 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊时间"); | |
| 545 | - } | |
| 546 | - if (obj.getMarkResult() == null) {//确诊结果 | |
| 547 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊结果"); | |
| 548 | - } | |
| 549 | - if (obj.getMarkDetail() == null) {//确诊详情 | |
| 550 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊详情"); | |
| 551 | - } | |
| 552 | - if (obj.getFollowInfo() == null) {//随访记录 | |
| 553 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访记录"); | |
| 554 | - } | |
| 555 | - if (obj.getGuideOpinion() == null) {//指导意见 | |
| 556 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入指导意见"); | |
| 557 | - } | |
| 558 | - if (obj.getFollowDoctorName() == null) {//随访医生名称 | |
| 559 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入医生名称"); | |
| 560 | - } | |
| 539 | + // if (obj.getFollowAddr() == null) {//随访地址 | |
| 540 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访地址"); | |
| 541 | + // } | |
| 542 | + // | |
| 543 | + // if (obj.getMarkTime() == null) {//确诊时间 | |
| 544 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊时间"); | |
| 545 | + // } | |
| 546 | + // if (obj.getMarkResult() == null) {//确诊结果 | |
| 547 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊结果"); | |
| 548 | + // } | |
| 549 | + // if (obj.getMarkDetail() == null) {//确诊详情 | |
| 550 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊详情"); | |
| 551 | + // } | |
| 552 | + // if (obj.getFollowInfo() == null) {//随访记录 | |
| 553 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访记录"); | |
| 554 | + // } | |
| 555 | + // if (obj.getGuideOpinion() == null) {//指导意见 | |
| 556 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入指导意见"); | |
| 557 | + // } | |
| 558 | + // if (obj.getFollowDoctorName() == null) {//随访医生名称 | |
| 559 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入医生名称"); | |
| 560 | + // } | |
| 561 | 561 | if (obj.getFollowDoctorId() == null) {//随访医生ID |
| 562 | 562 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访医生ID"); |
| 563 | 563 | } |
| 564 | - if (obj.getNextTime() == null) {//预约复查时间 | |
| 565 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入预约复查时间"); | |
| 566 | - } | |
| 567 | - if (obj.getHospitalId() == null) {//医院ID | |
| 568 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入医院ID"); | |
| 569 | - } | |
| 564 | + // if (obj.getNextTime() == null) {//预约复查时间 | |
| 565 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入预约复查时间"); | |
| 566 | + // } | |
| 567 | + // if (obj.getHospitalId() == null) {//医院ID | |
| 568 | + // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入医院ID"); | |
| 569 | + // } | |
| 570 | 570 | return baseResp; |
| 571 | 571 | } |
| 572 | 572 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
View file @
2a4675e
| ... | ... | @@ -17,10 +17,7 @@ |
| 17 | 17 | import com.lyms.platform.operate.web.result.HearDiagnManageListResult; |
| 18 | 18 | import com.lyms.platform.operate.web.result.HearingDiagnoseListResult; |
| 19 | 19 | import com.lyms.platform.permission.model.*; |
| 20 | -import com.lyms.platform.permission.service.BabyPatientExtendEarHearingDiagnoseService; | |
| 21 | -import com.lyms.platform.permission.service.BabyPatientExtendEarScreenService; | |
| 22 | -import com.lyms.platform.permission.service.ChildrenPersonService; | |
| 23 | -import com.lyms.platform.permission.service.UsersService; | |
| 20 | +import com.lyms.platform.permission.service.*; | |
| 24 | 21 | import com.lyms.platform.pojo.BabyModel; |
| 25 | 22 | import org.apache.commons.collections.CollectionUtils; |
| 26 | 23 | import org.apache.commons.lang.StringUtils; |
| 27 | 24 | |
| 28 | 25 | |
| ... | ... | @@ -53,10 +50,86 @@ |
| 53 | 50 | private ChildrenPersonService childrenPersonService; |
| 54 | 51 | @Autowired |
| 55 | 52 | private BabyService babyService; |
| 53 | + //儿童听诊记录 | |
| 56 | 54 | @Autowired |
| 57 | 55 | private BabyPatientExtendEarHearingDiagnoseService hearingDiagnoseService; |
| 56 | + //儿童听力随访 | |
| 57 | + @Autowired | |
| 58 | + private BabyPatientExtendEarFollowUpService babyPatientExtendEarFollowUpService; | |
| 58 | 59 | |
| 59 | 60 | /** |
| 61 | + * 获取儿童听筛记录 | |
| 62 | + * | |
| 63 | + * @return | |
| 64 | + */ | |
| 65 | + @RequestMapping(method = RequestMethod.GET, value = "/getHistoryList") | |
| 66 | + @ResponseBody | |
| 67 | + @TokenRequired | |
| 68 | + public BaseResponse getHistoryList(String babyId, HttpServletRequest request) { | |
| 69 | + //获取当前登录用户ID | |
| 70 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 71 | + if (loginState == null) { | |
| 72 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 73 | + } | |
| 74 | +//当前登录人医院Id | |
| 75 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 76 | + BabyPatientExtendEarScreenQuery earScreenQuery = new BabyPatientExtendEarScreenQuery(); | |
| 77 | + earScreenQuery.setBabyId(babyId); | |
| 78 | + //儿童听筛记录 | |
| 79 | + List<BabyPatientExtendEarScreen> earScreenList = screenService.queryBabyPatientExtendEarScreen(earScreenQuery); | |
| 80 | + BabyPatientExtendEarHearingDiagnoseQuery hearingDiagnoseQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 81 | + hearingDiagnoseQuery.setBabyId(babyId); | |
| 82 | + hearingDiagnoseQuery.setIfdel(0); | |
| 83 | + //儿童听力诊断记录 | |
| 84 | + List<BabyPatientExtendEarHearingDiagnose> hearingDiagnoseList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(hearingDiagnoseQuery); | |
| 85 | + BabyPatientExtendEarFollowUpQuery earFollowUpQuery = new BabyPatientExtendEarFollowUpQuery(); | |
| 86 | + earFollowUpQuery.setBabyId(babyId); | |
| 87 | + //儿童听力随访记录 | |
| 88 | + List<BabyPatientExtendEarFollowUp> earFollowUpList = babyPatientExtendEarFollowUpService.queryBabyPatientExtendEarFollowUpByBaby(earFollowUpQuery); | |
| 89 | + | |
| 90 | + List<Map<String,String>> resultList = new ArrayList<>(); | |
| 91 | + for(BabyPatientExtendEarScreen es:earScreenList){ | |
| 92 | + Map<String,String> fuMap = new HashMap<>(); | |
| 93 | + fuMap.put("hospitalId",es.getCheckHospitalId()); | |
| 94 | + fuMap.put("id",es.getId()); | |
| 95 | + fuMap.put("type","1"); | |
| 96 | + if(es.getScreenType() == 1){//1=初筛 2=复筛 | |
| 97 | + fuMap.put("name","初筛"); | |
| 98 | + }else if(es.getScreenType() == 2){//1=初筛 2=复筛 | |
| 99 | + fuMap.put("name","复筛"); | |
| 100 | + } | |
| 101 | + fuMap.put("time",DateUtil.getyyyy_MM_dd(es.getScreenDate())); | |
| 102 | + resultList.add(fuMap); | |
| 103 | + } | |
| 104 | + | |
| 105 | + for(BabyPatientExtendEarHearingDiagnose hd:hearingDiagnoseList){ | |
| 106 | + Map<String,String> fuMap = new HashMap<>(); | |
| 107 | + fuMap.put("hospitalId",hd.getHospitalId()); | |
| 108 | + fuMap.put("id",hd.getId()); | |
| 109 | + fuMap.put("name","诊断"); | |
| 110 | + fuMap.put("type","2"); | |
| 111 | + fuMap.put("time",DateUtil.getyyyy_MM_dd(hd.getDiagnoseTime())); | |
| 112 | + resultList.add(fuMap); | |
| 113 | + } | |
| 114 | + for(BabyPatientExtendEarFollowUp fu:earFollowUpList){ | |
| 115 | + Map<String,String> fuMap = new HashMap<>(); | |
| 116 | + fuMap.put("hospitalId",fu.getHospitalId()); | |
| 117 | + fuMap.put("id",fu.getId()); | |
| 118 | + fuMap.put("name","随访"); | |
| 119 | + fuMap.put("type","3"); | |
| 120 | + if(fu.getIfclose() == 1){//0-未结案,1-结案 | |
| 121 | + fuMap.put("close","结案"); | |
| 122 | + } | |
| 123 | + fuMap.put("time",DateUtil.getyyyy_MM_dd(fu.getFollowTime())); | |
| 124 | + resultList.add(fuMap); | |
| 125 | + } | |
| 126 | + BaseResponse response = new BaseResponse(); | |
| 127 | + response.setObject(resultList); | |
| 128 | + response.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 129 | + return response; | |
| 130 | + } | |
| 131 | + | |
| 132 | + /** | |
| 60 | 133 | * 获取确诊儿童列表(听力诊断表,当前医院的确诊的数据) |
| 61 | 134 | * |
| 62 | 135 | * @return |
| 63 | 136 | |
| ... | ... | @@ -130,10 +203,20 @@ |
| 130 | 203 | if (users != null) { |
| 131 | 204 | hea.setDoctorName(users.getName() == null ? "-" : users.getName()); |
| 132 | 205 | } |
| 206 | + BabyModel babyModel = babyService.getOneBabyById(hd.getBabyId()); | |
| 207 | + if (babyModel != null) { | |
| 208 | + hea.setBabyName(babyModel.getName()); | |
| 209 | + hea.setBabyId(hd.getBabyId()); | |
| 210 | + hea.setMommyName(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMname())); | |
| 211 | + hea.setMommnyPhone(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMphone())); | |
| 212 | + hea.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(babyModel.getMphone())); | |
| 213 | + hea.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date())); | |
| 214 | + hea.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(babyModel.getBirth()))); | |
| 215 | + hea.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex()))); | |
| 216 | + } | |
| 133 | 217 | hea.setHdTime(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(hd.getDiagnoseTime()))); |
| 134 | 218 | if (hd.getHighFactor() != null) { |
| 135 | 219 | String hf[] = hd.getHighFactor().split(","); |
| 136 | - // List<Map<Integer, String>> highRiskEnums = new ArrayList<>(); | |
| 137 | 220 | StringBuffer hrSb = new StringBuffer(); |
| 138 | 221 | for (int b = 0; b < hf.length; b++) { |
| 139 | 222 | if (StringUtils.isNotEmpty(hf[b])) { |
| ... | ... | @@ -150,7 +233,6 @@ |
| 150 | 233 | //确诊结果 |
| 151 | 234 | if (hd.getConfirmResult() != null) { |
| 152 | 235 | String cr[] = hd.getConfirmResult().split(","); |
| 153 | - // List<Map<Integer, String>> hdEnums = new ArrayList<>(); | |
| 154 | 236 | StringBuffer hdSb = new StringBuffer(); |
| 155 | 237 | for (int b = 0; b < cr.length; b++) { |
| 156 | 238 | if (StringUtils.isNotEmpty(cr[b])) { |
| ... | ... | @@ -168,7 +250,12 @@ |
| 168 | 250 | } |
| 169 | 251 | BaseListResponse result = new BaseListResponse(); |
| 170 | 252 | result.setData(hdList); |
| 171 | - result.setPageInfo(query.getPageInfo()); | |
| 253 | + PageInfo pageInfo = new PageInfo(); | |
| 254 | + pageInfo.setLimit(hdReq.getLimit()); | |
| 255 | + pageInfo.setPage(hdReq.getPage()); | |
| 256 | + pageInfo.setCount(query.getCount()); | |
| 257 | + | |
| 258 | + result.setPageInfo(pageInfo); | |
| 172 | 259 | return result; |
| 173 | 260 | } |
| 174 | 261 | |
| ... | ... | @@ -203,12 +290,12 @@ |
| 203 | 290 | query.setEndBirthday(model.getBirthEndTime()); |
| 204 | 291 | } |
| 205 | 292 | List<String> babyIds = new ArrayList<>(); |
| 206 | - List<ChildrenPerson> childrenPersonList = childrenPersonService.queryChildrenPerson(query); | |
| 207 | - if (CollectionUtils.isNotEmpty(childrenPersonList)) { | |
| 208 | - for (ChildrenPerson cp : childrenPersonList) { | |
| 209 | - //获取babyid,还未表还未增加 | |
| 210 | - } | |
| 211 | - } | |
| 293 | + // List<ChildrenPerson> childrenPersonList = childrenPersonService.queryChildrenPerson(query); | |
| 294 | + // if (CollectionUtils.isNotEmpty(childrenPersonList)) { | |
| 295 | + // for (ChildrenPerson cp : childrenPersonList) { | |
| 296 | + // //获取babyid,还未表还未增加 | |
| 297 | + // } | |
| 298 | + // } | |
| 212 | 299 | |
| 213 | 300 | |
| 214 | 301 | BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery(); |
| ... | ... | @@ -261,6 +348,8 @@ |
| 261 | 348 | hdQuery.setBabyId(babyId); |
| 262 | 349 | //根据babyId查询听力诊断,如果有数据则已诊断 |
| 263 | 350 | int count = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnoseCount(hdQuery); |
| 351 | + hdm.setSecrType("复诊"); | |
| 352 | + hdm.setSecrResult("未通过"); | |
| 264 | 353 | if(count>0){//儿童在医院里做过听力诊断记录,标记为已诊断 |
| 265 | 354 | hdm.setStatus("已诊断"); |
| 266 | 355 | alrScreens.add(hdm); |
| 267 | 356 | |
| 268 | 357 | |
| 269 | 358 | |
| 270 | 359 | |
| ... | ... | @@ -269,32 +358,39 @@ |
| 269 | 358 | notScreens.add(hdm); |
| 270 | 359 | } |
| 271 | 360 | hearDiagnManageListResults.add(hdm); |
| 272 | - | |
| 273 | 361 | } |
| 274 | 362 | }else{ |
| 275 | 363 | return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有数据"); |
| 276 | 364 | } |
| 277 | 365 | BaseListResponse result = new BaseListResponse(); |
| 278 | 366 | PageInfo pageInfo = new PageInfo(); |
| 279 | - // 1-已诊断、2-待诊断、3-全部 | |
| 280 | - if(model.getStatus() == 1){ | |
| 281 | - for (int i = (model.getPage() - 1) * model.getLimit(); (i < alrScreens.size() && i < model.getLimit()); i++) { | |
| 282 | - hdmResult.add(alrScreens.get(i)); | |
| 283 | - } | |
| 284 | - pageInfo.setCount(alrScreens.size()); | |
| 285 | - result.setData(hdmResult); | |
| 286 | - }else if(model.getStatus() == 2){ | |
| 287 | - for (int i = (model.getPage() - 1) * model.getLimit(); (i < notScreens.size() && i < model.getLimit()); i++) { | |
| 288 | - hdmResult.add(notScreens.get(i)); | |
| 289 | - } | |
| 290 | - pageInfo.setCount(alrScreens.size()); | |
| 291 | - result.setData(hdmResult); | |
| 292 | - }else{ | |
| 367 | + if(model.getStatus()==null){ | |
| 293 | 368 | for (int i = (model.getPage() - 1) * model.getLimit(); (i < hearDiagnManageListResults.size() && i < model.getLimit()); i++) { |
| 294 | - hdmResult.add(notScreens.get(i)); | |
| 369 | + hdmResult.add(hearDiagnManageListResults.get(i)); | |
| 295 | 370 | } |
| 296 | - pageInfo.setCount(alrScreens.size()); | |
| 371 | + pageInfo.setCount(hearDiagnManageListResults.size()); | |
| 297 | 372 | result.setData(hdmResult); |
| 373 | + }else { | |
| 374 | + // 1-已诊断、2-待诊断 | |
| 375 | + if (model.getStatus() == 1) { | |
| 376 | + for (int i = (model.getPage() - 1) * model.getLimit(); (i < alrScreens.size() && i < model.getLimit()); i++) { | |
| 377 | + hdmResult.add(alrScreens.get(i)); | |
| 378 | + } | |
| 379 | + pageInfo.setCount(alrScreens.size()); | |
| 380 | + result.setData(hdmResult); | |
| 381 | + } else if (model.getStatus() == 2) { | |
| 382 | + for (int i = (model.getPage() - 1) * model.getLimit(); (i < notScreens.size() && i < model.getLimit()); i++) { | |
| 383 | + hdmResult.add(notScreens.get(i)); | |
| 384 | + } | |
| 385 | + pageInfo.setCount(notScreens.size()); | |
| 386 | + result.setData(hdmResult); | |
| 387 | + } else { | |
| 388 | + for (int i = (model.getPage() - 1) * model.getLimit(); (i < hearDiagnManageListResults.size() && i < model.getLimit()); i++) { | |
| 389 | + hdmResult.add(hearDiagnManageListResults.get(i)); | |
| 390 | + } | |
| 391 | + pageInfo.setCount(hearDiagnManageListResults.size()); | |
| 392 | + result.setData(hdmResult); | |
| 393 | + } | |
| 298 | 394 | } |
| 299 | 395 | |
| 300 | 396 | pageInfo.setLimit(model.getLimit()); |
| ... | ... | @@ -302,6 +398,82 @@ |
| 302 | 398 | result.setPageInfo(pageInfo); |
| 303 | 399 | result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); |
| 304 | 400 | return result; |
| 401 | + } | |
| 402 | + | |
| 403 | + | |
| 404 | + /** | |
| 405 | + * 获取听力可疑儿童列表(听力筛查表,当前医院的复诊未通过的数据) | |
| 406 | + * | |
| 407 | + * @param request | |
| 408 | + * @return | |
| 409 | + */ | |
| 410 | + @RequestMapping(method = RequestMethod.GET, value = "/getAllDiagList") | |
| 411 | + @ResponseBody | |
| 412 | + @TokenRequired | |
| 413 | + public BaseResponse getAllDiagList(HearDiaManageRequest model, HttpServletRequest request) { | |
| 414 | + //获取当前登录用户ID | |
| 415 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 416 | + if (loginState == null) { | |
| 417 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 418 | + } | |
| 419 | +//当前登录人医院Id | |
| 420 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 421 | + BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery(); | |
| 422 | + //检测医生ID | |
| 423 | + if (model.getDiagnDoctorId() != null) { | |
| 424 | + screenQuery.setCheckDoctorId(model.getDiagnDoctorId()); | |
| 425 | + } | |
| 426 | + screenQuery.setCheckHospitalId(hospitalId); | |
| 427 | + //查询全部数据 | |
| 428 | + List<BabyPatientExtendEarScreen> earScreens = screenService.notAuscultationBabyPatientExtendEarScreen(screenQuery); | |
| 429 | + //要返回的数据 | |
| 430 | + List<HearDiagnManageListResult> hdmResult = new ArrayList<>(); | |
| 431 | + if (CollectionUtils.isNotEmpty(earScreens)) { | |
| 432 | + for (BabyPatientExtendEarScreen es : earScreens) { | |
| 433 | + HearDiagnManageListResult hdm = new HearDiagnManageListResult(); | |
| 434 | + hdm.setId(es.getId()); | |
| 435 | + String docotorId = es.getCheckDoctorId(); | |
| 436 | + Users users = usersService.getUsers(Integer.parseInt(docotorId == null ? "0" : docotorId)); | |
| 437 | + if (users != null) { | |
| 438 | + hdm.setDoctorName(users.getName() == null ? "-" : users.getName()); | |
| 439 | + } | |
| 440 | + hdm.setSecrTime(DateUtil.getyyyy_MM_dd(es.getScreenDate())); | |
| 441 | + BabyModel babyModel = babyService.getOneBabyById(es.getBabyId()); | |
| 442 | + if (babyModel != null) { | |
| 443 | + hdm.setBabyName(babyModel.getName()); | |
| 444 | + hdm.setBabyId(es.getBabyId()); | |
| 445 | + hdm.setMommyName(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMname())); | |
| 446 | + hdm.setMommnyPhone(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMphone())); | |
| 447 | + hdm.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(babyModel.getMphone())); | |
| 448 | + hdm.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date())); | |
| 449 | + hdm.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(babyModel.getBirth()))); | |
| 450 | + hdm.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex()))); | |
| 451 | + } | |
| 452 | + String babyId = es.getBabyId(); | |
| 453 | + BabyPatientExtendEarHearingDiagnoseQuery hdQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 454 | + hdQuery.setBabyId(babyId); | |
| 455 | + //根据babyId查询听力诊断,如果有数据则已诊断 | |
| 456 | + int count = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnoseCount(hdQuery); | |
| 457 | + hdm.setSecrType("复诊"); | |
| 458 | + hdm.setSecrResult("未通过"); | |
| 459 | + if (count > 0) {//儿童在医院里做过听力诊断记录,标记为已诊断 | |
| 460 | + hdm.setStatus("已诊断"); | |
| 461 | + } else { | |
| 462 | + hdm.setStatus("未诊断"); | |
| 463 | + } | |
| 464 | + hdmResult.add(hdm); | |
| 465 | + } | |
| 466 | + BaseListResponse result = new BaseListResponse(); | |
| 467 | + PageInfo pageInfo = new PageInfo(); | |
| 468 | + pageInfo.setCount(hdmResult.size()); | |
| 469 | + pageInfo.setLimit(model.getLimit()); | |
| 470 | + pageInfo.setPage(model.getPage()); | |
| 471 | + result.setPageInfo(pageInfo); | |
| 472 | + result.setData(hdmResult); | |
| 473 | + return result; | |
| 474 | + } else { | |
| 475 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有数据"); | |
| 476 | + } | |
| 305 | 477 | } |
| 306 | 478 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/HearDiagnManageListResult.java
View file @
2a4675e
| ... | ... | @@ -24,6 +24,10 @@ |
| 24 | 24 | private String secrTime; |
| 25 | 25 | //性别 |
| 26 | 26 | private String sex; |
| 27 | + //筛查类型 | |
| 28 | + private String secrType; | |
| 29 | + //筛查结果 | |
| 30 | + private String secrResult; | |
| 27 | 31 | //状态 |
| 28 | 32 | private String status; |
| 29 | 33 | //医生名称 |
| ... | ... | @@ -32,6 +36,22 @@ |
| 32 | 36 | private String mommnyPhone; |
| 33 | 37 | //母亲加密联系方式 |
| 34 | 38 | private String mommnyEncryptPhone; |
| 39 | + | |
| 40 | + public String getSecrType() { | |
| 41 | + return secrType; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void setSecrType(String secrType) { | |
| 45 | + this.secrType = secrType; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public String getSecrResult() { | |
| 49 | + return secrResult; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void setSecrResult(String secrResult) { | |
| 53 | + this.secrResult = secrResult; | |
| 54 | + } | |
| 35 | 55 | |
| 36 | 56 | public String getId() { |
| 37 | 57 | return id; |