|
|
|
@ -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<TreatmentPlanRecord> 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<NgSubgraph<String>> subgraphList = medicalRecDao.selectSubgraph(process.getGraphId());
|
|
|
|
|
|
|
|
|
|