Exemple #1
0
		/*
		///<summary>Here so it's parallel with other modules.</summary>
		private void RefreshModulePatient(int patNum){
			PatCurNum=patNum;
			if(patNum==0){
				OnPatientSelected(patNum,"",false,"");
			}
			else{
				Patient pat=Patients.GetPat(patNum);
				OnPatientSelected(patNum,pat.GetNameLF(),pat.Email!="",pat.ChartNumber);
			}
		}*/

		///<summary>Sends the PatientSelected event on up to the main form.  The only result is that the main window now knows the new patNum and patName.  Does nothing else.  Does not trigger any other methods to run which might cause a loop.  Only called from RefreshModulePatient, but it's separate so that it's the same as in the other modules.</summary>
		private void OnPatientSelected(Patient pat) {
			PatientSelectedEventArgs eArgs=new OpenDental.PatientSelectedEventArgs(pat);
			if(PatientSelected!=null){
				PatientSelected(this,eArgs);
			}
		}
Exemple #2
0
 private void menuItemLabCases_Click(object sender,EventArgs e)
 {
     FormLabCases FormL=new FormLabCases();
     FormL.ShowDialog();
     if(FormL.GoToAptNum!=0) {
         Appointment apt=Appointments.GetOneApt(FormL.GoToAptNum);
         Patient pat=Patients.GetPat(apt.PatNum);
         PatientSelectedEventArgs eArgs=new OpenDental.PatientSelectedEventArgs(pat.PatNum,pat.GetNameLF(),pat.Email!="",pat.ChartNumber);
         //if(PatientSelected!=null){
         //	PatientSelected(this,eArgs);
         //}
         Contr_PatientSelected(this,eArgs);
         //OnPatientSelected(pat.PatNum,pat.GetNameLF(),pat.Email!="",pat.ChartNumber);
         GotoModule.GotoAppointment(apt.AptDateTime,apt.AptNum);
     }
 }
Exemple #3
0
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			int currentSelection=gridMain.GetSelectedIndex();
			int currentScroll=gridMain.ScrollValue;
			Patient pat=Patients.GetPat(AptList[e.Row].PatNum);//Only one can be selected at a time in this grid.
			PatientSelectedEventArgs eArgs=new OpenDental.PatientSelectedEventArgs(pat);
			PatientGoTo(this,eArgs);
			FormApptEdit FormAE=new FormApptEdit(AptList[e.Row].AptNum);
			FormAE.PinIsVisible=true;
			FormAE.ShowDialog();
			if(FormAE.DialogResult!=DialogResult.OK) {
				return;
			}
			if(FormAE.PinClicked) {
				SendPinboard_Click();
				DialogResult=DialogResult.OK;
			}
			else {
				FillGrid();
				gridMain.SetSelected(currentSelection,true);
				gridMain.ScrollValue=currentScroll;
			}
		}
Exemple #4
0
		private void SeeChart_Click() {
			if(gridMain.SelectedIndices.Length==0) {
				MsgBox.Show(this,"Please select an appointment first.");
				return;
			}
			//Only one can be selected at a time in this grid, but just in case we change it in the future it will select the last one in the list to be consistent with other patient selections.
			Patient pat=Patients.GetPat(AptList[gridMain.SelectedIndices[gridMain.SelectedIndices.Length-1]].PatNum);
			PatientSelectedEventArgs eArgs=new OpenDental.PatientSelectedEventArgs(pat);
			PatientGoTo(this,eArgs);
			GotoModule.GotoChart(pat.PatNum);
		}
