示例#1
0
        private async void NavigateToPrescriptionForms()
        {
            RaiseButtonPressed();

            IsBusy = true;

            if (IsButtonEnabled.Equals(true))
            {
                IsButtonEnabled = false;

                try
                {
                    //Wait for the animation to finish then move to the next page
                    await Task.Delay(250);

                    await App.Current.MainPage.Navigation.PushAsync(new DoctorPrescription(), true);
                }
                catch (Exception)
                {
                    throw;
                }
                finally
                {
                    IsBusy = false;

                    IsButtonEnabled = true;
                }
            }
        }
示例#2
0
        public PatientDetailsViewModel()
        {
            notePop = new DoctorsNote();

            //Analytics pop up instance
            analyticsPopUp = new AnalyticsPopUp();

            tileMedicalDetailPopUp = new TilePopMedicalDetails();

            upperTileMedicalDetails = new UpperTilePopUpMedicalDetails();

            PatientAnaylticsPortal = new Command(() => PatientAnaylicsPopUpPage());

            PrescriptionCommand = new Command(
                execute: () =>
            {
                NavigateToPrescriptionForms();
            }, canExecute: () =>
            {
                if (IsButtonEnabled.Equals(true))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            });

            AddMedicalFiles = new Command(NavigateToAddMedFiles);

            DoctorsNoteCommand = new Command(NavigateToDoctorsNote);

            ChronicDiseasePopUp = new Command(GenerateChronicDiseasePopUp);

            MedicalFilesNotePopUp = new Command(GenerateMedicalFilesNotePopUp);

            MedicationPopUp = new Command(GenerateMedicationPopUp);

            AllergiesPopUp = new Command(GenerateAllergiesPopUp);

            AgePopUp = new Command(GenerateAgePopUp);

            BloodTypePopUp = new Command(GenerateBloodTypePopUp);

            BloodPressurePopUp = new Command(GenerateBloodPressurePopUp);

            GenderPopUp = new Command(GenerateGenderPopUp);
        }