xlateOutVals not populating

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf xlateOutVals not populating

  • Creator
    Topic
  • #48812
    Joseph Paquette
    Participant

      I have a code frag that i call from a file with a few other code frags in it.  Basically i am stripping a – character from a Meditech order number,  The order number is in the format of ecg-20060918-0001  i want to strip the first- character.  Here is my code.

      ######################################################################

      # Name: xltp_fixordnum

      # Purpose:

      # UPoC type: xltp

      # Args: none

      # Notes: All data is presented through special variables.  The initial

      # upvar in this proc provides access to the required variables.

      #

      # This proc style only works when called from a code fragment

      # within an XLT.

      #

      # Purpose: to remove the first dash in the order number

      #

      # Usage: this will be called as a code fragemnt to fix the order number for the OSU

      proc xltp_fixOrdnum {} {

         upvar xlateId       xlateId

       xlateInList   xlateInList

       xlateInTypes  xlateInTypes

       xlateInVals   xlateInVals

       xlateOutList  xlateOutList

       xlateOutTypes xlateOutTypes

       xlateOutVals  xlateOutVals

      set ordnum [lindex $xlateInVals 0]

      echo “order number: ” $ordnum

      set ordnumLength [string length $ordnum]

      echo “length: ” $ordnumLength

      set count 0

      set neword “”

      while {$count != $ordnumLength} {

      set chr [string index $ordnum $count]

      if {$count != “3”} {

      append neword $chr }

      incr count 1 }

      echo “neword: ” $neword

      set xlateOutVals

        }

        Here is my log,  from a translate i am copying the order number and calling the code frag.. It is not triming the value out when the message leaves the engine.  Seems like the value of the neword varible is not populating to xlateOutVals however if i echo the xlateOutVals it does show the order number without the dash character.  I do need the second dash though.  Here is a shot of the logs to show that the code is doing what it should,  except for putting it back in place.

        [prod:prod:INFO/0:  STARTUP_TID] Engine process is 5380 on host wpmusetests1

        [prod:prod:INFO/1:nw_muse_OB_results_cmd] Msg space limit is 0

        [prod:prod:INFO/0:nw_muse_OB_results_cmd] DiskQue Minimum # of Messages/que: 50

        [prod:prod:INFO/0:nw_muse_OB_results_cmd] DiskQue Virtual Memory percent:75.000000

        [prod:prod:INFO/0:nw_muse_OB_results_cmd] Applying EO config: ”

        [prod:prod:INFO/0:nw_muse_OB_results_xlate] Applying EO config: ”

        [prod:prod:INFO/0:nw_muse_OB_ORU] Applying EO config: ”

        [prod:prod:INFO/0:nw_muse_ORU_his] Applying EO config: ”

        TrxID based on MSH-3 is: MUSE ECG Result 1

        order number:  ECG-20060921-0004

        length:  17

        neword:  ECG20060921-0004

        Engine idle — 09/29/2006 19:25:13

    Viewing 1 reply thread
    • Author
      Replies
      • #59786
        Michael Hertel
        Participant

          Your proc looks good to me.

          I would look for something down the line that is not working.

          -mh

        • #59787
          Joseph Paquette
          Participant

            Well.. my code was doing what it was supposed to,  had a second copy command in my xlate that was putting back the original value,  once i deleted that line the code frag worked as designed.. Thanks for the assistance.

            Joe

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