From 660097c1d83d471769379972955b90447296bf24 Mon Sep 17 00:00:00 2001 From: liu Date: Thu, 29 Feb 2024 16:13:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=89=B2=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/supervision/service/GraphNebulaService.java | 2 +- .../supervision/service/impl/GraphNebulaServiceImpl.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/virtual-patient-graph/src/main/java/com/supervision/service/GraphNebulaService.java b/virtual-patient-graph/src/main/java/com/supervision/service/GraphNebulaService.java index 009af60c..60113101 100644 --- a/virtual-patient-graph/src/main/java/com/supervision/service/GraphNebulaService.java +++ b/virtual-patient-graph/src/main/java/com/supervision/service/GraphNebulaService.java @@ -7,7 +7,7 @@ import java.util.List; public interface GraphNebulaService { - void creatGraphByNebula(String processId); + String creatGraphByNebula(String processId); GraphVO queryGraph(String processId, Integer level); diff --git a/virtual-patient-graph/src/main/java/com/supervision/service/impl/GraphNebulaServiceImpl.java b/virtual-patient-graph/src/main/java/com/supervision/service/impl/GraphNebulaServiceImpl.java index 3fb9bd3b..d997d4b0 100644 --- a/virtual-patient-graph/src/main/java/com/supervision/service/impl/GraphNebulaServiceImpl.java +++ b/virtual-patient-graph/src/main/java/com/supervision/service/impl/GraphNebulaServiceImpl.java @@ -80,7 +80,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService { private AncillaryResultDao ancillaryResultDao; @Override - public void creatGraphByNebula(String processId) { + public String creatGraphByNebula(String processId) { Process process = Optional.ofNullable(processService.getById(processId)).orElseThrow(() -> new BusinessException("未找到流程,创建图谱失败")); // 根据processId找到对应的诊疗计划,如果没有找到,说明治疗流程未完成,诊断失败 List treatmentPlanRecordList = treatmentPlanRecordService.lambdaQuery().eq(TreatmentPlanRecord::getProcessId, processId).list(); @@ -244,6 +244,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService { } log.info("病历图谱ID:{}", medicalRecVertex.getId()); processService.lambdaUpdate().set(Process::getGraphId, medicalRecVertex.getId()).eq(Process::getId, processId).update(); + return medicalRecVertex.getId(); } @@ -252,8 +253,8 @@ public class GraphNebulaServiceImpl implements GraphNebulaService { Process process = Optional.ofNullable(processService.getById(processId)).orElseThrow(() -> new BusinessException("未找到对应的问诊流程")); // 如果图谱ID为空,则创建图谱 if (StrUtil.isEmpty(process.getGraphId())) { - creatGraphByNebula(processId); - process = Optional.ofNullable(processService.getById(processId)).orElseThrow(() -> new BusinessException("未找到对应的问诊流程")); + String graphId = creatGraphByNebula(processId); + process.setGraphId(graphId); } List> subgraphList = medicalRecDao.selectSubgraph(process.getGraphId());