示例#1
0
        public async Task <bool> VerifyAdmittedPatientAsync(ApiSettings settings, string code)
        {
            HospitalDataService hospSvc = new HospitalDataService(settings);
            bool result = await hospSvc.VerifyAdmissionAsync(ID, code);

            return(result);
        }
示例#2
0
        private void OnNewRegion()
        {
            var newRegion = HospitalDataService.AddNewRegion(RegionTitle, SelectedState);

            if (newRegion == null)
            {
                return;
            }

            var msg = String.Format("Custom region {0} with state {1} has been added", newRegion.Name, newRegion.Region.State);

            EventAggregator.GetEvent <GenericNotificationEvent>().Publish(msg);
            _reset();
        }
        /// <summary>
        /// Retrieves the admissions assigned to the medical unit via the hospital's API.
        /// </summary>
        /// <returns></returns>
        public async Task <ObservableCollection <AdmissionSuggestion> > GetAdmissionsFromHospitalAsync()
        {
            var hospSvc    = new HospitalDataService(ApiSettings);
            var admissions = await hospSvc.GetAdmissionsAsync();

            var suggestions = new ObservableCollection <AdmissionSuggestion>();

            foreach (var item in admissions)
            {
                AdmissionSuggestion suggestion = new AdmissionSuggestion(item);
                suggestion.IsAvailableToAdd = !Patients.Any(ap => ap.Admission.ID == item.ID);
                suggestions.Add(suggestion);
            }
            return(new ObservableCollection <AdmissionSuggestion>(suggestions.OrderBy(s => s.Room)));
        }
 public void LoadData()
 {
     HospitalDataService.CreateMappingContext(ContextStates, ContextRegionType);
 }