ahall716 said:
I honestly am not sure what is happening but I added that exact line and this is what i got
{LabTestResults( ) <-Bad index
Stumped me man. It works for me in 9.5 and 10. What version do you have? Have you tried just creating a test flowsheet and changing the link to see if the error goes away? The only way I've been able to replicate the bad index is with a flowsheet that doesn't exist / bad path, and I know you've got yours correct. Who do you call for support? We use virtual office ware and they have been wonderful with handout issues...might need to punt it to them.
I have this same problem. If anyone has a soloution please share 🙂
I got the same thing. I dont have a solution but I know the cause. Its caused when it is reading something other than the standard numeric value. For ex: usually 24 is entered but sometimes 24ml/ul will be entered. That will throw off the formula.
How can we modify this to account for this?
emrlearning1 said:
I got the same thing. I dont have a solution but I know the cause. Its caused when it is reading something other than the standard numeric value. For ex: usually 24 is entered but sometimes 24ml/ul will be entered. That will throw off the formula.
How can we modify this to account for this?
I've never seen an observation term change the data entered to something totally different like that. But if you want the true numeric value then you'd just do val(obsterm)
Edit: 24 vs 24 ml/ul will not give you a bad index error.
There is a delimited version of the GET_FLOWSHEET VALUES() function. I modified a version of the function above, I didnt test it, but if you use this as a guide you should get yours to work
{fn fnCVS_LabTestResults(){
local list = ""
local sz, i, dt, tody, dur
local lablist, lab
local labs = GET_FLOWSHEET_VALUES("Enterprise\Printing\Chart_Summary\Current-Labs","DELIM")
if labs <> "" then
lablist = getfield(labs, "|", "")
sz = size(lablist)
for i = 1, i <= sz, i = i + 1 do
lab = getfield(lablist[i],"^","")
dt = lab[3]
tody = str(._todaysdate)
if size(lab) > 0 then
dur = durationdays(dt, tody)
if dur < 4 then
list = list + lab[1] + ": " + lab[2] +"\r\n"
else
list = list
endif
else
list = list
endif
endfor
if list == "" then list ="No lab results." endif
else
list="No lab results."
endif
return list
}}{fnCVS_LabTestResults()}
Thanks Michael, as usual you come to the rescue!!
Thank you also to chrishuff1.