Пример #1
0
		///<summary>Used to launch the task window preloaded with a certain task list open.  IsTriage is only used at OD HQ.</summary>
		private void LaunchTaskWindow(bool isTriage) {
			if(FormT==null || FormT.IsDisposed) {
				FormT=new FormTasks();
			}
			FormT.Show();
			if(isTriage) {
				FormT.ShowTriage();
			}
			if(FormT.WindowState==FormWindowState.Minimized) {
				FormT.WindowState=FormWindowState.Normal;
			}
			FormT.BringToFront();
		}
Пример #2
0
 private void butTasks_Click(object sender, System.EventArgs e)
 {
     FormTasks FormT=new FormTasks();
     FormT.ShowDialog();
     if(FormT.GotoType==TaskObjectType.Patient){
         if(FormT.GotoKeyNum!=0){
             Patient pat=Patients.GetPat(FormT.GotoKeyNum);
             OnPatientSelected(FormT.GotoKeyNum,pat.GetNameLF(),pat.Email!="",pat.ChartNumber);
             GotoModule.GotoAccount(0);
         }
     }
     if(FormT.GotoType==TaskObjectType.Appointment){
         if(FormT.GotoKeyNum!=0){
             Appointment apt=Appointments.GetOneApt(FormT.GotoKeyNum);
             if(apt==null){
                 MsgBox.Show(this,"Appointment has been deleted, so it's not available.");
                 return;
                 //this could be a little better, because window has closed, but they will learn not to push that button.
             }
             DateTime dateSelected=DateTime.MinValue;
             if(apt.AptStatus==ApptStatus.Planned || apt.AptStatus==ApptStatus.UnschedList){
                 //I did not add feature to put planned or unsched apt on pinboard.
                 MsgBox.Show(this,"Cannot navigate to appointment.  Use the Other Appointments button.");
                 //return;
             }
             else{
                 dateSelected=apt.AptDateTime;
             }
             Patient pat=Patients.GetPat(apt.PatNum);
             OnPatientSelected(apt.PatNum,pat.GetNameLF(),pat.Email!="",pat.ChartNumber);
             GotoModule.GotoAppointment(dateSelected,apt.AptNum);
         }
     }
 }