ContrApptJ hook request

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

ContrApptJ hook request

Post by wjstarck » Sat Jan 25, 2020 1:28 pm

Hello-

Could I have the following hook added after line 296 in ContrApptJ in OD 19.4?

Code: Select all

		private void contrApptPanel_SelectedApptChanged(object sender,UI.ApptSelectedChangedEventArgs e) {
			pinBoard.SelectedIndex=-1;
			if(e.AptNumNew==-1){				
				RefreshModuleScreenButtonsRight();//just disables the buttons on the right
				//we will leave current patient selected.
				return;
			};
			if(_patCur==null || _patCur.PatNum!=e.PatNumNew){//patient changed	
				RefreshModuleDataPatient(e.PatNumNew);
				FormOpenDental.S_Contr_PatientSelected(_patCur,true,false);
				Plugins.HookAddCode(this, "ContrAppt.contrApptPanel_SelectedApptChanged_end"); <--------------------------
				return;
			}
			//patient not changed
			if(e.AptNumNew!=e.AptNumOld){
				RefreshModuleScreenButtonsRight();//otherwise included above in RefreshModuleDataPatient
			}
		}
Thanks.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

PatrickC
Posts: 56
Joined: Thu Jun 06, 2019 11:37 am

Re: ContrApptJ hook request

Post by PatrickC » Mon Jan 27, 2020 8:51 am

Hook implemented and backported to 19.4(beta). I changed the location description a bit to read as patientchanged_end rather than just _end.

Code: Select all

if(_patCur==null || _patCur.PatNum!=e.PatNumNew){//patient changed
	RefreshModuleDataPatient(e.PatNumNew);
	FormOpenDental.S_Contr_PatientSelected(_patCur,true,false);
	Plugins.HookAddCode(this,"ContrAppt.contrApptPanel_SelectedApptChanged_patientchanged_end");
	return;
}
Patrick Carlson
Open Dental Software
http://www.opendental.com

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: ContrApptJ hook request

Post by wjstarck » Mon Jan 27, 2020 9:14 am

Thanks
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

Post Reply