private void ValidateResponseSpecialities(ResponseSpecialities responseSpecialities)
 {
     if (responseSpecialities.Success)
     {
         Specialities.Clear();
         foreach (Speciality speciality in responseSpecialities.MedicalSpecialites)
         {
             Specialities.Add(speciality);
         }
     }
 }
        private void FilterSpecialities()
        {
            TimetableCourseProject Context = new TimetableCourseProject();

            SpecialitiesDatabase = new ObservableCollection <Specialities>(Context.Specialities.ToList());
            context.Specialities.Load();
            if (Specialities != null)
            {
                Specialities.Clear();
                foreach (var obj in SpecialitiesDatabase)
                {
                    if (FilterSpecialities(obj))
                    {
                        Specialities.Add(obj);
                    }
                }
            }
        }
        private async void LoadSpeciality()
        {
            if (ServiceSelected != null)
            {
                dialogService.ShowProgress();
                RequestSpecialities requestSpecialities = new RequestSpecialities
                {
                    ServiceType = ServiceSelected.Code
                };
                ResponseSpecialities responseSpecialities = await apiService.GetSpecialties(requestSpecialities);

                dialogService.HideProgress();
                ValidateResponseSpecialities(responseSpecialities);
            }
            else
            {
                Specialities.Clear();
            }
        }