Does anyone have a quick text that they use for IMMUN_GETLIST that they use that just shows what vaccine they were given and date rather than all the data that displays when we use this?
This will pull the latest flu;
{IMMUN_GETLIST("Influenza", "last")}
To get the latest of all vaccines;
{IMMUN_GETLIST("", "last")}
This might be over complicating things but the following function,
{!fn fnTextTransImmunHx() {
local hold = getfield(IMMUN_GETLIST("", "all"), "|", "")
local temp
global rslt = ""
for i = 1, i <= size(hold), i = i + 1 do
temp = getfield(hold[i], "^", "")
if (rslt <> "") then
rslt = rslt + rtntype
endif
rslt = rslt + temp[3] + if temp[4] <> "" then " - " else "" endif + temp[4] + " on " + ADDDATES(temp[30],"0","0","0") + HRET
endfor
return rslt + gImmune
}}
Will display
Vaccinegroupname - Vaccine Name - Date
{!fn fnDisplayImmunHx1(rtntype1,firekey) {
local hold = getfield(IMMUN_GETLIST("dtap", "all"), "|", "")
local temp
local rslt = ""
for i = 1, i <= size(hold), i = i + 1 do
temp = getfield(hold[i], "^", "")
if (rslt <> "") then
rslt = rslt + rtntype1
endif
rslt = rslt + cfmt(temp[3] + "", "") + if temp[3] <> "" then " - " else "" endif + temp[30] +if temp[4] <> "" then " - " else "" endif+ temp[6] +"
"
endfor
return rslt
}}
{fnDisplayImmunHx1(rtntype1,firekey)}
Above will allow you to get the Vaccine Name, the Administered Date, and the series.
This works in the form version, out of curiosity have you used this in a letter or history view ?
It's not working at all for me there