| | |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.smartor.common.DistinctByProperty; |
| | | import com.smartor.domain.*; |
| | | import com.ruoyi.outpatientvisit.domain.PatMedOuthospError; |
| | | import com.ruoyi.outpatientvisit.domain.PatMedOuthosp; |
| | | import com.ruoyi.inhospvisit.api.InhospVisitFacade; |
| | | import com.ruoyi.inhospvisit.domain.PatMedInhosp; |
| | | import com.smartor.mapper.*; |
| | | import com.ruoyi.outpatientvisit.mapper.PatMedOuthospErrorMapper; |
| | | import com.smartor.service.IPatArchiveService; |
| | | import com.smartor.service.IPatMedInhospService; |
| | | import com.smartor.service.IPatMedOuthospService; |
| | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | @Autowired |
| | | private PatMedInhospMapper patMedInhospMapper; |
| | | private InhospVisitFacade inhospVisitFacade; |
| | | |
| | | @Autowired |
| | | private PatMedOuthospErrorMapper patMedOuthospErrorMapper; |
| | |
| | | } |
| | | |
| | | private Boolean inHospitalDate(List<ServiceSLTDInhospResDTO> resultList, String cry) { |
| | | int failCount = 0; |
| | | for (ServiceSLTDInhospResDTO dto : resultList) { |
| | | if (Objects.isNull(dto)) continue; |
| | | PatArchive patArchive = processPatientArchive(dto); |
| | | processPatientInhospInfo(dto, patArchive, cry); |
| | | try { |
| | | PatArchive patArchive = processPatientArchive(dto); |
| | | processPatientInhospInfo(dto, patArchive, cry); |
| | | } catch (Exception e) { |
| | | failCount++; |
| | | log.error("【inHospitalDate】单条记录处理失败,已跳过继续采集。state={}, serialnum={}, patname={}, patno={}, orgid={}, campusId={}", |
| | | cry, dto.getHealthcareRecordNo(), dto.getPatientName(), dto.getMedicalRecordNo(), |
| | | dto.getOrgId(), dto.getCampusId(), e); |
| | | } |
| | | } |
| | | if (failCount > 0) { |
| | | log.warn("【inHospitalDate】本页共{}条,失败{}条已跳过,其余{}条处理完成,state={}", |
| | | resultList.size(), failCount, resultList.size() - failCount, cry); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | if (pmIn.getStarttime() != null) { |
| | | Date dayStart = DateUtils.truncate(pmIn.getStarttime(), Calendar.DAY_OF_MONTH); |
| | | Date dayEnd = DateUtils.addDays(dayStart, 1); |
| | | List<PatMedInhosp> outInhosps = patMedInhospMapper.selectOutInhospByPatnoAndOutDate( |
| | | List<PatMedInhosp> outInhosps = inhospVisitFacade.selectOutInhospByPatnoAndOutDate( |
| | | StringUtils.trim(pmIn.getPatno()), dayStart, dayEnd); |
| | | if (CollectionUtils.isNotEmpty(outInhosps)) { |
| | | //存在出院记录,说明该患者是再入院,把上一次出院产生的子任务改成不执行 |