I am having an issue with page close handler in CPS 10. Apparently the page close handler doen not work unless you click the close button (which is no longer in CPS 10), or you click the next form button. Clicking the right or left arrow to move between forms, or clicking a navigation button in the form will not process the page close handler, only clicking the next form button works. Even ending the update doen not work. This is a real issue with having only one form in an update. I can not get it to work at all since the next form button is greyed out. Even with multiple forms in an update it is possible for it not to work depending how the user navigates to other forms. Does any one else have this issue and what possible workaround there might be? This is the code I am using:
{if DOCUMENT.WORK_COMP<>"" then ADD_DOCUMENT_SUMMARY('Ofc Visit W/C') else ""
endif
closepage("FALSE")}
This just changes the summary line if the patient is work comp.
I've been told that GE is working on a solution for this in the future (but I recommend reporting it anyway to keep it on their radar).
For the example you provided, I would either set it up as a button for the user to click and add the summary, or you can set it up as a global variable in the form, and create a text component to evaluate continuously and calls the global variable you created.
In the form, add this:
{!global workcomp = IF DOCUMENT.WORK_COMP<>"" then ADD_DOCUMENT_SUMMARY("Ofc Visit W/C") else "" endif}
Create a text comp with this: {'{workcomp}'}
Add the text comp to the document template with that form.
Hope that helps!
You are correct. In CPS 9.5 page close handlers would ALWAYS get executed. In CPS 10 they do NOT always get executed. I had to recode a form because of this. If you have done anything clever with page close handlers you will have to recode your forms also.
There is no event in CPS 10 that fires prior to the end of an update. The only events you can capture are changes to OBS terms, DOCUMENT variables, and global variables.
does anyone know if any of the CCC forms are affected by this? We can't see the source so there is no way to know for sure