Page 1 of 1

hook change request

Posted: Wed Oct 06, 2010 2:58 pm
by alkhaef
Hello.

I had previously requested the hook:

Code: Select all

Plugins.HookAddCode(this,"FormApptEdit.CalculateTime_end",strBTime,provDent,provHyg,codeNums);//set strBTime, but without using the 'new' keyword.
...and it works wonderfully... BUT:
1. I never realized that Appointments.CalculatePattern() is called from other places as well (namely, ContrAppt). So, for example, when a provider is changed by ContrAppt, my code is bypassed :(.
2. With my current implementation, a HookMethod will be more appropriate for performance reasons.

...So...
1. I'd like to request a HookMethod at "Appointments.CalculatePattern" with the equivalent parameter set.
2. The original hook I requested is no longer necessary (for me). I'm not sure if anyone else is using it... I guess this begs the question of policy for removing hooks...

Thanks,

Re: hook change request

Posted: Thu Oct 07, 2010 7:24 am
by jordansparks
We will add the new hook and remove the old one. But the old one only gets removed in the head, and only because we're pretty sure nobody else is using it.

Re: hook change request

Posted: Thu Oct 07, 2010 8:49 am
by alkhaef
Great! :)

Thanks,

Re: hook change request

Posted: Fri Oct 15, 2010 2:30 pm
by michael
The new hook has been added in 7.3.6 and the old one will be removed in 7.4.1.

Re: hook change request

Posted: Sun Nov 07, 2010 9:23 pm
by alkhaef
Hi.

I just finally got some time to use my plugin against the new hook location so I can move to 7.4, and I realized it stops working at this new location, because at that line strBtime has been digested and is no longer relevant:

Code: Select all

			if(strBTime.Length>39) {
				strBTime.Remove(39,strBTime.Length-39);
			}
			string pattern=strBTime.ToString();
			if(make5minute) {
				return ConvertPatternTo5(pattern);
			}
			Plugins.HookAddCode(null,"Appointments.CalculatePattern_end",strBTime,provDent,provHyg,codeNums);
			return pattern;
I'd like to request it to move up a few lines so that my plugin's changes to strBTime are used by OD, like so:

Code: Select all

			if(strBTime.Length>39) {
				strBTime.Remove(39,strBTime.Length-39);
			}
			Plugins.HookAddCode(null,"Appointments.CalculatePattern_end",strBTime,provDent,provHyg,codeNums);
			string pattern=strBTime.ToString();
			if(make5minute) {
				return ConvertPatternTo5(pattern);
			}
			return pattern;
Thanks!
-Al

Re: hook change request

Posted: Tue Nov 09, 2010 5:45 am
by michael
Hook has been moved as requested and will be released with version 7.5.4.