We are trying to do this in a tcl pre-proc so the messages won’t get to the xlt. I have added echo statements and can see where the values are being returned. When I execute the code in the testing tool:
#
MOD 1
set EMPTY 1
# Get PID segment fields
set PID [split [lindex $segList 2] $fldSep]
set PID_7 [split [lindex $PID 7] $subSep]
set PID_8 [split [lindex $PID 8] $subSep]
set Len_PID_7 [llength $PID_7]
set Len_PID_8 [llength $PID_8]
if {[$Len_PID_7] < [$EMPTY] && [$Len_PID_8] < [$EMPTY]} {
return KILL}
#
end of MOD 1
…it errors with:
[0:TEST] Tcl error:
msgId = message0
proc = ‘ID_ADT_Cerner_To_CarePricer’
args = ”
result = ‘invalid command name “1”‘
errorInfo: ‘
invalid command name “1”
while executing
“$Len_PID_7”
(procedure “dbSubs::parseHL7” line 41)
I’m sure it is something really dumb, but everything I’ve tried doesn’t seem to work.