Viewing 1 post (of 1 total)
  • Author
    Posts
  • #37926
    Joshua Barrs
    Keymaster

      In this example, you can specify a custom message to pop up on screen when you change the Appointment Status to ‘ARRIVED’.

      This was a real world example for a Clinic that needed a reminder to check a patients temperature as they arrived for an appointment.

      You can adjust it to any appointment status name you like, but it does have to match exactly.

      **This only works if you update the status from the diary right-click menu, NOT if you change the status from within the appointment.**

       

      [1] Click TOOLS | SCRIPT EDITOR to show the Script Editor screen

      [2] Locate “ucDiaryFrame” and the “OnAfterAppStatusChanged” event

      [3] Copy & Paste the following script into the Script Editor :-

       

      using System.Data;
      
      DataRow row = (Params[0] as DataRow);
      
      long appstatus_id = PSLib.cDBFuncs.ToLong(row["appstatus_id"]);
      
      string status = cGlobals.DB.GetQuickDBString("select name from appstatus where id=" + appstatus_id);
      
      if (status == "Arrived")
      
      { PSDevEx.cMessages.WarningBox("enter some reminder text here", "IMPORTANT REMINDER"); }

       

      Enter your text between the quotes where it says “enter some reminder text here”.

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.