We have a form with a visibilty region that displays elements based on the obs term Flu Vax - see below.
(patient._ageinmonths > 6 AND OBSPREV("FLU VAX") == ""
OR DURATIONDAYS(LAST_SIGNED_OBS_DATE("FLU VAX"), STR(._TODAYSDATE))>=365)
Now that obs terms for immunizations are no longer used, we need the comparable MEL lang for the new Immunization history data elements.
Any help is greatly appreciated!
The data symbol to pull up immunizations is now {IMMUN_GETLIST()}. you can get all the details in the Centricity Help File, but here is a modified version of your code that should work
(patient._ageinmonths > 6 AND IMMUN_GETLIST("Influenza") == "" )
I'm doing an array to get the last date, saving that in the local document and then doing my compare of days since last. And I'm also assigning a value to the Flu Vacinne obs term for future reference from the flowsheet.
/* Function finds the last date rcvd Influenza vax */
{!fn fnGetInfluVax() {
local rtnvalue1
local VaxList1 = ""
local VaxAray1 =""
local cmax1
local VaxName1 = "Influenza"
local Result = ""
VaxList1 = IMMUN_GETLIST("Influenza","last")
VaxAray1 = getfield(VaxList1,"|","")
cmax1 = size(VaxAray1)
local f
local VaxRow
rtnvalue1 = ""
for f=1, f<=cmax1, f=f+1 do
VaxRow = getfield(VaxAray1[f],"^","")
if (str(VaxRow[3])= VaxName1) then rtnvalue1 = val(str(VaxRow[30]))
else ""
endif
endfor
if (rtnvalue1 = "") then rtnvalue1 = "None"
else Result = sub(str(rtnvalue1),1,10)
endif
If (rtnvalue1 = "None") then
DOCUMENT.FLUVAXDAT = rtnvalue1
else
DOCUMENT.FLUVAXDAT = sub(str(rtnvalue1),1,10)
endif
If LAST_SIGNED_OBS_VALUE("FLU VACCINE") = DOCUMENT.FLUVAXDAT then ""
else obsnow("FLU VACCINE",Result)
endif
return sub(str(rtnvalue1),1,10)
}
}