Using a variable to address the xlate destination

Clovertech Forums Read Only Archives Cloverleaf Support Web Using a variable to address the xlate destination

  • Creator
    Topic
  • #55705
    david trafela
    Participant

      Hi everyone,

      I would like to use a variable in a xlate destination of the “Output Message Format” to address a repeating OBX field.

      I set successfully the variable with a “Copy” operation.

      But when I try to use the variable in the destination statement the variable will not used correctly and the variable will be “replaced” with 0.

      My try: 1(0).1(0).3(@obxNum).0(0).OBX(0).#1(0)

      Current result:   1(0).1(0).3(0).0(0).OBX(0).#1(0)

      Expected result: 1(0).1(0).3(3).0(0).OBX(0).#1(0)

      Thanks for any hint/solution to get the expected result.

      Best regards

    Viewing 1 reply thread
    • Author
      Replies
      • #86228
        Keith McLeod
        Participant

          For iterations and variables used in the HL7 path use a % variable.  For example, use %s9 or %s99, your choice.  You can reference and manipulate this variable by using the notation $%s9.

          I tend to use a Math Add

          Source

          $%s9

          =1

          Destination

          $%s9

          to increment

          Use %s9 in your path

          1(0).1(0).3(%s9).0(0).OBX(0).#1(0)

          You should be able to use this to control your outbound path and counter…

          Copy

          Source

          $%s9

          Destination

          1(0).1(0).3(%s9).0(0).OBX(0).#1(0)

          Hope this helps…  Your iteration variable on your source side should remain as you defined it in the iteration command.

        • #86229
          david trafela
          Participant

            Thank you Keith, this solved my problem.

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