Page 1 of 1

ContrApptJ hook request

Posted: Sat Jan 25, 2020 1:28 pm
by wjstarck
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.

Re: ContrApptJ hook request

Posted: Mon Jan 27, 2020 8:51 am
by PatrickC
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;
}

Re: ContrApptJ hook request

Posted: Mon Jan 27, 2020 9:14 am
by wjstarck
Thanks