- This topic has 4 replies, 4 voices, and was last updated 16 years, 2 months ago by .
-
Topic
-
In an Xlate, I created a COPY action and set the Pre Proc to the tcl proc called field_ScrubHL7AndOtherSpecialChars. The proc contains the following code:Code:proc field_ScrubHL7AndOtherSpecialChars {} {
upvar xlateId xlateId
xlateInList xlateInList
xlateInTypes xlateInTypes
xlateInVals xlateInVals
xlateOutList xlateOutList
xlateOutTypes xlateOutTypes
xlateOutVals xlateOutValslassign $xlateInVals InputData
set InputData [string map {\T\ AND \N\ ” ” \F\ ” ” \H\ ” ” \R\ ” ” \E\ ” ” \S\ ” “} $InputData]
set InputData [string map {/ ” ” \ ” ” % ” ” $ ” ” ! ” “} $InputData]
set InputData [string trimright $InputData]
set xlateOutVals [list $InputData]
}To test this tcl proc, I brought up the Testing Tool and set up the following:
Procs = field_ScrubHL7AndOtherSpecialChars Data File = field_scrub_test_data.txt
Run Mode
New Line Terminated
Caller Context = xlt_pre
The data file contains several lines of single field test data to test the above proc. The output after clicking the Run Command button is:
Code:Please Wait ……
Command Issued: hcitpstest -r run -f nl -c xlt_pre S:/quovadx/qdx5.5/integrator/pms/data/field_scrub_test_data.txt “field_ScrubHL7AndOtherSpecialChars”
Command output:[0:TEST] Tcl error:
msgId = message0
proc = ‘field_ScrubHL7AndOtherSpecialChars’
args = ”
result = ‘wrong # args: should be “field_ScrubHL7AndOtherSpecialChars”‘
errorInfo: ‘
wrong # args: should be “field_ScrubHL7AndOtherSpecialChars”
while executing
“field_ScrubHL7AndOtherSpecialChars {MSGID message0} {CONTEXT xlt_pre} {ARGS {}} {MODE run} {VERSION 3.0}”‘I know that the base tcl code works and the xlt wrapper is a clone from another xlt proc, so the question is how to set up the Testing Tool to correctly handle this as a XLT Pre Proc. Can anyone give me a direction to go with this?
Thanks.
Migration Consultant
Coffee Regional Medical Center
Eastern Time Zone
- The forum ‘Cloverleaf’ is closed to new topics and replies.