优化知识图谱

dev_2.1.0
liu 1 year ago
parent e14423db56
commit c250c9b8a8

@ -102,14 +102,14 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
processMedicalVertex.setNodeValue("病历(" + DateUtil.format(processMedical.getCreateTime(), "yyyy-MM-dd") + ")"); processMedicalVertex.setNodeValue("病历(" + DateUtil.format(processMedical.getCreateTime(), "yyyy-MM-dd") + ")");
processMedicalDao.insert(processMedicalVertex); processMedicalDao.insert(processMedicalVertex);
medicalRecDao.insertEdge(medicalRecVertex, new NoPropertyEdge(), processMedicalVertex); medicalRecDao.insertEdge(medicalRecVertex, new SinglePropertyEdge("电子病历"), processMedicalVertex);
// 创建主诉节点 // 创建主诉节点
if (StrUtil.isNotBlank(processMedical.getPatientSelfDesc())) { if (StrUtil.isNotBlank(processMedical.getPatientSelfDesc())) {
SelfDescVertex selfDescVertex = new SelfDescVertex(); SelfDescVertex selfDescVertex = new SelfDescVertex();
selfDescVertex.setNodeValue(processMedical.getPatientSelfDesc()); selfDescVertex.setNodeValue(processMedical.getPatientSelfDesc());
selfDescDao.insert(selfDescVertex); selfDescDao.insert(selfDescVertex);
// 保存节点之间的关系 // 保存节点之间的关系
processMedicalDao.insertEdge(processMedicalVertex, new NoPropertyEdge(), selfDescVertex); processMedicalDao.insertEdge(processMedicalVertex, new SinglePropertyEdge("主诉"), selfDescVertex);
} }
// 创建现病史节点 // 创建现病史节点
if (StrUtil.isNotBlank(processMedical.getIllnessHistory())) { if (StrUtil.isNotBlank(processMedical.getIllnessHistory())) {
@ -117,7 +117,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
illnessHistoryVertex.setNodeValue(processMedical.getIllnessHistory()); illnessHistoryVertex.setNodeValue(processMedical.getIllnessHistory());
illnessHistoryDao.insert(illnessHistoryVertex); illnessHistoryDao.insert(illnessHistoryVertex);
// 保存节点之间的关系 // 保存节点之间的关系
processMedicalDao.insertEdge(processMedicalVertex, new NoPropertyEdge(), illnessHistoryVertex); processMedicalDao.insertEdge(processMedicalVertex, new SinglePropertyEdge("现病史"), illnessHistoryVertex);
} }
// 创建个人史节点 // 创建个人史节点
if (StrUtil.isNotBlank(processMedical.getPersonalHistory())) { if (StrUtil.isNotBlank(processMedical.getPersonalHistory())) {
@ -125,7 +125,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
personalHistoryVertex.setNodeValue(processMedical.getPersonalHistory()); personalHistoryVertex.setNodeValue(processMedical.getPersonalHistory());
personalHistoryDao.insert(personalHistoryVertex); personalHistoryDao.insert(personalHistoryVertex);
// 保存节点之间的关系 // 保存节点之间的关系
processMedicalDao.insertEdge(processMedicalVertex, new NoPropertyEdge(), personalHistoryVertex); processMedicalDao.insertEdge(processMedicalVertex, new SinglePropertyEdge("个人史"), personalHistoryVertex);
} }
// 创建过敏史节点 // 创建过敏史节点
if (ObjectUtil.isNotEmpty(processMedical.getAllergyHistoryFlag()) && 1 == processMedical.getAllergyHistoryFlag() && StrUtil.isNotBlank(processMedical.getAllergyHistory())) { if (ObjectUtil.isNotEmpty(processMedical.getAllergyHistoryFlag()) && 1 == processMedical.getAllergyHistoryFlag() && StrUtil.isNotBlank(processMedical.getAllergyHistory())) {
@ -133,7 +133,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
allergyHistoryVertex.setNodeValue(processMedical.getAllergyHistory()); allergyHistoryVertex.setNodeValue(processMedical.getAllergyHistory());
allergyHistoryDao.insert(allergyHistoryVertex); allergyHistoryDao.insert(allergyHistoryVertex);
// 保存节点之间的关系 // 保存节点之间的关系
processMedicalDao.insertEdge(processMedicalVertex, new NoPropertyEdge(), allergyHistoryVertex); processMedicalDao.insertEdge(processMedicalVertex, new SinglePropertyEdge("过敏史"), allergyHistoryVertex);
} }
// 创建既往史节点 // 创建既往史节点
if (ObjectUtil.isNotEmpty(processMedical.getPreviousHistoryFlag()) && 1 == processMedical.getPreviousHistoryFlag() && StrUtil.isNotBlank(processMedical.getPreviousHistory())) { if (ObjectUtil.isNotEmpty(processMedical.getPreviousHistoryFlag()) && 1 == processMedical.getPreviousHistoryFlag() && StrUtil.isNotBlank(processMedical.getPreviousHistory())) {
@ -141,7 +141,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
previousHistoryVertex.setNodeValue(processMedical.getPreviousHistory()); previousHistoryVertex.setNodeValue(processMedical.getPreviousHistory());
previousHistoryDao.insert(previousHistoryVertex); previousHistoryDao.insert(previousHistoryVertex);
// 保存节点之间的关系 // 保存节点之间的关系
processMedicalDao.insertEdge(processMedicalVertex, new NoPropertyEdge(), previousHistoryVertex); processMedicalDao.insertEdge(processMedicalVertex, new SinglePropertyEdge("个人史"), previousHistoryVertex);
} }
// 创建家族史节点 // 创建家族史节点
if (ObjectUtil.isNotEmpty(processMedical.getFamilyHistoryFlag()) && 1 == processMedical.getFamilyHistoryFlag() && StrUtil.isNotBlank(processMedical.getFamilyHistory())) { if (ObjectUtil.isNotEmpty(processMedical.getFamilyHistoryFlag()) && 1 == processMedical.getFamilyHistoryFlag() && StrUtil.isNotBlank(processMedical.getFamilyHistory())) {
@ -149,7 +149,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
familyHistoryVertex.setNodeValue(processMedical.getFamilyHistory()); familyHistoryVertex.setNodeValue(processMedical.getFamilyHistory());
familyHistoryDao.insert(familyHistoryVertex); familyHistoryDao.insert(familyHistoryVertex);
// 保存节点之间的关系 // 保存节点之间的关系
processMedicalDao.insertEdge(processMedicalVertex, new NoPropertyEdge(), familyHistoryVertex); processMedicalDao.insertEdge(processMedicalVertex, new SinglePropertyEdge("家族史"), familyHistoryVertex);
} }
// 创建手术史节点 // 创建手术史节点
if (ObjectUtil.isNotEmpty(processMedical.getOperationHistory()) && 1 == processMedical.getOperationHistoryFlag() && StrUtil.isNotBlank(processMedical.getOperationHistory())) { if (ObjectUtil.isNotEmpty(processMedical.getOperationHistory()) && 1 == processMedical.getOperationHistoryFlag() && StrUtil.isNotBlank(processMedical.getOperationHistory())) {
@ -157,7 +157,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
operationHistoryVertex.setNodeValue(processMedical.getOperationHistory()); operationHistoryVertex.setNodeValue(processMedical.getOperationHistory());
operationHistoryDao.insert(operationHistoryVertex); operationHistoryDao.insert(operationHistoryVertex);
// 保存节点之间的关系 // 保存节点之间的关系
processMedicalDao.insertEdge(processMedicalVertex, new NoPropertyEdge(), operationHistoryVertex); processMedicalDao.insertEdge(processMedicalVertex, new SinglePropertyEdge("手术史"), operationHistoryVertex);
} }
@ -175,7 +175,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
PhysicalVertex physicalVertex = new PhysicalVertex(); PhysicalVertex physicalVertex = new PhysicalVertex();
physicalVertex.setNodeValue(tool.getToolName() + (location != null ? ("-" + location.getLocationName()) : "")); physicalVertex.setNodeValue(tool.getToolName() + (location != null ? ("-" + location.getLocationName()) : ""));
physicalDao.insert(physicalVertex); physicalDao.insert(physicalVertex);
processMedicalDao.insertEdge(medicalRecVertex, new NoPropertyEdge(), physicalVertex); processMedicalDao.insertEdge(medicalRecVertex, new SinglePropertyEdge("体格检查"), physicalVertex);
// 获取查询结果,增加到结果节点中 // 获取查询结果,增加到结果节点中
PhysicalResultVertex physicalResultVertex = new PhysicalResultVertex(); PhysicalResultVertex physicalResultVertex = new PhysicalResultVertex();
physicalResultVertex.setNodeValue(physicalRecord.getResult()); physicalResultVertex.setNodeValue(physicalRecord.getResult());
@ -198,7 +198,7 @@ public class GraphNebulaServiceImpl implements GraphNebulaService {
ancillaryVertex.setNodeValue(configAncillaryItem.getItemName()); ancillaryVertex.setNodeValue(configAncillaryItem.getItemName());
ancillaryDao.insert(ancillaryVertex); ancillaryDao.insert(ancillaryVertex);
// 保存病历和辅助检查连线 // 保存病历和辅助检查连线
medicalRecDao.insertEdge(medicalRecVertex, new NoPropertyEdge(), ancillaryVertex); medicalRecDao.insertEdge(medicalRecVertex, new SinglePropertyEdge("辅助检查"), ancillaryVertex);
// 结果节点 // 结果节点
AncillaryResultVertex ancillaryResultVertex = new AncillaryResultVertex(); AncillaryResultVertex ancillaryResultVertex = new AncillaryResultVertex();
ancillaryResultVertex.setNodeValue(diagnosisAncillaryRecord.getResult()); ancillaryResultVertex.setNodeValue(diagnosisAncillaryRecord.getResult());

@ -20,12 +20,6 @@ public class ChartNodeVO {
@ApiModelProperty("评分级别( (0-60) 不合格 [60,75)合格 [75,85)良好 [85,100]优秀,") @ApiModelProperty("评分级别( (0-60) 不合格 [60,75)合格 [75,85)良好 [85,100]优秀,")
private String scoreLevel; private String scoreLevel;
/**
* =
*/
@ApiModelProperty("总数")
private Integer total;
/** /**
* *
*/ */

@ -412,7 +412,6 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
ChartNodeVO chartNodeVO = new ChartNodeVO(); ChartNodeVO chartNodeVO = new ChartNodeVO();
chartNodeVO.setNodePer(clinicalThinking); chartNodeVO.setNodePer(clinicalThinking);
chartNodeVO.setScoreLevel(chartNodeVO.computeScoreLevel()); chartNodeVO.setScoreLevel(chartNodeVO.computeScoreLevel());
chartNodeVO.setTotal(NumberUtil.add(askChart.getTotal(), physicalChart.getTotal(), ancillaryChart.getTotal(), treatmentPlanChart.getTotal()).intValue());
chartNodeVO.setCorrect(NumberUtil.add(askChart.getCorrect(), physicalChart.getCorrect(), ancillaryChart.getCorrect(), treatmentPlanChart.getCorrect()).intValue()); chartNodeVO.setCorrect(NumberUtil.add(askChart.getCorrect(), physicalChart.getCorrect(), ancillaryChart.getCorrect(), treatmentPlanChart.getCorrect()).intValue());
chartNodeVO.setUnCorrect(NumberUtil.add(askChart.getUnCorrect(), physicalChart.getUnCorrect(), ancillaryChart.getUnCorrect(), treatmentPlanChart.getUnCorrect()).intValue()); chartNodeVO.setUnCorrect(NumberUtil.add(askChart.getUnCorrect(), physicalChart.getUnCorrect(), ancillaryChart.getUnCorrect(), treatmentPlanChart.getUnCorrect()).intValue());
chartNodeVO.setStandard(NumberUtil.add(askChart.getStandard(), physicalChart.getStandard(), ancillaryChart.getStandard(), treatmentPlanChart.getStandard()).intValue()); chartNodeVO.setStandard(NumberUtil.add(askChart.getStandard(), physicalChart.getStandard(), ancillaryChart.getStandard(), treatmentPlanChart.getStandard()).intValue());
@ -472,7 +471,6 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
chartNodeVO.setCorrect(hitPlanCount); chartNodeVO.setCorrect(hitPlanCount);
chartNodeVO.setUnCorrect(medicalCount - hitPlanCount); chartNodeVO.setUnCorrect(medicalCount - hitPlanCount);
chartNodeVO.setStandard(medicalCount); chartNodeVO.setStandard(medicalCount);
chartNodeVO.setTotal(NumberUtil.add(chartNodeVO.getUnCorrect(), chartNodeVO.getStandard(), chartNodeVO.getCorrect()).intValue());
return chartNodeVO; return chartNodeVO;
@ -504,7 +502,6 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
chartNodeVO.setCorrect(userHitCount); chartNodeVO.setCorrect(userHitCount);
chartNodeVO.setUnCorrect(medicalCount - userHitCount); chartNodeVO.setUnCorrect(medicalCount - userHitCount);
chartNodeVO.setStandard(medicalCount); chartNodeVO.setStandard(medicalCount);
chartNodeVO.setTotal(NumberUtil.add(chartNodeVO.getUnCorrect(), chartNodeVO.getStandard(), chartNodeVO.getCorrect()).intValue());
return chartNodeVO; return chartNodeVO;
} }
@ -537,7 +534,6 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
chartNodeVO.setCorrect(userHitCount); chartNodeVO.setCorrect(userHitCount);
chartNodeVO.setUnCorrect(medicalCount - userHitCount); chartNodeVO.setUnCorrect(medicalCount - userHitCount);
chartNodeVO.setStandard(medicalCount); chartNodeVO.setStandard(medicalCount);
chartNodeVO.setTotal(NumberUtil.add(chartNodeVO.getUnCorrect(), chartNodeVO.getStandard(), chartNodeVO.getCorrect()).intValue());
return chartNodeVO; return chartNodeVO;
} }
@ -584,7 +580,6 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
chartNodeVO.setCorrect(userHitQuestionCount); chartNodeVO.setCorrect(userHitQuestionCount);
chartNodeVO.setStandard(Integer.parseInt(String.valueOf(medicalQuestionCount))); chartNodeVO.setStandard(Integer.parseInt(String.valueOf(medicalQuestionCount)));
chartNodeVO.setUnCorrect(NumberUtil.sub(chartNodeVO.getStandard(), chartNodeVO.getCorrect()).intValue()); chartNodeVO.setUnCorrect(NumberUtil.sub(chartNodeVO.getStandard(), chartNodeVO.getCorrect()).intValue());
chartNodeVO.setTotal(NumberUtil.add(chartNodeVO.getUnCorrect(), chartNodeVO.getStandard(), chartNodeVO.getCorrect()).intValue());
return chartNodeVO; return chartNodeVO;
} }

Loading…
Cancel
Save