public async void GetObservationsAsync() { if (monitoringPressure) { var retrievedObservations = await observationRepository.GetByPatientAndBloodPressure(PatientId); foreach (var o in retrievedObservations) { if (Observations.Where(observation => observation.Id == o.Id).ToList().Count() == 0) { Observations.Add(o); } } } if (monitoringCholesterol) { var retrievedObservations = await observationRepository.GetByPatientAndTotalCholesterol(PatientId); foreach (var o in retrievedObservations) { if (Observations.Where(observation => observation.Id == o.Id).ToList().Count() == 0) { Observations.Add(o); } } } if (monitoringTobacco) { var retrievedObservations = await observationRepository.GetByPatientAndTobacco(PatientId); foreach (var o in retrievedObservations) { if (Observations.Where(observation => observation.Id == o.Id).ToList().Count() == 0) { Observations.Add(o); } } } foreach (var o in Observations) { foreach (var observer in Observers) { observer.OnNext(o); } } }