Commit 7e991afdce4c6100e72421473a7735543ca86c05
1 parent
2229aae755
Exists in
master
and in
6 other branches
听力诊断模块
Showing 5 changed files with 42 additions and 17 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
- 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/controller/HearingDiagnoseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
View file @
7e991af
... | ... | @@ -115,6 +115,7 @@ |
115 | 115 | BabyPatientExtendEarHearingDiagnoseQuery hdQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); |
116 | 116 | hdQuery.setBabyIds((String[]) babyIds.toArray(new String[babyIds.size()])); |
117 | 117 | hdQuery.setSort("diagnose_time"); |
118 | + hdQuery.setIfdel(0); | |
118 | 119 | List<BabyPatientExtendEarHearingDiagnose> hdList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(hdQuery); |
119 | 120 | |
120 | 121 | if (hdList == null && hdList.size() == 0) { |
... | ... | @@ -322,7 +323,7 @@ |
322 | 323 | } |
323 | 324 | |
324 | 325 | query.setSort("screen_date"); |
325 | - | |
326 | + query.setStatus(0); | |
326 | 327 | query.setBabyIds((String[]) babyIds.toArray(new String[babyIds.size()])); |
327 | 328 | // d、本院:初筛未通过或复筛确诊 |
328 | 329 | List<BabyPatientExtendEarScreen> screenList = screenService.queryBabyPatientExtendEarScreen(query); |
329 | 330 | |
330 | 331 | |
... | ... | @@ -394,12 +395,17 @@ |
394 | 395 | return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); |
395 | 396 | } |
396 | 397 | //医院id |
397 | - String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
398 | + // String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
398 | 399 | |
400 | + BabyModel babyModel = babyService.getOneBabyById(babyId); | |
401 | + String pid = babyModel.getPid(); | |
402 | + | |
403 | + | |
399 | 404 | //根据医院id和儿童档案id获取听力筛查记录,获取一次初筛记录和最后一次复筛记录,将初筛和复筛的检测结果显示到转诊申请页。 |
400 | 405 | BabyPatientExtendEarScreenQuery query = new BabyPatientExtendEarScreenQuery(); |
401 | - query.setCheckHospitalId(hospitalId); | |
402 | - query.setBabyId(babyId); | |
406 | + // query.setCheckHospitalId(hospitalId); | |
407 | + query.setPid(pid); | |
408 | + // query.setBabyId(babyId); | |
403 | 409 | query.setStatus(0); |
404 | 410 | query.setSort("screen_date"); |
405 | 411 | // d、本院:初筛未通过或复筛确诊 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
7e991af
... | ... | @@ -269,7 +269,7 @@ |
269 | 269 | } |
270 | 270 | query.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |
271 | 271 | }else{ |
272 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); | |
272 | + return new FrontEndResult().setData(new ArrayList()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); | |
273 | 273 | } |
274 | 274 | } |
275 | 275 | |
... | ... | @@ -359,7 +359,7 @@ |
359 | 359 | query.setPids((String[]) pids.toArray(new String[pids.size()])); |
360 | 360 | } |
361 | 361 | if(CollectionUtils.isEmpty(pids)&&fur.getSource()!=null){ |
362 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); | |
362 | + return new FrontEndResult().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); | |
363 | 363 | } |
364 | 364 | List<BabyPatientExtendEarFollowUp> BabyPatientExtendEarFollowUpList = babyPatientExtendEarFollowUpService.queryBabyPatientExtendEarFollowUp(query); |
365 | 365 | List<FollowUpListResult> fuResult = new ArrayList<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
View file @
7e991af
... | ... | @@ -534,8 +534,8 @@ |
534 | 534 | hdQuery.setBabyId(babyId); |
535 | 535 | //根据babyId查询听力诊断,如果有数据则已诊断 |
536 | 536 | int count = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnoseCount(hdQuery); |
537 | - hdm.setSecrType("复诊"); | |
538 | - hdm.setSecrResult("未通过"); | |
537 | + hdm.setSecrType(es.getScreenType()==1?"初筛":"复筛"); | |
538 | + hdm.setSecrResult(es.getScrIspass()==1?"通过":"未通过"); | |
539 | 539 | if (count > 0) {//儿童在医院里做过听力诊断记录,标记为已诊断 |
540 | 540 | hdm.setStatus("已诊断"); |
541 | 541 | alrScreens.add(hdm); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
7e991af
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
16 | 16 | import com.lyms.platform.operate.web.facade.BabyEarFacade; |
17 | 17 | import com.lyms.platform.operate.web.request.HearingDiagnoseRequest; |
18 | +import com.lyms.platform.operate.web.result.FrontEndResult; | |
18 | 19 | import com.lyms.platform.operate.web.result.HearingDiagnoseListResult; |
19 | 20 | import com.lyms.platform.permission.model.*; |
20 | 21 | import com.lyms.platform.permission.service.*; |
... | ... | @@ -379,7 +380,7 @@ |
379 | 380 | if (StringUtils.isNotEmpty(hdReq.getKeyWord())) {//关键字:姓名、联系方式、就诊卡 查询babyId |
380 | 381 | BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery(); |
381 | 382 | babyQuery.setQueryNo(hdReq.getKeyWord()); |
382 | - // babyQuery.setHospitalId(hospitalId); | |
383 | + babyQuery.setHospitalId(hospitalId); | |
383 | 384 | List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery); |
384 | 385 | if (CollectionUtils.isNotEmpty(models)) { |
385 | 386 | List<String> babyIds = new ArrayList<>(); |
386 | 387 | |
387 | 388 | |
388 | 389 | |
389 | 390 | |
390 | 391 | |
391 | 392 | |
392 | 393 | |
393 | 394 | |
394 | 395 | |
395 | 396 | |
... | ... | @@ -389,46 +390,53 @@ |
389 | 390 | scrQuery.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |
390 | 391 | query.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |
391 | 392 | } else { |
392 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); | |
393 | + return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); | |
393 | 394 | } |
394 | 395 | } |
395 | 396 | |
396 | - scrQuery.setCreateHospitalId(hospitalId); | |
397 | - //本院听筛数据 复筛未通过-待诊断 | |
398 | - List<String> babyIds = screenService.queryScrBabyIds(scrQuery); | |
399 | 397 | |
398 | + //是否需要查询听筛数据 | |
399 | + boolean isHdScr = true; | |
400 | + | |
400 | 401 | if(CollectionUtils.isNotEmpty(pids)){ |
401 | 402 | query.setPids((String[]) pids.toArray(new String[pids.size()])); |
402 | 403 | } |
403 | 404 | if(CollectionUtils.isEmpty(pids)&&hdReq.getSource()!=null){ |
404 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); | |
405 | + return new FrontEndResult().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); | |
405 | 406 | } |
406 | 407 | |
407 | 408 | if (hdReq.getDiagnoseStartTime() != null) {//诊断开始时间 |
408 | 409 | query.setDiagnoseStartTime(hdReq.getDiagnoseStartTime()); |
410 | + isHdScr = false; | |
409 | 411 | } |
410 | 412 | |
411 | 413 | if (hdReq.getDiagnoseEndTime() != null) {//诊断结束时间 |
412 | 414 | query.setDiagnoseEndTime(hdReq.getDiagnoseEndTime()); |
415 | + isHdScr = false; | |
413 | 416 | } |
414 | 417 | |
415 | 418 | if (hdReq.getDiagnDoctorId() != null) {//诊断医生 |
416 | 419 | query.setDiagnDoctorId(hdReq.getDiagnDoctorId()); |
420 | + isHdScr = false; | |
417 | 421 | } |
418 | 422 | |
419 | 423 | |
420 | 424 | if (hdReq.getDiagnNextStartTime() != null) {//预约下次开始诊断时间 |
421 | 425 | query.setDiagnNextStartTime(hdReq.getDiagnNextStartTime()); |
426 | + isHdScr = false; | |
422 | 427 | } |
423 | 428 | |
424 | 429 | if (hdReq.getDiagnNextEndTime() != null) {//预约下次结束诊断时间 |
425 | 430 | query.setDiagnNextEndTime(hdReq.getDiagnNextEndTime()); |
431 | + isHdScr = false; | |
426 | 432 | } |
427 | 433 | |
428 | 434 | if (hdReq.getIsconfirm() != null) {//是否确诊 0-未确诊 1-确诊 |
429 | 435 | query.setIsconfirm(hdReq.getIsconfirm()); |
436 | + isHdScr = false; | |
430 | 437 | } |
431 | - if (hdReq.getConfirmDegree() != null) {//模糊查询确诊程度 | |
438 | + if (hdReq.getConfirmDegree() != null) {//查询确诊程度 | |
439 | + isHdScr = false; | |
432 | 440 | List<String> cfList = new ArrayList<>(); |
433 | 441 | if (hdReq.getConfirmDegree() == 1) {//轻度 |
434 | 442 | cfList.add(",1,"); |
... | ... | @@ -453,7 +461,8 @@ |
453 | 461 | query.setConfirmResults(cfList.toArray(new String[cfList.size()])); |
454 | 462 | } |
455 | 463 | |
456 | - if (hdReq.getConfirmResult() != null) { | |
464 | + if (hdReq.getConfirmResult() != null) {//确诊程度 | |
465 | + isHdScr = false; | |
457 | 466 | List<String> cfList = new ArrayList<>(); |
458 | 467 | if (hdReq.getConfirmResult() == 1) {//轻度 |
459 | 468 | cfList.add(",1,"); |
460 | 469 | |
... | ... | @@ -480,10 +489,12 @@ |
480 | 489 | |
481 | 490 | |
482 | 491 | if (hdReq.getConfirmStartTime() != null) {//确诊开始时间 |
492 | + isHdScr = false; | |
483 | 493 | query.setConfirmStartTime(hdReq.getConfirmStartTime()); |
484 | 494 | } |
485 | 495 | |
486 | 496 | if (hdReq.getConfirmEndTime() != null) {//确诊结束时间 |
497 | + isHdScr = false; | |
487 | 498 | query.setConfirmEndTime(hdReq.getConfirmEndTime()); |
488 | 499 | } |
489 | 500 | |
... | ... | @@ -499,6 +510,14 @@ |
499 | 510 | List<HearingDiagnoseListResult> confiList = new ArrayList<>(); |
500 | 511 | //全部 |
501 | 512 | List<HearingDiagnoseListResult> hdrList = new ArrayList<>(); |
513 | + List<String> babyIds = new ArrayList<>(); | |
514 | + //需要查询听筛数据 | |
515 | + if(isHdScr){ | |
516 | + scrQuery.setCreateHospitalId(hospitalId); | |
517 | + //本院听筛数据 复筛未通过-待诊断 | |
518 | + babyIds = screenService.queryScrBabyIds(scrQuery); | |
519 | + } | |
520 | + | |
502 | 521 | |
503 | 522 | //添加已经诊断的数据 |
504 | 523 | for (BabyPatientExtendEarHearingDiagnose hd : hearingDiagnoseList) { |