It seems that all of the observation data symbols (OBSPREV, LAST_SIGNED_OBS_VALUE(),LASTOBSVALUE()) are only able to pull values that were originally recorded PRIOR to the date/time that the current update was started, regardless of clinical date/time. Does anyone know of a way around this?
We have providers who want to start an update, put in some past history, and put the document on hold. If the patient comes in and fills out a scan, they want to re-open the update and import those values. Is this possible?
A little bit of magic:
/*Enter with Obs Term, HDID string. Use _MELCurObs to retrieve most recent value of term to be placed in document value. Note, strObsTerm is for documentation only*/
{ fn Get_Obs_Term(strObsTerm, strHDID)
{
local lResult=find("_MelCurObs","ObsValue","HDID",strHDID)
if lResult<>"" then
//replace "," with ""
lResult=replacestr(lResult,",","")
return lResult
else
return ""
endif
}
}
Thank you so much. I will admit that I don't quite understand it fully so I will need to look through it but I'm excited that there is a way to accomplish this! Thanks again
I am trying this code to pull in an obs term that is signed in a subsequent document on the same day, and it is only pulling in the last obs term that was entered before the current document, not the future obs term.
Here is what I'm using in the function view:
{! fn Get_Obs_Term(strObsTerm, strHDID)
{
local lResult=find("_MelCurObs","ObsValue","HDID",strHDID)
if lResult<>"" then
//replace "," with ""
lResult=replacestr(lResult,",","")
return lResult
else
return ""
endif
}
}
Here is what I'm using on the action button-->run process:
document.rostest=Get_Obs_Term("DEP ROS GENL","4095")
My document.rostest edit field is only pulling in the DEP ROS GENL obs term that was signed from a previous day, not the one that was signed on the same day, different document (time is after the start of the document I'm trying to pull it in to.
Can anybody help with pulling the "future" one?
Thanks,
Crystal