So I'm sure this question has been asked before, but is there anyway to fire a pop up every time the encounter is entered into. I have no problem with getting it fire when one is started, it's the after it's been on hold and re-entered. So how can I get it to fire every time?
Thanks in advance!
I must be missing something in your question, but the normal behavior of the "!" is to execute the following code when the form is loaded, either the first time or on subsequent loads. The most common problem is to avoid re-initializing the form on reload. The following code will be executed every time the form is loaded:
{! userok("form loaded")}
I have a text component within a OV. It is:
{!fn fnPopUpDisplayDocsToRecon() {
local hold = getfield(GET_RECONCILE_DOC_LIST('PATIENT.PATIENTID'), "|", "")
local temp
local rslt = ""
for i = 1, i <= size(hold), i = i + 1 do
temp = getfield(hold[i], "^", "")
if (rslt "") then
rslt = rslt
endif
rslt = rslt + temp[2] + " - Reason: " + temp[3] + " - Date: " + temp[4] + hret + hret
endfor
return rslt
}}
{!if fnPopUpDisplayDocsToRecon('PATIENT.PATIENTID') "" then
userok("The following reconciliation(s) has been recieved from another practice for this patient:" + hret + hret + (fnPopUpDisplayDocsToRecon('PATIENT.PATIENTID')) + hret + hret + "Please reconcile problems, medications, and allergies before continuing.")
""
else
""
endif}
When the encounter is start it is fired, after that never again unless I manually insert the text component.
Please for give the lack of returns in there. I promise it doesn't look like that in a txt file.
So if I put it in a form it would fire every time?
jfitzmd - thank you! I don't have much experience using pop ups in forms (docs can't stand them), but that achieves what I needed.