Creating Messages from Repeating Groups

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Creating Messages from Repeating Groups

  • Creator
    Topic
  • #53860
    Jon Melin
    Participant

      Hello,

      I am having an issue getting some functionality I thought would work, to work correctly. I have a message coming inbound that is structured like this:

      MSH

      PID

      PV1

      {

      {group 2}

      {ORC}

      {OBR}

      }

      It is for an order coming inbound and when they send the order, group one that contains MSH, PID, etc. comes over just once but the ORC and OBR come over once for each test ordered. So in a RIS example if they orders an ankle, chest, and foot xray I would get one group 1, and 3 repeating ORC, OBR segments.

      The downstream system needs a separate message for each test, so I thought I could iterate through the group that repeats (orc and obr) and just put a send command at the end. It does send the MSH and PID over again, but never as a separate message, and always with multiple orc and obr segments repeating.

      I know I am missing something simple here or making a mistake in my assumption, or possibly I need to add another iterate. Please let me know what you think.

      Attached is a screenshot of a basic Xlate.

      Thank you,

      Jon

    Viewing 8 reply threads
    • Author
      Replies
      • #79229
        Daniel Lee
        Participant

          I can’t tell exactly what is going on with what I’m seeing on the screen.

        • #79230
          Daniel Lee
          Participant

            PS.  I know that my screenshot has my PID and PV1 inside my itterate but that’s only because those segments repeat in an A17.  They do not repeat in your message so they shouldn’t be in your itterate.

          • #79231
            Jon Melin
            Participant

              Daniel,

              Thank you for the response. That is very helpful. The reason why I have the MSH, PID, and PV1 inside the iterate is because I want each message that is sent out to include that information, but I see what you mean. That has already been included in the output so it’s not needed since it doesn’t repeat. I did forget the suppress at the end, thank you for reminding me.

              It still seems to send (just viewing in testing tool) one large message though, but in the correct order. I have MSH, PID, PV1, ORC, OBR – and then right after OBR it starts with MSH again without being a “new” message. Not sure if this is just because it’s in the testing tool but it seems to be sending one large message, with the “correctly” formatted message structure I want, so three messages built into one. Thoughts?

              Thank you,

              Jon

            • #79232
              Daniel Lee
              Participant

                Show me your variant and what’s inside your itterate.

              • #79233
                Jon Melin
                Participant

                  Daniel,

                  The Xlate is pretty much the same one I had shown before. It’s very basic which is why it was so frustrating haha.

                  See attachment for Xlate and variant.

                  Thank you again,

                  Jon

                • #79234
                  James Cobane
                  Participant

                    Jon,

                    One additional note with respect to the use of SEND vs CONTINUE.  Using SEND will put the message directly to the outbound data queue (i.e. skipping all post-xlate processing), where CONTINUE will allow the messages to process through normally.  I just want to make sure you are aware of the difference, in the event you have any post-xlate tcl or such.

                    Jim Cobane

                    Henry Ford Health

                  • #79235
                    Jon Melin
                    Participant

                      James,

                      Thank you for the input, I could see that causing issues in the future, luckily this is a very basic route. Thanks again.

                      Jon

                    • #79236
                      Daniel Lee
                      Participant

                        That doesn’t seem to add up to me.  Can you send the basis for your itterate and a screenshot of the settings on the test tool when you run it?

                      • #79237
                        Jon Melin
                        Participant

                          Daniel,

                          I tested it through the route with test data and it does work. The testing tool just doesn’t show each message as an individual message. I appreciate your help.

                          Thank you again.

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