Interaction logic for Test_Patient.xaml
Inheritance: System.Windows.Window
		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);
		}
		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)));
		}
		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);
		}
		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);
		}
		private void DeleteHousehold(Test_Patient test, string patientOQ)
		{
			int householdID = 0;

			FindPatient(test, patientOQ);
			
			ThreadUtilities.RunOnUIThread(new Action(() =>
			{
				householdID = int.Parse(test.text_HouseholdID.Text);
			}));

			DeleteHousehold(test, householdID);
		}
		private Test_Patient OpenTestPatient()
		{
			Test_Patient test = null;

			ThreadUtilities.RunOnUIThread(new Action(() =>
			{
				test = new Test_Patient();
				test.Show();
			}));

			GeneralUtilities.WaitUntil(() => (bool)Application.Current.Dispatcher.Invoke(new Func<bool>(() => test.IsLoaded)));

			return test;
		}