I would like to display the last immunization given in a data display field within VFE. We are using the new html Immunization Management form to enter vaccines and have run the Migration Wizard. I know that {IMMUN_GETLIST (vaccine class, last)} will bring in the last immunization, but I only want to see the AdministeredDate. How can I limit the display to the date?
I've also tried entering the MEL (i.e. {INFLUENZA_1} from the Immunization Letter and History View, but it will only display in the form if I open the Immunizations History View first. Any suggestions?
I am having the same issue and tried the same things you did. I hate to make it a requirement to have the Immunizations History View open. By doing that, the providers might as well look up the immunization dates there. And with the other alternative, IMMUN_GETLIST, the date gets lost within the other info. I hope there's someone out there who knows an answer for this.
{!fn fnDisplayImmunHx() {
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
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] + "
"
endfor
return rslt
}}
That temp[30] pulls the administered date.
So:
{!fn fnDisplayImmunHx() {
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
endif
rslt = rslt + temp[30] + "
"
endfor
return rslt
}}
Should do what your asking
Thanks so much! Do I need to enter both of these functions for it to work or just the last one? I'm sorry, but I'm not very experienced with writing functions or FOR statements. Do I need to enter the vaccine name like "Influenza" in the quotations by IMMUN_GETLIST? Also, in the second statement, there is a single quotation before ENDFOR. Is that a typo?
rslt = rslt + temp[30]
"
endfor
return rslt
}}
If you just want the administered date, you just need to use the 2nd version of the function.
Yes, David is correct, The second fn is just to pull the administered date.
Also it shoud of read:
rslt = rslt + temp[30] + "
"
This quote return close quote is just to put a space between values.
The function is set to pull all vaccination immunizations administered dates. Modifying this:
local hold = getfield(IMMUN_GETLIST("VaccineYouNeed", "last"), "|", "")
Should pull a desired vaccinations last administered date.