Originally posted by Kyley Jex
Within an HL7 xlate I'd like to error the message for those fields that do a table lookup and the value is not found in the table. Below is the snippet of Tcl code that provide in a COPY action. It works correctly to ERROR the message, but I'd like to set the userData as the reason error message.
lassign $xlateInVals input_1
set tvalue [tbllookup 0004.tbl $input_1]
if {[string equal $tvalue ""]} {
error "$input_1 is invalid for Patient Class"
} else {
set xlateOutVals [list $tvalue]
}
Can I set the userData from the Tcl snippet? or do I have to CALL a TclProc?
Cheers,
Kyley