Exemple #5
0
 /*
 ///<summary>Was RefreshModuleData and FillPatientButton.  Gets the data for the specified patient. Does not refresh any appointment data.  This function should always be called when the patient changes since that's all this function is responsible for.</summary>
 private void RefreshModulePatient(int patNum){//
     if(PatCur.PatNum==patNum) {//if patient has not changed
         return;//don't do anything
     }
     PatCurNum=patNum;//might be zero
     bool hasEmail;
     string chartNumber;
     if(PatCurNum==0){
         PatCurName="";
         PatCurChartNumber="";
         butOther.Enabled=false;
         hasEmail=false;
         chartNumber="";
     }
     else{
         Patient pat=Patients.GetPat(PatCurNum);
         PatCurName=pat.GetNameLF();
         PatCurChartNumber=pat.ChartNumber;
         hasEmail=pat.Email!="";
         chartNumber=pat.ChartNumber;
         //family can wait until user clicks on downarrow.
         PatientL.AddPatsToMenu(menuPatient,new EventHandler(menuPatient_Click),PatCurName,PatCurNum);
         butOther.Enabled=true;
     }
     butUnsched.Enabled=butOther.Enabled;
     butBreak.Enabled=butOther.Enabled;
     butComplete.Enabled=butOther.Enabled;
     butDelete.Enabled=butOther.Enabled;
     //ParentForm.Text=Patients.GetMainTitle(PatCurName,PatCurNum,PatCurChartNumber);
     if(panelAptInfo.Enabled && DS!=null) {
         int aptconfirmed=0;
         for(int i=0;i<DS.Tables["Appointments"].Rows.Count;i++) {
             if(DS.Tables["Appointments"].Rows[i]["AptNum"].ToString()==ContrApptSingle.ClickedAptNum.ToString()) {
                 aptconfirmed=PIn.PInt(DS.Tables["Appointments"].Rows[i]["Confirmed"].ToString());
                 break;
             }
         }
         listConfirmed.SelectedIndex=DefC.GetOrder(DefCat.ApptConfirmed,aptconfirmed);//could be -1
     }
     else {
         listConfirmed.SelectedIndex=-1;
     }
 //JSPARKS - THIS SHOULD BE MOVED TO BE CALLED EXPLICITLY FROM WITHIN VARIOUS PLACES IN THIS MODULE
 //JUST LIKE IN THE OTHER MODULES.  WHEN IT'S HERE, IT IS ALSO GETTING CALLED EVERY TIME MODULESELECTED
 //GETS TRIGGERED FROM PARENT FORM.
     OnPatientSelected(PatCurNum,PatCurName,hasEmail,chartNumber);
 }*/
 ///<summary>Sends the PatientSelected event on up to the main form.  The only result is that the main window now knows the new patNum and patName.  Does nothing else.  Does not trigger any other methods to run which might cause a loop.  Only called from RefreshModulePatient, but it's separate so that it's the same as in the other modules.</summary>
 private void OnPatientSelected(long patNum,string patName,bool hasEmail,string chartNumber)
 {
     PatientSelectedEventArgs eArgs=new OpenDental.PatientSelectedEventArgs(patNum,patName,hasEmail,chartNumber);
     if(PatientSelected!=null) {
         PatientSelected(this,eArgs);
     }
 }
Exemple #6
0
		private void grid_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			int currentSelection=e.Row;//tbApts.SelectedRow;
			int currentScroll=grid.ScrollValue;//tbApts.ScrollValue;
			Patient pat=Patients.GetPat(ListUn[e.Row].PatNum);//If multiple selected, just take the one that was clicked on.
			PatientSelectedEventArgs eArgs=new OpenDental.PatientSelectedEventArgs(pat);
			PatientGoTo(this,eArgs);
			FormApptEdit FormAE=new FormApptEdit(ListUn[e.Row].AptNum);
			FormAE.PinIsVisible=true;
			FormAE.ShowDialog();
			if(FormAE.DialogResult!=DialogResult.OK) {
				return;
			}
			if(FormAE.PinClicked) {
				SendPinboard_Click();//Whatever they double clicked on will still be selected, just fire the event.
				DialogResult=DialogResult.OK;
			}
			else {
				FillGrid();
				grid.SetSelected(currentSelection,true);
				grid.ScrollValue=currentScroll;
			}
		}
Exemple #7
0
		///<summary>If multiple patients are selected in UnchedList, will select the last patient to remain consistent with sending to pinboard behavior.</summary>
		private void SeeChart_Click() {
			if(grid.SelectedIndices.Length==0) {
				MsgBox.Show(this,"Please select an appointment first.");
				return;
			}
			Patient pat=Patients.GetPat(ListUn[grid.SelectedIndices[grid.SelectedIndices.Length-1]].PatNum);//If multiple selected, just take the last one to remain consistent with SendPinboard_Click.
			PatientSelectedEventArgs eArgs=new OpenDental.PatientSelectedEventArgs(pat);
			PatientGoTo(this,eArgs);
			GotoModule.GotoChart(pat.PatNum);
		}