I have a data display set to:
LIST_OBS("ALLERGY F/U", "PENCIL", "LIST", "VALUEDATE")
It is not displaying updates to "ALLERGY F/U" made within the form.
How can I get my data display to show updates made to "ALLERGY F/U"? If I navigate to another form and back to this form the data displays updates as expected.
LIST_OBS isn't going to be triggered on the update of OBSNOW() or anything else. Usually what I do for data displays like this is put a function call in the data display and add OBSNOW() as a parameter in the function call.
Data display Mel Expression code:
{ShowListObs(OBSNOW("ALLERGY F/U"))}
Function to create in the code window:
!fn ShowListObs(obsvalue)
{
return LIST_OBS("ALLERGY F/U", "PENCIL", "LIST", "VALUEDATE")
}
Thank you for your response. I added the function just as you have shown above and my data display still does not update unless I navigate away from the form and come back. Maybe it is how I am updating "ALLERGY F/U" within the form. This is how the form is set to work:
Date field assigned to DOCUMENT.APPTDAT. --Used to enter date of last F/U appt.
Button labeled "Record"--Set to click to hidden buttons
Hidden Buttons:
1st button set to RUNPROCESS:
{OBSNOW("ALLERGY F/U","Allergy follow up visit", DOCUMENT.APPTDAT)}
2nd button set to clear value for date field (DOCUMENT.APPTDAT)
The user can then continue entering follow up appt dates and recording them.
This form is being used as a Preload for our allergy patients as we move away from paper charting.
I suspect this is how the data symbols OBSNOW() and OBSANY() handle "future" observations.
The workflow you are describing regarding the use of observation terms is a little concerning. Observation terms are generally used to indicate that something has happened (been observed). I would advise strongly against entering "future" observations terms. This wasn't even possible in the past, but a bug was introduced to the EMR at some point and it is now possible. However, I believe it is still a poor decision and in most cases that I have seen it is accidental (when someone selects the incorrect date while preloading labs).
Along with the fact that this is poor practice, it is very difficult to remove an observation term that was added with a different date. In your case this means that likely the only way to remove a future appointment from the "ALLERGY F/U" observation if it is cancelled/rescheduled would be to go to the flowhsheet, find the observation and remove it.
I would strongly recommend thinking about creating a different workflow for storing the information. Some alternatives would be:
1. Entering the information in appointments and pulling it from there based on appointment type and status (e.g. skip cancelled appointments).
2. Populating the "ALLERGY F/U" observation term with a delimited list of dates. In this case you are documenting that as of today, there are appointments scheduled on certain future dates for allergy f/u visits. This is a little trickier if you want to display the appointment in order or remove dates, but a simple expression to just add a new date would be something like:
{
if OBSANY("ALLERGY F/U") == "" then
OBSNOW("ALLERGY F/U", DOCUMENT.APPTDAT)
else
OBSNOW("ALLERGY F/U", str(OBSANY(ALLERGY F/U), ",", DOCUMENT.APPTDAT)
endif
}
One other comment on the workflow that you are describing:
1. You could simplify your buttons to avoid the need for hidden buttons by using a single RUNPROCESS button with the expression in the first "hidden" button followed by the expression:
DOCUMENT.APPTDAT= ""
to clear the value from the DOCUMENT variable. RUNPROCESS buttons can process as many statements as you would like so that "hidden buttons" shouldn't be needed unless you are hiding them when they should not be pressed.
This form is being used as a Preload for our allergy patients as we move away from paper charting.
So, we are not using it to enter future dates. I simply want the data display to populate the recorded values as a reference for the person pre-loading so that they do not have to refer to the text side or the flowsheet to confirm their entries were recorded.
Thank you for your suggestion on using a single button to run both processes! I had tried to set it up that way initially but had trouble getting it to clear the value of the date field. I tried it again now and it works. I think it may not have worked initially because i was putting the DOCUMENT.APPTDAT="" statement in brackets.