Hi! Is there a way to show who was the last user that modified an obs term in the note? Right now I am using Previous observation with date in the data display only.
Thank you!
For that level of detail, you would need to use the LIST_OBS() data symbol and write a function to build the text to display. If used extensively, it could get rather 'heavy' for the EMR to lift, so careful consideration is advised.
Using a data display set to 'MEL Expression' you would enter the function call:
fnLastSignedObsWithUser("WIEGHT")
Where 'WEIGHT' is the obsterm name you want to use.
In the right window of VFE you would add the following code:
{! fn fnLastSignedObsWithUser(strObsName)
{
local retStr = ""
local strTemp = ""
local strBuf = ""
local i
local strList = ""
strList = LIST_OBS(strObsName,"Signed","delimited","value")
strTemp = getfield(strList,"|","")
for i = 1, i <= size(strTemp), i = i + 1 do
strBuf = getfield(strTemp[i],"^","")
if strBuf[4] <> "" then
retStr = strBuf[1] + " (" + strBuf[2] + ")(" + strBuf[5] + ")"
break
else ""
endif
endfor
return retStr
}
}
Thank you so much Lee!!! Thank you for the code and also for the warning, this definitely helps.