Hi,
I am trying to pull an immunization in a letter that only shows if it was done the same day.
Currently I have coding to get the Immunization to show the most recent:
{COND CASE OBSANY("OPV #1") "" LASTOBSDATE("OPV #1") ELSE "" ENDCOND}
How can I manipulate this to show the OBS only if it was done that day. I have been playing with this but I can't get it to work:
val(DURATIONDAYS(str(LAST_SIGNED_OBS_DATE("OPV #1")),str(._TODAYSDATE)))=0
Can someone please advise??
Thank you!
-Shereen
If the update is unsigned, then it is OK to use OBSNOW("OPV#1") directly.
OBSNOW serves one of three purposes:
OBSNOW("OBSNAME") will return the current unsigned value. Note that only one parameter is specified - the obsterm short name.
OBSNOW("OBSNAME","VALUE") will store VALUE in the obsterm. The second parameter is the value to be assigned. The date and time of the update is used for the date/time for the stored value.
OBSNOW("OBSNAME,"VALUE","DATE") will store the VALUE in the obsterm dated the date specified by DATE. The third parameter is the date. The current time is used for the timestamp. Because of this, an important caveat exists - only store this value one time in the update, otherwise multiple entries will be stored meaning that you will want to ensure that the code properly controls when it is triggered. This only affects dates that are different from the document date.
If the update is already signed, your code is almost correct.
if DURATIONDAYS(LAST_SIGNED_OBS_DATE("OPV #1"),str(._TODAYSDATE)) == 0 then
"OPV #1: " + LAST_SIGNED_OBS_VALUE("OPV #1")
else ""
endif
do the obsnow/obsany, etc work with the new immunization data structure?
Unfortunately, no, unless your documentation method includes capacity to record in both the Immunization Table and the Observation Table (currently GE's Immunization Form does not).
thanks, making sure they hadn't magically fixed this.
Could really use it for our protocols, which are just completely broken still.
yeah, I am aware of the third party solution that syncs the imms back to obs.