예제 #1
0
        public static void ConstructInferResult(ClipsEngine.Result oClipsInferResult,
                                                List <vMRClsDef.DataModel> lstNewFact, ref vMRClsDef.OutputInfo oOutputInfo)
        {
            //触发事件的中文名信息获取
            oOutputInfo.oTriggeringEvent.oEvent.strEventCNName = ClipsFactObtain.ObtainEventCNNamewithEventName(oOutputInfo);
            //诊断或治疗结构化推理结论
            oOutputInfo.oInference.lstStructedInferMessage.AddRange(lstNewFact);

            //诊断、治疗和自我监测非结构化推理结论
            for (int i = 0; i < oClipsInferResult.Recommendations.Count; i++)
            {
                vMRClsDef.UnStructMessage oRecommendation = new vMRClsDef.UnStructMessage();
                oRecommendation.strUnStructMessage = oClipsInferResult.Recommendations[i];
                oOutputInfo.oInference.lstUnstructedInferenceMessage.Add(oRecommendation);
            }

            //推理所缺数据
            for (int j = 0; j < oClipsInferResult.DataNotice.Data.Count; j++)
            {
                vMRClsDef.DataModel oShortDataModel = new vMRClsDef.DataModel();
                oShortDataModel.strDataName   = oClipsInferResult.DataNotice.Data[j];
                oShortDataModel.strDataCNName = ClipsFactObtain.ObtainDataCNNamewithDataName(oOutputInfo, oShortDataModel.strDataName);
                oOutputInfo.lstShortDataModel.Add(oShortDataModel);
            }

            //解释过程
            for (int k = 0; k < oClipsInferResult.lstInInterpretation.Count; k++)
            {
                ExplanationService.ConstructExplanation(oClipsInferResult.lstInInterpretation[k], ref oOutputInfo);
            }
        }
예제 #2
0
        public static bool ObtainEventList(ref List <vMRClsDef.TriggeringEvent> lstTriggeringEvent)
        {
            if (ClipsFactObtain.lstTriggeringEvents.Count == 0)
            {
                ClipsFactObtain.ObtainTriggeringEventListFromCLIPSDataModel();
            }

            lstTriggeringEvent.AddRange(ClipsFactObtain.lstTriggeringEvents);
            return(true);
        }
예제 #3
0
 public static bool ObtainConcludeWithEvent(string strEvent, ref List <vMRClsDef.DataModel> lstNewFact)
 {
     return(ClipsFactObtain.ObtainConcludeWithEventFromCLIPSDataModel(strEvent, ref lstNewFact));
 }
예제 #4
0
 /// <summary>
 /// 根据Symptoms获取数据模型
 /// </summary>
 /// <param name="oInputDataModel"></param>
 /// <returns></returns>
 public static bool ObtainFactWithSymptoms(ref vMRClsDef.InputDataModel oInputDataModel)
 {
     return(ClipsFactObtain.ObtainDataModelWithSymptomsFromCLIPSDataModel(ref oInputDataModel));
 }
예제 #5
0
 /// <summary>
 /// 根据疾病获取数据模型
 /// </summary>
 /// <param name="oInputDataModel"></param>
 /// <returns></returns>
 public static bool ObtainFactWithDisease(ref vMRClsDef.InputDataModel oInputDataModel)
 {
     return(ClipsFactObtain.ObtainDataModelWithEventFromCLIPSDataModel(ref oInputDataModel));
 }