Currently we use a custom history view for immunizations while using the HTM immunization form. I have this function and varations to pull the vaccinations we need to see:
{global hold = getfield(IMMUN_GETLIST("Influenza", "all"), "|", "")
global 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] + " Vaccine" + " - " + 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] + hret
endfor
rslt}
This unfortunately does not organize the list by date, any thoughts on where I could use sort here?
I accomplished this with a couple of functions in a handout:
1- puts the date in YYYYMMDD
2- arrays them and sorts them
3- puts the date back into DD/MM/YYYY
I also check for uniqueness of the date to make sure duplicates don't show up in a series given spot on the display.
Thanks for the response, I sent you an email if you don't mind sharing the function.