| | |
| | | import com.ruoyi.common.core.service.PublicityApi; |
| | | import com.ruoyi.common.core.service.PublicityDataPort; |
| | | import com.ruoyi.common.core.service.dto.InHospPublicityRowDto; |
| | | import com.ruoyi.common.core.service.dto.VisitInhospUpdateDto; |
| | | import com.ruoyi.common.core.service.dto.VisitTaskRuleDto; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.core.service.dto.VisitArchiveRow; |
| | |
| | | |
| | | // 原 L331-409 + L411-444:两段宣教改为回调宣教模块 |
| | | // ⚠️ 这里不再内联实现 —— 否则会与 ruoyi-publicity 里的实现"发两遍" |
| | | dealInHospPublicityAndMedical(config); |
| | | // dealInHospPublicityAndMedical(config); |
| | | |
| | | // 原 L445-451:基于规则的出院随访 + 手术随访 |
| | | addSubTaskByRule(config, patMedInhosps); |
| | |
| | | // 原 L1692-1700:获取患者基本信息,为空则写 deptcheck=2 + reason |
| | | VisitArchiveRow archive = archiveMapper.selectByPatid(row.getPatid()); |
| | | if (archive == null) { |
| | | com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u = |
| | | new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto(); |
| | | VisitInhospUpdateDto u = new VisitInhospUpdateDto(); |
| | | u.setInhospid(row.getInhospid()); |
| | | u.setDeptcheckFlag("2"); |
| | | u.setLongTaskReason("患者基本信息为空"); |
| | |
| | | // 原 L1839-1845(在编排器里也有,但外层遍历这一层原实现没有 try/catch; |
| | | // 这里加一层是为了"单患者失败不影响其它患者",属健壮性改进,已登记) |
| | | log.error("【基于规则】患者{}外层处理异常:{}", row.getInhospid(), e.getMessage()); |
| | | com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u = |
| | | new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto(); |
| | | com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u = new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto(); |
| | | u.setInhospid(row.getInhospid()); |
| | | u.setDeptcheckFlag("2"); |
| | | u.setLongTaskReason("基于规则处理异常"); |
| | |
| | | * @return 原实现固定返回 1 |
| | | */ |
| | | public int dealOutHospInfoBySchedule(String config) { |
| | | log.warn("【出入院随访】dealOutHospInfoBySchedule 本次未搬迁(含手术分支与任务组 builder," |
| | | + "属第二批 ruoyi-othervisit 范围),仍由 smartor 的实现承接。config={}", config); |
| | | log.warn("【出入院随访】dealOutHospInfoBySchedule 本次未搬迁(含手术分支与任务组 builder," + "属第二批 ruoyi-othervisit 范围),仍由 smartor 的实现承接。config={}", config); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | // 辅助 |
| | | // ========================================================================== |
| | | |
| | | /** 原 L1703-1707:按离院科室/病区查规则(取不到端口时返回 null = 未配置规则 → 全部生成) */ |
| | | /** |
| | | * 原 L1703-1707:按离院科室/病区查规则(取不到端口时返回 null = 未配置规则 → 全部生成) |
| | | */ |
| | | private VisitTaskRuleDto findTaskRule(VisitInhospRow row) { |
| | | PublicityDataPort port = dataPort(); |
| | | if (port == null) { |
| | | log.warn("【出入院随访】PublicityDataPort 不可用,规则按「未配置」处理(全部生成)。inhospid={}", |
| | | row.getInhospid()); |
| | | log.warn("【出入院随访】PublicityDataPort 不可用,规则按「未配置」处理(全部生成)。inhospid={}", row.getInhospid()); |
| | | return null; |
| | | } |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | /** 把端口的规则 DTO 适配成编排器内嵌的规则视图(字段一一对应,含拼错的 {@code wradRule}) */ |
| | | /** |
| | | * 把端口的规则 DTO 适配成编排器内嵌的规则视图(字段一一对应,含拼错的 {@code wradRule}) |
| | | */ |
| | | private InhospTaskOrchestrator.VisitTaskRule toOrchestratorRule(VisitTaskRuleDto dto) { |
| | | if (dto == null) { |
| | | return null; |
| | |
| | | return r; |
| | | } |
| | | |
| | | private void updateInhosp(com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u) { |
| | | private void updateInhosp(VisitInhospUpdateDto u) { |
| | | PublicityDataPort port = dataPort(); |
| | | if (port == null) { |
| | | log.warn("【出入院随访】PublicityDataPort 不可用,无法写回标志位。inhospid={}", u.getInhospid()); |