If there has ever been a time that data was entered for an OBSterm, then the value of OBSPREV("OBSTERM") will never be null.
Is there an intuitive way to check to see exactly what was in the field during the last update, even if it was left blank?
either use LASTOBSVALUEDATE to get the date along with the value, or look at the flowsheet.
right now i'm using this approach:
page close handler:
if(OBSNOW("X")=="")then
OBSNOW("X","*")
endif
RUNPROCESS code for "Insert Previous Value" button:
if(OBSPREV("X")<>"*")then
OBSNOW("X",OBSPREV("X"))
else OBSNOW("X","")
endif
compare LASTOBSDATE to LASTNOTEDATE:
if LASTOBSDATE("X") == LASTNOTEDATE() then
LASTOBSVALUE("X")
else
""
endif
jjordet said:
either use LASTOBSVALUEDATE to get the date along with the value, or look at the flowsheet.
So, if you had a RUNPROCESS button that you only wanted to accomplish what i describe, what code would you use?
Oh I see
The only problem with LASTOBSDATE("X") == LASTNOTEDATE() is that it's looking at literally the last update - could be a phone note, a clinical list update, anything. It's not looking at the last "Office Visit". But it does get you a lot closer 🙂
-Rachael
then you'd have to compare LASTOBSDATE("X") to LASTOBSDATE("Y") where Y is an obsterm that always gets updated for each office visit.
I have an obsterm that is update every office visit ("ASSESSMENT") and I use it to compare to the different obsterms. I have used it in letters, and handouts, plus forms to good affect.