Looking for help modifying a function that will filter problems in a data display based on the date of entry. Here is the current function that I am using to filter descriptions with an "*" and need to add a date filter.
{fnProbListFilter(PROB_AFTER("delimited"))}
in fuction library fnProbListFilter(strlist)
{!
local lCounter
local lProbArray
local lStart
local lBuffer
local lFormattedList = ""
/* Create array of problems */
lProbArray = getfield(strList, "|", "")
for lCounter = 1, lCounter <= size(lProbArray), lCounter = lCounter + 1 do
/* Create array for each problem */
lProbArray[lCounter] = getfield(lProbArray[lCounter], "^", "")
/*Confirm coded problem */
if match(lProbArray[lCounter][2],"*") = 0 or ProbArray[lCounter][10] <= 06/01/2015 then
/* Need to remove commas from problem name */
lBuffer = ReplaceStr(lProbArray[lCounter][2], ",", ";")
/* Append problem and ICD-9 code to formatted list */
lFormattedList = lFormattedList + lBuffer + " (" + lProbArray[lCounter][3] + ")" + " (" + lProbArray[lCounter][8] + ")" + " Entered/Modified: " + lProbArray[lCounter][10] + HRET
else ""
endif
endfor
/* Remove trailing comma */
if (lCounter > 1) then
lFormattedList = remove(lFormattedList, size(lFormattedList))
endif
/* Return comma separated list */
return (lFormattedList)
}
My attempt at the date, isn't working.
Thanks,
Sheri
when you say you want to filter the results, do you mean you want values only after a certain date, within a certain number of days/years of todays date, or find values for a specific date?
you will need to use lProbArray[lCounter][2] which will return the date of that particular obs value
I want to see problems from the problem list entered before a specific date, not an obsterm from the flowsheet.
im trying to post a function but it keeps deleting part of my post. what is your email address?
Ken ~ I did see part of your response in a "new answer" email from the forum, but not sure if it was the complete answer. Please feel free to email me your response.
Sheri
[email protected]