Hello,
Thank you I didn't post the function I have because I really don't understand it but I will post it. It was built in a form someone else built.
{!fn fnMedsDropdown(strList)
{
local lCounter
local strMedicationList
local strBuf
local strFormattedList = ""
strMedicationList = getfield(strList, "|", "")
for lCounter = 1, lCounter <= size(strMedicationList), lCounter = lCounter + 1 do
strMedicationList[lCounter] = getfield(strMedicationList[lCounter], "^", "")
/* strFormattedList = strFormattedList + fnConvertMedicationTypeToString(strMedicationList[lCounter][1], FALSE) /* Number and prefix */
/* Need to remove commas from medication name */
strBuf = strMedicationList[lCounter][1]
strBuf = ReplaceStr(strBuf, ",", "\,")
cond
case
match(strMedicationList[lCounter][4],"2210") > 0 OR
match(strMedicationList[lCounter][4],"4110") > 0 OR
match(strMedicationList[lCounter][4],"4120") > 0 OR
match(strMedicationList[lCounter][4],"4155") > 0 OR
match(strMedicationList[lCounter][4],"4199") > 0 OR
match(strMedicationList[lCounter][4],"4210") > 0 OR
match(strMedicationList[lCounter][4],"4220") > 0 OR
match(strMedicationList[lCounter][4],"4230") > 0 OR
match(strMedicationList[lCounter][4],"4240") > 0 OR
match(strMedicationList[lCounter][4],"4399") > 0 OR
match(strMedicationList[lCounter][4],"4410") > 0 OR
match(strMedicationList[lCounter][4],"4415") > 0 OR
match(strMedicationList[lCounter][4],"4420") > 0 OR
match(strMedicationList[lCounter][4],"4430") > 0 OR
match(strMedicationList[lCounter][4],"4440") > 0 OR
match(strMedicationList[lCounter][4],"4450") > 0 OR
match(strMedicationList[lCounter][4],"4460") > 0 OR
match(strMedicationList[lCounter][4],"4499") > 0 OR
match(strMedicationList[lCounter][4],"5216") > 0 OR
match(strMedicationList[lCounter][4],"5720") > 0 OR
match(strMedicationList[lCounter][4],"6030") > 0 OR
match(strMedicationList[lCounter][4],"6499") > 0 OR
match(strMedicationList[lCounter][4],"8630") > 0 OR
match(strMedicationList[lCounter][4],"8680") > 0 OR
match(strMedicationList[lCounter][4],"8825") > 0 OR
match(strMedicationList[lCounter][4],"9015") > 0 OR
match(strMedicationList[lCounter][4],"9020") > 0 OR
match(strMedicationList[lCounter][4],"9055") > 0
/* strFormattedList = strFormattedList + strBuf + " (" + strMedicationList[lCounter][3] + ")" + "," */
strFormattedList = strFormattedList + strBuf + " (" + strMedicationList[lCounter][2] + ")" + ","
endcond
endfor
if (lCounter > 1) then
strFormattedList = remove(strFormattedList, size(strFormattedList))
endif
return strFormattedList
}
It works good but does not bring in the instructions for the medication.
**Gibsonmi I will try this and play around with it . It seems a little simpler than the one I currently have.
Thanks a bunch!
Posted : October 21, 2014 9:41 am