Hello
I have an unsigned update with a form that has a flowsheet item, dated 1 PM
I have a signed obs term from a different update from 6 PM.
The flowsheet in the 1 PM form uses active_observations, and shows the signed obs term from 6 PM. I don't think it should, because that signed obs term didn't even exist at the time of the 1 PM document. What do you think?
Given that it does show, I would like to know how I can programmatically access those "fuiture signed" values in my 1 PM form. - last_signed_obs_value doesn't show it nor does obsprev, and there does not seem to be an equivalent to whatever function the flowsheet item is using. Any ideas?
Thanks for your help
Ken
slight edit based on my findings: the problem does not seem to be that the time of the 1 PM form is earlier than the 6 PM form. It's that the 1 PM form was created first, and the last_signed_obs_value data is not refreshed when you go back into the document after the 6 PM document was created. Is there any way to refresh this data automatically? I am using
{!
at the beginning of sections of code that use that value but it doesn't seem to work.
If a create the 1 PM document after the 6 PM document, all is well
Ken
if you have tried all of the built in functions
LAST_SIGNED_OBS_VALUE()
LASTOBSVALUE()
OBSANY()
then you probably can't do it with built in functions, you will have to build something yourself. I took apart something I have for looking up unavailable obs, you'll just have to add the future filter where i put the comment. Here is a start -
{fn Future_Obs(name){
//name is observation short name, date is string of date, formatted mm/dd/yyyy
local Otable = ""
local hold = ""
name = toupper(name)
for h = 0, h < GETROWCOUNT("SignedObs") , h=h+1 do
Otable = GETROW("SignedObs",h,"ObsDate","ObsType","ObsValue","CHANGE","HDID","PUBTIME")
if (find("_ActiveTerms","Name","HDID",Otable[5]) == name) then
//you have the right term, check obsdate to see if it is larger than document.clinicaldate here, if it is return obsvalue
endif
endfor
return ""
}}
Thanks Michael!
That helps a lot. Is there anywhere that getrowcount and getrow are documented for what the valid arguments are? I presume their use is not sanctioned.
Thanks again
Ken
They are documented on CHUG here, they are not in the help files and I dont know why, but they are supported by GE