So im trying to use IMMUN_GETLIST () to work in way that would allow the providers to see the immunizations a patient has had within a custom form other than the imuun mgmt. Using IMMUN_GETLIST() returns the raw data. Has anyone out there succesfully formatted this in a way which there providers frind it useful?
Check implementation of $mdObject at https://github.com/mdObject/GECentricity .
The $mdObject.patient.immunizations returns array of the Immunization.
I found a solution and use this to display the latest immunization:
{!fn fnDisplayImmunHx(rtntype,firekey) {
local hold = getfield(IMMUN_GETLIST("", "last"), "|", "")
local temp
local 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] + " Vaccine" + " - " + /*temp[4] + " - " +*/ temp[30] + if temp[18] <> "" then " - " else "" endif + temp[18] + " " + temp [19] + " - " + if temp[7] == "Y" then "was given" else if temp[7] == "N" then "declined" else if temp[7] == "U" then "Undetermined" else "" endif endif endif + if temp[8] <> "" then " - " else "" endif + temp[8] + "
"
endfor
return rslt
}}
Adam, what are you passing for the two parameters for the function, (rtntype,firekey)?
David - Great question! Seems to be just bad programming on my part and is just junk. Once I removed it the results are the same. It basically came off another fn I use and I didn't realize it wasn't needed until now.