I am trying to add the following to a letter for patient Allergy List. I also want it to include the Reaction. Can anyone tell me what I am missing?
{ allList = all_active()
x = obsprev("nka")
if allList == "" and x == "T" then
nka_text()
else
all_active()
endif }
Thanks
We have this function in our utllib.txt
{! fn dispAllergy(strList)
{
local lCounter
local strAllergyList
local nStart
local strBuf
local cr = numtoascii(13)
local strFormattedList = ""
strAllergyList = getfield(strList, "|", "")
for lCounter = 1, lCounter <= size(strAllergyList), lCounter = lCounter + 1 do
strAllergyList[lCounter] = getfield(strAllergyList[lCounter], "^",
"")
strFormattedList = strFormattedList
strBuf = strAllergyList[lCounter][1] + if strAllergyList[lCounter][5] "" then " - " + strAllergyList[lCounter][5] + HRET else "" endif
strFormattedList = strFormattedList + strBuf + cr
endfor
if (lCounter > 1) then
strFormattedList = remove(strFormattedList,
size(strFormattedList))
endif
return "Allergies reviewed at this visit:" + HRET + strFormattedList
}
}
We call it like this (we use a quicktext)
{dispAllergy(ALL_AFTER("delimited"))}