Iteration issue

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iteration issue

  • Creator
    Topic
  • #54146
    Eric Wright
    Participant

      I have an iteration loop in a translation of mine that isn’t working correctly.  Action: Iterate

      Type: Group

      Basis: 3(0).0

      Variable: %g1

      Pathcopy:

      3(0).0(%g1).IN1(0) –> 1(0).0(%g1).IN1(0)

      setup of inbound variant:

      3[…]

      [

      3.0 {…}

      IN1

      [IN2]

      }

      ]

      Inbound Address (seen in testing tool): 3(0).0(0).IN1(0)

      setup of outbound variant:

      1[…]

      [

      1.0 {…}

      {

      IN1

      [IN2]

      }

      ]

      Outbound address (as seen in testing tool): 1(0).0(0).IN1(0)

      As far as I can tell, everything is addressed correctly, and I’ve used iterations in a hundred translations…and for some reason this won’t work.

      I put an echo in my code and can see that it’s iterating, and it’s copying over the first group, so I have no idea why it’s having trouble copying over the second.

      Also, when testing a specific message with 2 repetitions of the IN1/IN2 group, I hard coded the pathcopy to move both over, and it only brought over 1.  When I removed the first group from the message, and made the second group be the only group (thinking maybe it was the actual information in the first group), the second group copied over fine, so it doesn’t look like it’s the content.

      AAAANNNDDD…to make me feel like I’m losing my mind even more, there are two translations that are identical that are failing, and one that is almost identical (moving group 3 to group 5, instead of group 3 being moved to group 1 is the only difference) and that one works completely fine.

      Anyone have any ideas?

    Viewing 3 reply threads
    • Author
      Replies
      • #80333
        Jim Kosloskey
        Participant

          Eric,

          My first guess would be your basis is not correct.

          Have you run the inbound message through the HL/7 tester using the inbound variant?

          If so does the repetition for the INx group occur where you expect it?

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #80334
          Eric Wright
          Participant

            Hey Jim,

            Here’s what I have for the Inbound HL7

            3(0).0(0).IN1(0)

            3(0).0(0).IN2(0)

            3(0).0(1).IN1(0)

            3(0).0(1).IN2(0)

            Here’s what I have for the outbound:

            1(0).0(0).IN1(0)

            1(0).0(0).IN2(0)

            what it should look like if there’s a second:

            1(0).0(1).IN1(0)

            1(0).0(1).IN2(0)

          • #80335
            Jim Kosloskey
            Participant

              Eric,

              So it appears your basis matches the variant and the variant appears to match the message.

              Please show me your outbound message structure screen shot from the HL/7 Configurator IDE.

              Just checking the basics here now to see if there is a potential outbound variant issue.

              Also is this inside an IF?

              What release of Cloverleaf?

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #80336
              Eric Wright
              Participant

                Hey Jim,

                This is inside an if, but in an effort to eliminate that as the possible problem I removed it and found the same problem.  I also tried to eliminate the iterate as the problem and hard coded it to pathcopy two IN1 and two IN2 segments to the correct addresses, and it failed as well.  I attached the screenshot of the inbound and outbound message formats in the translation gui.

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