Пример #1
0
		private void patientsListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
		{
			if (patientsListBox.SelectedItem == null)
			{
				MedicationAdminstrationRecord.Records.Clear();
				return;
			}

			MedicationAdminstrationRecord.refreshRecords((patientsListBox.SelectedItem as Patient).Id,
														  (DateTime)adminDatePicker.SelectedDate);
		}
Пример #2
0
		public PatientViewer(long patId, DateTime date)
		{			
			this.InitializeComponent();

			this.patientId = patId;
			this.date = date;

			fillPatientInfo(PatientPoolControl.SelectedPatient);

			MedicationDose.refreshRemainingMedicationDosePool(patientId);
			marPool.DataContext = MedicationAdminstrationRecord.Records;
			MedicationAdminstrationRecord.refreshRecords(patientId, date);

			VisualStateManager.GoToState(medAdminPool, "StationVisualState", false);
			marPool.VisualState = "StationVisualState";
		}
Пример #3
0
		private void mySqlAddNewMar()
		{
			DBConnection dbCon = MySqlHelper.dbCon;

			ArrayList response = dbCon.selectQuery(
			string.Format("SELECT add_mar({0}, {1}, {2}, '{3}', '{4}', {5}, '{6}', '{7}', {8})",
						  Mar.ForDose.Id,
						  Mar.ForPatient.ParentSimulation.Id,
						  Mar.ForPatient.Id,
						  MySqlFunctions.EscapeString(Mar.Initials),
						  Mar.AdministrationTime.ToString("yyyy-MM-dd HH:mm:ss"),
						  Mar.ReasonCode,
						  MySqlFunctions.EscapeString(Mar.AdministrationNotes),
						  MySqlFunctions.EscapeString(Mar.ReasonNotes),
						  Mar.ForDose.InjectionSite));

			MySqlHelper.disconnect();

			MedicationAdminstrationRecord.refreshRecords(Mar.ForPatient.Id, DateTime.Today);
		}