| | |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IPatArchiveService; |
| | | import com.smartor.service.IPatMedInhospService; |
| | |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | @Autowired |
| | | private PatArchivetagServiceImpl patArchivetagServiceImpl; |
| | | |
| | | |
| | | /** |
| | |
| | | patArchiveMapper.updatePatArchive(patArchive); |
| | | if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) { |
| | | //不需要服务了,需要通过patid和sendstate=2或者sendstate=1去查询一下,service_subtask里是否有正在执行的任务,有的话,立即停了 |
| | | ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO(); |
| | | ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity(); |
| | | serviceSubtaskVO.setPatid(patArchive.getId()); |
| | | serviceSubtaskVO.setSendstate(2L); |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO); |
| | |
| | | public List<PatArchive> patInfoByContion(PatArchiveReq patArchive) { |
| | | List<PatArchive> patArchives = new ArrayList<>(); |
| | | if (ObjectUtils.isNotEmpty(patArchive.getPageNum()) && ObjectUtils.isNotEmpty(patArchive.getPageSize())) { |
| | | patArchive.setPn(patArchive.getPageNum() * patArchive.getPageSize() - patArchive.getPageNum()); |
| | | patArchive.setPn((patArchive.getPageNum() - 1) * patArchive.getPageSize()); |
| | | patArchive.setPs(patArchive.getPageSize()); |
| | | patArchive.setPageNum(null); |
| | | patArchive.setPageSize(null); |
| | |
| | | } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 4) { |
| | | // 查看住院 1 查看门诊 2 查看体检 3 查看出院 4 |
| | | patArchiveReq.setCry(1); |
| | | log.info("--------查看出院的入参值为:{}", patArchiveReq); |
| | | List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchiveReq); |
| | | log.info("--------查看出院的返参值为:{}", patArchives1.size()); |
| | | if (CollectionUtils.isNotEmpty(patArchives1)) { |
| | | patArchiveList.addAll(patArchives1); |
| | | } |
| | | } |
| | | // //查询tagName |
| | | // List<Long> patIds = patArchiveList.stream().map(PatArchiveOthreInfo::getId).distinct().collect(Collectors.toList()); |
| | | // Map<Long, String> patTagMap= patArchivetagMapper.getTagsByPatIds(patArchiveReq.getOrgid(),patIds); |
| | | // //装配tagName |
| | | // if(ObjectUtils.isNotEmpty(patTagMap)){ |
| | | // patArchiveList.forEach(patArchiveOthreInfo -> { |
| | | // String tagName = patTagMap.get(patArchiveOthreInfo.getId()); |
| | | // if(StringUtils.isNotEmpty(tagName)){ |
| | | // patArchiveOthreInfo.setTag(tagName); |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | return patArchiveList; |
| | | } |
| | | |
| | | /** |
| | | * 获取患者信息(去重) |
| | | * |
| | | * @param patArchiveReq |
| | | * @return |
| | | */ |
| | | // @Override |
| | | /** |
| | | * 获取患者信息总数(去重) |
| | | * |
| | | * @param patArchiveReq |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Long getPatientInfoQCCount(PatArchiveReq patArchiveReq) { |
| | | if (CollectionUtils.isEmpty(patArchiveReq.getLeavehospitaldistrictcodes()) || patArchiveReq.getLeavehospitaldistrictcodes().size() == 0) { |
| | | patArchiveReq.setLeavehospitaldistrictcodes(null); |
| | | } |
| | | if (CollectionUtils.isEmpty(patArchiveReq.getLeaveldeptcodes()) || patArchiveReq.getLeaveldeptcodes().size() == 0) { |
| | | patArchiveReq.setLeaveldeptcodes(null); |
| | | } |
| | | |
| | | Long count = 0L; |
| | | if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 1) { |
| | | // 查看住院 1 查看门诊 2 查看体检 3 查看出院 4 |
| | | patArchiveReq.setCry(0); |
| | | count = patArchiveMapper.countPatArchiveInfoByInhospQC(patArchiveReq); |
| | | } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 2) { |
| | | // 查看住院 1 查看门诊 2 查看体检 3 查看出院 4 |
| | | count = patArchiveMapper.countPatArchiveInfoByOuthospQC(patArchiveReq); |
| | | } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 3) { |
| | | // 查看住院 1 查看门诊 2 查看体检 3 查看出院 4 |
| | | count = patArchiveMapper.countPatArchiveInfoByPhysicalQC(patArchiveReq); |
| | | } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 4) { |
| | | // 查看住院 1 查看门诊 2 查看体检 3 查看出院 4 |
| | | patArchiveReq.setCry(1); |
| | | count = patArchiveMapper.countPatArchiveInfoByInhospQC(patArchiveReq); |
| | | } |
| | | |
| | | return count; |
| | | } |
| | | } |
| | | |