Testing an XLT Pre Proc for a COPY action

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Testing an XLT Pre Proc for a COPY action

  • Creator
    Topic
  • #50171
    Jon Blanchard
    Participant

      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   xlateOutVals

        lassign $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

    Viewing 3 reply threads
    Viewing 3 reply threads
    • The forum ‘Cloverleaf’ is closed to new topics and replies.