//Adds patients meta-data into sqlite storage
        private void AddPatientToList()
        {
            RaiseButtonPressed();

            IsBusy = true;

            //Must be set to false, set to true for testing
            IsButtonEnabled = true;

            try
            {
                //Connect to the local database and insert item
                PatientsWaintingLineDb.InsertPatient(patientObj);

                //Remove from PatientAwaitingCheckIn
                PatientAwatingCheckIn.RemoveFromList(patientObj);

                Task.Delay(250);

                //Auto close the pop up afterwards
                PopupNavigation.Instance.PopAllAsync(true);
            }
            catch (Exception ex)
            {
                //also send error logging to backend
                throw ex;
            }
            finally
            {
                IsBusy = false;

                IsButtonEnabled = true;
            }
        }
Exemple #2
0
        private void RefreashPatientsBooked()
        {
            IsRefreshing = true;

            IsBusy = true;

            try
            {
                //Try look for more booked patients for the day in the server (Services)

                if (Connectivity.NetworkAccess != NetworkAccess.None)
                {
                    //the follwing is dummy data to test to removed when back end configured
                    var patientAdded = DataStore.GetRefereshedBookedPatients();

                    PatientAwatingCheckIn.AddPatient(patientAdded);
                }
                else
                {
                    PopupNavigation.Instance.PushAsync(errorPop);
                }
            }
            catch (Exception)
            {
                //Send the error log to server.
                throw;
            }
            finally
            {
                IsBusy       = false;
                IsRefreshing = false;
            }
        }
Exemple #3
0
        //Mock
        private void GenerateDummyList()
        {
            ListOfBookedPatients = new ObservableCollection <PatientMeta>();

            ListOfBookedPatients = PatientAwatingCheckIn.GetPatients();
        }