So I have a list box box that pulls the patient's problem list. It works fine as a dropdown list, but it's having an issue with some checks not sticking. I think I limited down to it being certain problems, but I don't see how that could be when using a dynamic list choice box it isn't looking at one particular/specific choice.
Any-who here is the test form that I pulled the list box out to use as bare bones testing.
Here's thew code to get the prob list and format it:
/* Function for support of dropdown to choose form */
!fn fnFormatFormList(strList)
{
strList = getfield(strList, ",", "")
strList = str(strList, "\,")
strList = getfield(strList, "^", "")
strList = str(strList, "")
strList = getfield(strList, "|", "")
strList = str(strList, ",")
}
!fn fnConvertProblemTypeToString(strType, bIncludeDx)
{
strType = tolower(strType)
cond
case (strType == "dx of")
if (bIncludeDx) then
return ("Diagnosis of ")
else
return ("")
endif
case (strType == "mdxof")
return ("Minor diagnosis of ")
case (strType == "h/f")
return ("Hospitalized for ")
case (strType == "hx of")
return ("History of ")
case (strType == "s/p")
return ("Status post ")
case (strType == "r/o")
return ("Rule out ")
case (strType == "? of")
return ("Question of ")
case (strType == "sx of")
return ("Symptom of ")
case (strType == "rs of")
return ("Risk of ")
case (strType == "note:")
return ("Take note of ")
case (strType == "fh of")
return ("Family history of ")
endcond
return ("")
}
!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
}
Posted : September 18, 2014 9:38 pm