S h o r t S t o r i e s

// Tales from software development

Line endings in HL7 messages

leave a comment »

Despite working with HL7 messages for several years I got caught out by what type of line endings to use when constructing an HL7 message.

I should point out that this is usually handled by the API or integration engine being used but I just needed a message file that I could throw at an MLLP Sender to test it. I remembered that the line endings were not Windows style CR/LF (0x0D/0x0A) and assumed it was UNIX style LF (0x0A) only to find that the message processor at the other end of the MLLP connection failed to parse the message correctly.

I checked the HL7 specifications and was surprised to find that the segment separator character is not 0x0A as you might expect but 0x0D.

So, if you want to think of segment separators as line ends, this corresponds to the old Mac line end style rather than UNIX.


Written by Sea Monkey

February 3, 2014 at 7:00 pm

Posted in Development, HL7

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: