ITERATE-PATHCOPY Help

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ITERATE-PATHCOPY Help

  • Creator
    Topic
  • #49042
    David Teh
    Participant

      Hi folks,

      I’ve set up an ITERATE:

          Type: list

          Basis: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

                    25 26 27 28 29 30

          Variable: %s1

      with a PATHCOPY action:

          Source: 0(0).OBX(%s1)

          Destination: 0(0).OBX(%s1)

      I tested the XLT (same IB/OB format) with a message with 28 OBXs. In the output message, I am getting extra OBX segments:

      OBX|M

      OBX|M

      OBX|M

      What am I doing wrong? Where did the ‘M’ come from?

      TIA!

    Viewing 4 reply threads
    • Author
      Replies
      • #60535
        James Cobane
        Participant

          David,

          Since you are using a LIST basis with 31 elements in the list, you are forcing the ITERATE to perform 31 PATHCOPY’s; the M is probably residual data from the 28th OBX.  If you only want to copy the available OBX’s, then you should be using a SEGMENT level iteration.

          Hope this helps.

          Jim Cobane

          Henry Ford Health

        • #60536
          David Teh
          Participant

            Hi James,

            Will test it out!

            Am I correct to say with SEGMENT level iteration, I still need to specify a finite range of basis? If the source is telling me there is no limit on the number of OBXs, how can I cater for that?

            THANKS!!!

            James Cobane wrote:

            David,

            Since you are using a LIST basis with 31 elements in the list, you are forcing the ITERATE to perform 31 PATHCOPY’s; the M is probably residual data from the 28th OBX.  If you only want to copy the available OBX’s, then you should be using a SEGMENT level iteration.

            Hope this helps.

            Jim Cobane

            Henry Ford Health

          • #60537
            David Teh
            Participant

              Cool! Got it done!

              ITERATE

              Type: segment

              Basis: 0(0).OBX

              Variable: %s1

              PATHCOPY:

              %s1->%s1

              Thanks!!!!

              David Teh wrote:

              Hi James,

              Will test it out!

              Am I correct to say with SEGMENT level iteration, I still need to specify a finite range of basis? If the source is telling me there is no limit on the number of OBXs, how can I cater for that?

              THANKS!!!

              James Cobane wrote:

              David,

              Since you are using a LIST basis with 31 elements in the list, you are forcing the ITERATE to perform 31 PATHCOPY’s; the M is probably residual data from the 28th OBX.  If you only want to copy the available OBX’s, then you should be using a SEGMENT level iteration.

              Hope this helps.

              Jim Cobane

              Henry Ford Health

            • #60538
              David Teh
              Participant

                Hi folks,

                If I am to use a similar method (as below) to do this

                PATHCOPY: @null->%s1,

                I get this error in the tester:

                “Unable to locate separator characters”

                I basically want to kill the OBX segments using XLT and the HL7 format cannot be changed. The number of repeating OBX segments is unknown.

                Thanks!

                David Teh wrote:

                Cool! Got it done!

                ITERATE

                Type: segment

                Basis: 0(0).OBX

                Variable: %s1

                PATHCOPY:

                %s1->%s1

                Thanks!!!!

                David Teh wrote:

                Hi James,

                Will test it out!

                Am I correct to say with SEGMENT level iteration, I still need to specify a finite range of basis? If the source is telling me there is no limit on the number of OBXs, how can I cater for that?

                THANKS!!!

                James Cobane wrote:

                David,

                Since you are using a LIST basis with 31 elements in the list, you are forcing the ITERATE to perform 31 PATHCOPY’s; the M is probably residual data from the 28th OBX.  If you only want to copy the available OBX’s, then you should be using a SEGMENT level iteration.

                Hope this helps.

                Jim Cobane

                Henry Ford Health

              • #60539
                David Teh
                Participant

                  Solved.

                  PATHCOPY

                  @null->0(0).OBX(%s1)

                  🙂

                  David Teh wrote:

                  Hi folks,

                  If I am to use a similar method (as below) to do this

                  PATHCOPY: @null->%s1,

                  I get this error in the tester:

                  “Unable to locate separator characters”

                  I basically want to kill the OBX segments using XLT and the HL7 format cannot be changed. The number of repeating OBX segments is unknown.

                  Thanks!

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