Commit 469168de495e1912428d2e1587ca1b4d75222a30

Authored by haorp
1 parent 1b0622917b
Exists in dev

产妇转诊

Showing 2 changed files with 36 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyScreeningController.java View file @ 469168d
... ... @@ -70,6 +70,19 @@
70 70 }
71 71  
72 72 /**
  73 + * 转诊列表查询2
  74 + *
  75 + * @return
  76 + */
  77 + @RequestMapping(method = RequestMethod.GET, value = "/queryMedicalRecord")
  78 + @ResponseBody
  79 + @TokenRequired
  80 + public BaseResponse queryMedicalRecord2(@Valid ApplyScreeningQueryRequest screeningQueryRequest, HttpServletRequest request) {
  81 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  82 + return applyScreeningFacade.queryMedicalRecord2(screeningQueryRequest,loginState.getId());
  83 + }
  84 +
  85 + /**
73 86 * 转诊详细信息查询
74 87 *
75 88 * @return
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyScreeningFacade.java View file @ 469168d
... ... @@ -610,6 +610,29 @@
610 610 return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(pageInfo);
611 611 }
612 612  
  613 + public BaseListResponse queryMedicalRecord2(ApplyScreeningQueryRequest applyScreeningQueryRequest,Integer userId) {
  614 + ReferralApplyScreeningQuery query = new ReferralApplyScreeningQuery();
  615 + query.setCardNo(applyScreeningQueryRequest.getCardNo());
  616 + query.setHospitalId("2100002419");
  617 + Users serviceUsers = usersService.getUsers(userId);
  618 + if(serviceUsers != null){
  619 + // 不是主任的就按当前账号医生分
  620 + if(serviceUsers.getZhiChenId() != 4){
  621 + Departments departments = departmentsService.getDepartments(serviceUsers.getDeptId());
  622 + if(departments != null ){
  623 + query.setTransferredDepartment(departments.getName());
  624 + }
  625 + }
  626 + }
  627 + List<ReferralApplyScreeningModel> screeningModels =
  628 + applyScreeningService.queryReferralApplyScreeningWithQuery(query);
  629 + if (CollectionUtils.isEmpty(screeningModels)){
  630 + return new BaseListResponse().setData(screeningModels).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("未查询到相关数据");
  631 + }
  632 +
  633 + return new BaseListResponse().setData(screeningModels).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(query.getPageInfo());
  634 + }
  635 +
613 636 public BaseResponse queryMedicalInfo(ApplyScreeningQueryRequest applyScreeningQueryRequest,Integer userId) {
614 637 PatientBaseResult patientBaseResult = new PatientBaseResult();
615 638 MedicalRecordVo medicalRecordVo = new MedicalRecordVo();