web stats
Insert Line Feed at end of HL7 Message - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2016, 09:34 AM
dwest dwest is offline
What's HL7?
 
Join Date: Feb 2015
Posts: 4
dwest is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 05-18-2016, 10:40 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,119
narupley is on a distinguished road
Default

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.
Reply With Quote
  #3  
Old 05-18-2016, 11:09 AM
dwest dwest is offline
What's HL7?
 
Join Date: Feb 2015
Posts: 4
dwest is on a distinguished road
Default

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?
Reply With Quote
  #4  
Old 05-18-2016, 12:39 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,119
narupley is on a distinguished road
Default

Quote:
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.
Reply With Quote
  #5  
Old 05-19-2016, 02:42 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 832
siddharth is on a distinguished road
Default

what's a velocity template? Is that something new in Mirth?
I am on 3.3.2 and don't see such thing.
Reply With Quote
  #6  
Old 05-20-2016, 06:46 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,119
narupley is on a distinguished road
Default

Quote:
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.
Reply With Quote
Reply

Tags
crlf, line feed, postprocessor, preprocesser, velocity template

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:30 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation