Example #1
0
        private void AddPatient(Test_Patient test, Patient tempPatient, PatientHousehold household)
        {
            ThreadUtilities.RunOnUIThread(new Action(() =>
            {
                test.Activate();
            }));

            UIUtilities.TypeIntoTextbox(test.text_AgeGroup, tempPatient.PatientAgeGroup);

            UIUtilities.TypeIntoTextbox(test.text_Ethnicity, tempPatient.PatientEthnicity);
            UIUtilities.TypeIntoTextbox(test.text_FirstName, tempPatient.PatientFirstName);
            UIUtilities.TypeIntoTextbox(test.text_Gender, tempPatient.PatientGender);
            UIUtilities.TypeIntoTextbox(test.text_LastName, tempPatient.PatientLastName);
            UIUtilities.TypeIntoTextbox(test.text_PatientOQ, tempPatient.PatientOQ);
            UIUtilities.TypeIntoTextbox(test.text_RelationToHEad, tempPatient.RelationToHead);

            if (tempPatient.IsHead)
            {
                UIUtilities.ClickOnItem(test.check_IsHead);
            }

            if (tempPatient.HouseholdID == 0)
            {
                UIUtilities.ClickOnItem(test.check_NewHousehold);
                UIUtilities.TypeIntoTextbox(test.text_county, household.HouseholdCounty);
                UIUtilities.TypeIntoTextbox(test.text_Income, household.HouseholdIncomeBracket);
                UIUtilities.TypeIntoTextbox(test.text_HouseholdPop, household.HouseholdPopulation.ToString());
            }
            else
            {
                UIUtilities.TypeIntoTextbox(test.text_HouseholdID, tempPatient.HouseholdID.ToString());
            }

            UIUtilities.ClickOnItem(test.button_AddPatient);
        }
Example #2
0
        private void DeletePatient(Test_Patient test, string patientOQ)
        {
            ThreadUtilities.RunOnUIThread(new Action(() =>
            {
                test.Activate();
            }));

            UIUtilities.TypeIntoTextbox(test.text_PatientOQ, patientOQ);

            UIUtilities.ClickOnItem(test.button_DeletePatient);
        }
Example #3
0
        private void DeleteHousehold(Test_Patient test, int HouseholdID)
        {
            ThreadUtilities.RunOnUIThread(new Action(() =>
            {
                test.Activate();
            }));

            UIUtilities.TypeIntoTextbox(test.text_HouseholdID, HouseholdID.ToString());

            UIUtilities.ClickOnItem(test.button_DeleteHousehold);
        }
Example #4
0
        private void FindPatient(Test_Patient test, string patientOQ)
        {
            ThreadUtilities.RunOnUIThread(new Action(() =>
            {
                test.Activate();
            }));

            UIUtilities.TypeIntoTextbox(test.text_PatientOQ, patientOQ);

            UIUtilities.ClickOnItem(test.button_GetPatient);
            GeneralUtilities.WaitUntil(() => (bool)Application.Current.Dispatcher.Invoke(new Func <bool>(() => test.IsActive)));
        }