static List <HealthSymptomSelector> LoadSublocationSymptoms(int subLocId) { List <HealthSymptomSelector> symptoms = _diagnosisClient.LoadSublocationSymptoms(subLocId, SelectorStatus.Man); if (symptoms == null || symptoms.Count == 0) { Console.WriteLine("Empty body sublocations symptoms results"); return(null); } WriteHeaderMessage("Body sublocations symptoms:"); foreach (var sym in symptoms) { Console.WriteLine(sym.Name); } int randomSymptomIndex = GetRandom(symptoms.Count); randomSymptomIndex = GetRandom(symptoms.Count); HealthSymptomSelector randomSymptom = symptoms[randomSymptomIndex]; WriteHeaderMessage(string.Format("Randomly selected symptom: {0}", randomSymptom.Name)); List <HealthSymptomSelector> selectedSymptoms = new List <HealthSymptomSelector>(); selectedSymptoms.Add(randomSymptom); LoadRedFlag(randomSymptom); return(selectedSymptoms); }
static void LoadRedFlag(HealthSymptomSelector selectedSymptom) { string redFlag = string.Format("Symptom {0} has no red flag", selectedSymptom.Name); if (selectedSymptom.HasRedFlag) { redFlag = _diagnosisClient.LoadRedFlag(selectedSymptom.ID); } WriteHeaderMessage(redFlag); }