I am using the code below for the chart note translation in a data display field but would like to display all values in the current update, not just the last one.I have tried quite a few ways with different data symbols etc. that work in text components but none are working here. Does anyone have an idea?
{CFMT(LASTOBSVALUEDATE("FOLLOW-UP"), "", "Follow-up: ", "B", "
"
)}
Stacey LaGrange
Software Developer/Analyst
St. Mary's Health System
[email protected]
(207) 777-8410
Perhaps obs_list_changes() would get what you from obsterms:
description Lists all observations entered, changed, or removed during the current update. type Data symbol function syntax OBS_LIST_CHANGES() arguments N/A when to evaluate Set evaluation to Continuously to include changes to the list made after the symbol is inserted in the note. returns A list of observations, with a line break after each one comment This data symbol function provides a listing of changes made during the current update. example {'{OBS_LIST_CHANGES()}'} returns Added new observation of PULSE RHYTHM: regular (06/11/1999 12:50) Added new observation of TEMP SITE: axillary (06/11/1999 12:50) Added new observation of WEIGHT: 120 lb (06/11/1999 12:50) Added new observation of PULSE RATE: 65 /min (06/11/1999 12:50) where used EMR: text components, chart notes, and quick text Encounter Form Editor: Data Display items with a Clinical Function connection and MEL expressions |
Thank you, I think that was the one that worked in the text component but not in the data display but I will try again just to be sure.
should work. i use it regularly in data displays. if not post your code.
Something like this should work:
{cfmt(obs_list_changes(), "", "Observations: " , "B","
")}
If you have multiple calls, though, you'll need to write it as one statement:
{cfmt(obs_list_changes(), "", "Observations: " , "B","") + hret + cfmt(otherstuff, "","Other: ", "B","") + hret + ..................
}
This worked great, thank you very much-
{cfmt(obs_list_changes(), "FOLLOW-UP", "Follow-up: " , "B","
")}
Maybe I had a typo if/when I tried using it before?
glad it works, but am a bit surprised that what you just posted works. the second arguement to cfmt is formatting for the first arguement, so at least your going to have some sort of compile error since "FOLLOW-UP" in the second arguement will not be recognized. the third arguement "Follow-up:" is the pretext, and the 4th arguement the pretext formatting. You should probably remove the second arguement and leave it null or add a recognized formatting character.
Actually you are right, there is no error but it is showing all obs terms, not just the one called FOLLOW-UP. I will try to fix this. Also, I don't need the text Follow-up: so I just removed this anyway.
description List all observation values, optionally with the date, of the specified observation term. type Data symbol function syntax LIST_OBS(observation,status,list_type,format) arguments
when to evaluate When Inserted in Note or continuously returns A list of observation values with optional dates for a specified observation term comment You must use the observation term short name. Arguments are not case-sensitive. example 1 {LIST_OBS('Weight','Signed','list',"valuedate")} returns: 122 (04/09/1999 3:14:00 PM) 122 (02/20/1999 10:08:00 AM) 121 (02/13/1999 2:37:00 PM) 121 (02/11/1999 4:23:00 PM) 122 (02/11/1999 9:01:00 AM) example 2 LIST_OBS(‘height’,’signed’,’delimited’,’valuedate’)} 71 (07/11/2003 11:20:00 AM)^07/11/2003^11:20:00 AM^Julius Hibbard^Julius Hibbard^^^^Westside^Office Visit^235|70 (07/11/2003 11:19:30 AM)^07/11/2003^11:19:30 AM^Julius Hibbard^Julius Hibbard^^^^Enterprise Clinic - ALL^Office Visit^234|71.5 (06/09/2003 2:13:50 PM)^06/09/2003^2:13:50 PM^Harry Winston MD^Harry Winston MD^^^^Eastside^Office Visit^89|72 (06/09/2003 2:13:20 PM)^06/09/2003^2:13:20 PM^Harry Winston MD^Harry Winston MD^^^^Westside^Office Visit^88|70 (06/09/2003 2:13:20 PM)^06/09/2003^2:13:20 PM^Harry Winston MD^Harry Winston MD^^^^Westside^Office Visit^87|71 (06/09/2003 2:12:50 PM)^06/09/2003^2:12:50 PM^Harry Winston MD^Harry Winston MD^^^^Enterprise Clinic - ALL^Office Visit^86 where used Encounter Forms, text components, letters, handouts and quick text |
{LIST_OBS('FOLLOW-UP','update','list','valuedate')} seems to be working, I will keep testing but all is well so far, thanks.
Do you ever have problems with this data symbol not refreshing in the data display? I need to close the form and reopen each time before it will appear on the form.
Haven't noticed with this symbol, but have noticed other symbols/functions not refreshing properly...timing issue...the symbol/function actually gets called before the obs term is actually set. Sometimes, moving the function up/down in the code panel fixes the issue. In you case, you may want to move the symbol call into the code panel...setting a global variable to the result and then using the global variable in your data display.
Good idea thank you