public static bool IEExecute(ref vMRClsDef.IEvMRInput oIEvMRInput, ref vMRClsDef.IEvMROutput oIEvMROutput) { if (ObtainDataModel(ref oIEvMRInput)) { if (DataMapper.MapDataToFact(ref oIEvMRInput)) { if (vMRFunDef.vMRDataValueFromUItoIE(oIEvMRInput, ref oIEvMROutput)) { //获取推理解释结果成功 //结果转换为UI可用形式 StructedIEResult.AddIEStructedInfo(oIEvMROutput); DataMapper.MapIEOutputToUI(oIEvMRInput, oIEvMROutput); return(true); } else { //获取推理解释结果失败 return(false); } } else { //获取Fact失败 return(false); } } else { //获取DataModel失败 return(false); } }
/// <summary> /// 推理接口调用 /// </summary> /// <returns></returns> public static bool InfernceExplanationExecute() { StructedIEResult.ClearIEStructedInfo(); GlobalData.DiagnosedResult.Clear(); IEExecute(ref oDiagnoseIEvMRInput, ref oDiagnoseIEvMROutput); IEExecute(ref oMSEvaluationIEvMRInput, ref oMSEvaluationIEvMROutput); IEExecute(ref oRiskEvaluationIEvMRInput, ref oRiskEvaluationIEvMROutput); IEExecute(ref oTherpayIEvMRInput, ref oTherpayIEvMROutput); IEExecute(ref oSelfMonitorIEvMRInput, ref oSelfMonitorIEvMROutput); IEExecute(ref oDietaryIEvMRInput, ref oDietaryIEvMROutput); IEExecute(ref oPhysicalActivityIEvMRInput, ref oPhysicalActivityIEvMROutput); return(true); }