Separating hl7 message w/ multiple FT1 segments

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Separating hl7 message w/ multiple FT1 segments

  • Creator
    Topic
  • #50778
    Yvonne Gaffney
    Participant

      I am in need of some direction.  Would it be quicker to use a translate or tcl script to separate an hl7 message with multiple FT1 segments into a message per FT1 segment.   🙄 ??

    Viewing 4 reply threads
    • Author
      Replies
      • #67483
        Robert Milfajt
        Participant

          Yes.   😮

          In my opinion, either way works, and it is up your comfort level in writing and supporting in the future.

          The Xlate is probably more user friendly, in that you iterate through the FT1s and CONTINUE for each one after copying the segment, quick and easy.

          In a TCL proc, you have to create a message handle for each message you create, and manage all that back end stuff that the Xlate does for you natively, and still loop through all the FT1s and create the new messages.

          Hope this helps,

          Robert Milfajt
          Northwestern Medicine
          Chicago, IL

        • #67484
          Jim Kosloskey
          Participant

            Define quicker.

            If it were me I would do it in an Xlate (I do stuff like that all the time in an Xlate). It is easier for others to understand what is going on because even a Level 1 person should be able to follow an Xlate – especially if properly commented.

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

          • #67485
            Yvonne Gaffney
            Participant

              Great response gentlemen!

              It was actually much easier than I expected 😀 !!  I also liked the idea that a level 1 person would understand what I did.

              Thanks so much for your help!!

            • #67486
              Kevin Scantlan
              Participant

                Like the other guys said, you put a SEND at the end the FT1 iteration loop, but make sure you place a SUPRESS as the last statement of the Xlate outside of the loop.  Otherwise, the Xlate will try and send another message as it exits the translate.

              • #67487
                Jim Kosloskey
                Participant

                  Yvonne,

                  You need to understand the difference between SEND and CONTINUE in the Xlate.

                  SEND sends the message directly to the outbound thread bypassing any followon processing such as post Xlate procs.

                  CONTINUE moves the message to the next step in the engine (typically the post Xlate procs).

                  I like to use CONTINUE because if ever I need to later add a post Xlate proc my I do not need to remember to change the Xlate to a CONTINUE. If I forget to change the Xlate to a CONTINUE then my post Xlate proc won’t get initiated and I will have some trouble determining why.

                  On the other hand, with a CONTINUE, the mesage always gets to the outbound thread as the Xlate built it if I do not have any post Xlate processing procs (for example) and if I later determine I need post Xlate processing I do not need to change the Xlate.

                  Your choice…

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

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