I am trying to loop through a certain field and get a dr. number out. This is an hl7 message and this field can repeat any number of times or none.
foreach Dr $OBRDrList {
set DrNumber [lindex [split $Dr $subSep] 0]
lappend DrCCList $DrNumber
echo DrCCList: $DrCCList
}
set value3 [tbllookup $table $Dr]
echo value3: $value3
if { $value3 eq "YES"} {
set dispList "CONTINUE"
break
}
echo dispList: $dispList
lappend dispList "$disp $mh"
What i am getting when echoing is:
DrCCList: 1234
DrCCList: 1234 1111
DrCCList: 1234 1111 2222
DrCCList: 1234 1111 2222 3333
DrCCList: 1234 1111 2222 3333 4444
i think when i do the tbllookup that it is looking at it as on big string, i want to pass the message on if any of the numbers is in a certain table. Hopefully this makes sense.
Thanks for any ideas.
foreach Dr $OBRDrList {
set DrNumber [lindex [split $Dr $subSep] 0]
lappend DrCCList $DrNumber
echo DrCCList: $DrCCList
}
set value3 [tbllookup $table $Dr]
echo value3: $value3
if { $value3 eq "YES"} {
set dispList "CONTINUE"
break
}
echo dispList: $dispList
lappend dispList "$disp $mh"
What i am getting when echoing is:
DrCCList: 1234
DrCCList: 1234 1111
DrCCList: 1234 1111 2222
DrCCList: 1234 1111 2222 3333
DrCCList: 1234 1111 2222 3333 4444
i think when i do the tbllookup that it is looking at it as on big string, i want to pass the message on if any of the numbers is in a certain table. Hopefully this makes sense.
Thanks for any ideas.