I have a dynamic dropdown with the following function:
{fnProbDropdown(PROB_AFTER("delimited"))}
This is the mel code to populate the dynamic list:
!fn fnProbDropdown(strList)
{
local strProblemList
local nStart
local strBuf
local strFormattedList = ""
strProblemList = getfield(strList, "|", "")
for i = 1, i <= size(strProblemList), i = i + 1 do
strProblemList[i] = getfield(strProblemList[i], "^", "")
strFormattedList = strFormattedList + str(i) + ". " + fnConvertProblemTypeToString(strProblemList[i][1], FALSE) /* Number and prefix */
/* Need to remove commas from problem name */
strBuf = strProblemList[i][2]
strBuf = ReplaceStr(strBuf, ",", "\,")
strFormattedList = strFormattedList + strBuf + ","
endfor
if (i > 1) then
strFormattedList = remove(strFormattedList, size(strFormattedList))
endif
return strFormattedList
}
I am getting the problem list, however it does not have the problem code with it. I need to have the ICD code to show with the problem. Can someone tell me what I need to do to make it show up? The list also has the problems numbered. I would like to have the list unnumbered.
replace:
strFormattedList = strFormattedList + str(i) + ". " + fnConvertProblemTypeToString(strProblemList[i][1], FALSE) /* Number and prefix */
/* Need to remove commas from problem name */
strBuf = strProblemList[i][2]
with:
strFormattedList = strFormattedList + fnConvertProblemTypeToString(strProblemList[i][1], FALSE) /* Number and prefix */
/* Need to remove commas from problem name */
strBuf = strProblemList[i][3] + " " + strProblemList[i][2]
That worked! Thanks so much.