Have been working on a checkout screen for staff, and most appears to work nicely. Along the left side I have boxes where I used various MEL commands to list out Orders and Services that were done today. The middle section is where Checkout can make sure next appointments are made, and on the right column I built more MEL code to list out the next appointments.
My issue -- from testing it seems that the appointment data is not refreshed. I have tried with buttons to only execute at press, with quicktext withing the text of the encounter.
For example, open the encounter form. Patient has two upcoming appts. On another computer, make another (#3) appt. Run the MEL code - only see the two that existed upon Encounter open.
The only way around this it seems is to close the encounter (could be hold), refresh to a new patient, and then re-open the encounter. This seems to force GE to retrieve the Appointment data. It is almost like it is cached into memory once (perhaps for speed) when the encounter is opened.
So, have others seen this? Any idea how to force GE to see the added appointments?
The MEL symbol Appts_By_Status() definition states that it is evaluated continuously. Have you tried creating a watcher function to trigger listing new appointments?
While it may say continuously evaluated, it does not appear to be that way. As in my example above where an appointment is added to a patient while an encounter is already open. The new appt is not reflected in MEL (inside a form) or even a little quicktext in the free text part of a note.
Have you tried this and seen it pick up a just-added entry?
Thanks.
Do you create an order when you make the referral? If so, Orders_New() is evaluated continuously.
It appears that referrals and orders update; although have not needed to test as extensively as for the appointments.
The workflow is that checkout will open this custom form/encounter. Will see needed labs and orders (which include request for next appt). They also see current next appts on-screen.
So, he/she jumps to the place to make the appt (and this can be seen in another computer as 'there'), but it inside the form the function/MEL/whatever is re-executed, the new appt is not visible.
And this defeats the whole process, because my entry screen has a button to press and patient exit instructions are printed with next appointment(s) and other important details from the visit.
Are you calling a custom appt function from the usrlib?