Focus the Patient field on the Appointment Editor by default

Scripting help and sample scripts for use with the Scripting Module
Post a reply

Focus the Patient field on the Appointment Editor by default

Postby Support » June 16th, 2011, 7:23 am

Standard ClinicOffice behaviour is that the START TIME of an appointment is given input focus by default when the Appointment Editor window is invoked. This script allows you to change this behaviour so that the PATIENT field is given focus instead.

[1] Click TOOLS | SCRIPT EDITOR to show the Script Editor screen
[2] Locate "frmEditorApp" and the "OnAfterEditorOnScreen" event
[3] Copy & Paste the following script into the Script Editor :-

Code: Select all
frmEditorApp frm = (Params[0] as frmEditorApp);
System.Reflection.FieldInfo fi = frm.GetType().GetField("edPatient", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
if (fi != null)
{
  Control c = fi.GetValue(frm) as Control;
  if (c != null)
    c.Focus();
}

[4] Click OK

To test this out, either create a new appointment or open an existing one, and you should notice that the PATIENT field will be given focus (rather than the START TIME field).
ClinicOffice Support Team
User avatar
Support
Site Admin
 
Posts: 875
Joined: August 25th, 2005, 6:37 pm
Top

Post a reply

Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron