I would load the function library (text component) from an encounter form in the update. Just add the load command to the first form in the udpate and it should eliminate the need to load and open the form directly.
Then you could add the function call to key forms (you mentioned Histories, Meds and Allergies, so in each of those) as close page handlers - as long as these are being reviewed inside of an update and not the chart summary screen, it should work well enough.
The issues with loading a text component and triggering a form open are related to numerous factors to include:
1) Is the EMR set up to open the first form automatically and colliding with the vitals form opening?
2) Has the vitals form been fully loaded and initialized prior to attempting to open it?
3) Is the code to load and open the form set to be processed at a higher priority (use of bam aka exclamation point) than code supporting the functionality? Note: The priority for text component code execution is always higher than code in an encounter form, so it will interrupt the encounter form code stack when inserted into the update - you can visualize this in a MEL trace.
4) Is there a conflict in load executions that is causing too many errors? It is important to understand that on initial opening, there exists a sequence for processing code. It is roughly as follows:
a) Static text in the update is drawn on screen
b) Watcher expressions in the udpate proper are executed and refreshed on screen as the template code is executed
c) Text Component code is executed
d) Encounter Form code is executed
- The XLW content is loaded and processed, bam (!) items first
- The EFM content is loaded, processed, and drawn on screen (only the first tab, initially)
- The XLT content is loaded, processed, and drawn on screen
- At this point, the form 'exists' in the udpate and can be interacted with (i.e. - jump to tab).
- When opening an update, each form must go through this process, each time.
e) After the update is fully loaded, a refresh cycle is triggered and the EMR is ready for new instruction sets.
Understand that any code that is preceded with a bam (!) will execute first, then all other code will follow. If a text component is added in the mix, it will halt form execution and process that first, then return to where it left off. It may be possible that a conflict is being introduced in the timing.
Because any one of these situations can cause issues, I would suggest that it be triggered off of forms they normally have in their workflow instead of trying to brute force it.
Posted : July 13, 2017 5:41 am