Announcement

Collapse
No announcement yet.

Insert Line Feed at end of HL7 Message

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Insert Line Feed at end of HL7 Message

    Hello,

    I need to insert a CRLF (\r\n) ONLY at the end of each outbound HL7 message.

    The Outbound Properties in the message template has an option to insert '\r\n' but only at the end of EVERY segment, rather than at the end of just the last segment, which is what I'm trying to do.

    I tried putting the '${message.encodedData}' in the Outbound Message Template and then pressing 'Enter' to insert the '\n' character right after the Velocity Template variable, but it still does not add the '\n' at the end of my HL7 message.

    I have also tried this in the Destination template, but it's not working either.

    Any suggestions would be appreciated.

    I'm using MirthConnect 3.0.0.6931.

    Thank you in advance.

  • #2
    That works fine for me, though I did test in the latest version (3.4).
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      How did you confirm the '\n' appearing at the end of the HL7 message? I'm right clicking on the encoded message in the Dashboard and selecting the 'Show Line Endings' option? Is there another way to verify?

      Comment


      • #4
        Originally posted by dwest View Post
        How did you confirm the '\n' appearing at the end of the HL7 message? I'm right clicking on the encoded message in the Dashboard and selecting the 'Show Line Endings' option? Is there another way to verify?
        Look at the Sent content instead of the Encoded. Or better yet, look at the message in the outbound system. Or if you want hard proof one way or another, get a network capture to see what's actually going over the wire.

        You can also temporarily set your destination to use a Channel Writer and route to a different channel. Then look at the Raw data in that downstream channel.
        Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

        Nicholas Rupley
        Work: 949-237-6069
        Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


        - How do I foo?
        - You just bar.

        Comment


        • #5
          what's a velocity template? Is that something new in Mirth?
          I am on 3.3.2 and don't see such thing.
          HL7v2.7 Certified Control Specialist!

          Comment


          • #6
            Originally posted by siddharth View Post
            what's a velocity template? Is that something new in Mirth?
            I am on 3.3.2 and don't see such thing.
            Any replaceable field supports Velocity templating, like ${varName}.
            Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

            Nicholas Rupley
            Work: 949-237-6069
            Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


            - How do I foo?
            - You just bar.

            Comment

            Working...
            X