I would like to include the vaccine name on the Immunization Letter or record that is given to the patient. My reasoning is that the new MeningB vaccine has two different types of vaccines that cover different strains of Meningitis and the series differs by vaccine type. Patients need to know which series they received and if it was completed. I know we no longer use OBS terms, but what term is the vaccine name saved under in the table? For example: to get the MeningB date of vaccination to appear in the record, I used {MeningB_1}.
I would appreciate any assistance.
The fnGetVacDetails("MeningB","Y") that assigns the date to MeningB_1 is contained in the fndef-Immunization.txt file located in the C:\Program Files (x86)\Centricity Practice Solution\Client\Immunization folder. Here's a copy of that modified to pull the vaccine name instead of the date. I did this quickly so YMMV and needs additional modification. Paste the function definition into the fndef-Immunization.txt and add the function call fnGetVacNameDetails("MeningB","Y") in the letter temple. Since it uses the same MeningB_1 document variable it'll put in the date and name.
fn fnGetVacNameDetails(vacc_group,isOVac){
local vacArr, vaccName
local i, tempStr = ""
local varRecord = array()
local subVacName = "N"
if (vacc_group <> "") then
// This part is temporary...
if (vacc_group == "VARICELLA Chicken Pox") then
vacArr = fnGetVacListByGrp("VARICELLA")
else
vacArr = fnGetVacListByGrp(vacc_group)
endif
if vacArr <> "" then
vacArr = getfield(vacArr,"|","")
endif
if (match(vacc_group,1," ") > 0) then
vacc_group = replacestr(vacc_group," ","_")
endif
local vxGrpVal = ""
local addon = ""
if (size(vacArr) > 0) then
for i=1, i<=size(vacArr), i=i+1 do
vacRecord = getfield(vacArr[i],"^","")
vaccName = getfield(vacRecord[vaccineNameIndex],"^","")
cond
case vacRecord[7] == "N": addon = " NG"
case vacRecord[7] == "U": addon = " ?"
else addon = ""
endcond
//if (isOVac == "N" AND i <=6) then
if (isOVac == "N") then
vxGrpVal = eval(vacc_group + "_" + str(vacRecord[6]))
if (vxGrpVal == "") then
vxGrpVal = str(vaccName[1])
else
vxGrpVal = vxGrpVal + ", " + str(vaccName[1])
/* vxGrpVal = vxGrpVal + "\r\n" + str(vaccName[1])*/
endif
eval(vacc_group + "_" + vacRecord[vacSeriesIndex] + "=\'" + vxGrpVal + addon + "\'")
else
if (isOVac == "Y") then
vxGrpVal = eval(vacc_group + "_" + 1)
if (vxGrpVal == "") then
vxGrpVal = str(vaccName[1])
else
vxGrpVal = vxGrpVal + ", " + str(vaccName[1])
/* vxGrpVal = vxGrpVal + "\r\n" + str(vaccName[1])*/
endif
eval(vacc_group + "_1" + "=\'" + vxGrpVal + addon +"\'")
endif
endif
endfor
endif
endif
return ""
}
You'll also need to log out of Centricity and back in for the new function to be picked up. I should clarify you need to leave the original function in the fndef-Immunization.txt file and the original fnGetVacDetails("MeningB","Y") function call in the letter template to get the date. The new function will only return the name.
Thank you so much. I will let you know the outcome.