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.
Posted : March 17, 2019 3:27 am