static void Main(string[] args) { GetInfoSample(); GetAllConditions(); InfermedicaCondition condition = GetCondition("c_764"); Console.WriteLine("get condition #{0} ({1})", condition.Id, condition.Name); GetAllLabTests(); InfermedicaLabTest labTest = GetLabTest("lt_335"); Console.WriteLine("get labTest #{0} ({1})", labTest.Id, labTest.Name); GetAllRiskFactors(); InfermedicaRiskFactor riskFactor = GetRiskFactor("p_4"); Console.WriteLine("get riskFactor #{0} ({1})", riskFactor.Id, riskFactor.Name); GetAllSymptoms(); InfermedicaSymptom symptom = GetSymptom("s_277"); Console.WriteLine("get symptom #{0} ({1})", symptom.Id, symptom.Name); List <InfermedicaSearchResponseItem> responseItems = GetSearch("headache", Sex.Male, 8); foreach (InfermedicaSearchResponseItem responseItem in responseItems) { Console.WriteLine("{0}: labels={1}", responseItem.Id, String.Join(",", responseItem.Labels)); } // //FirstRequestDemo_HttpClient(); // FirstRequestDemo_WebRequest(); // //FirstRequestDemo_Info_WebRequest(); }
static InfermedicaLabTest GetLabTest(string labTestId) { string appId = ConfigurationManager.AppSettings["App-Id"]; string appKey = ConfigurationManager.AppSettings["App-Key"]; Infermedica infermedica = new Infermedica(new InfermedicaDataCache(new InfermedicaDataProvider(appId, appKey), @"..\..\Cache")); InfermedicaLabTest labTest = infermedica.GetLabTest(labTestId); return(labTest); }