Can an HL7 message contain MLLP?

581 views Asked by At

I'm not entirely sure that this is the right place for it - if so, this question should be "Where should I ask this question?" ;)

I have some code I'm maintaining that is parsing out HL7 and MLLP. It opens the MLLP message and sends it to the HL7 parser. Which sends it right back to the MLLP parser. As you can imagine, this goes poorly, quickly.

I'm fairly new to HL7/MLLP, but I'm really confused and also pretty sure that HL7 shouldn't contain another MLLP message. If this is allowed, could I get a link/quote to some documentation stating that?

2

There are 2 answers

1
sqlab On BEST ANSWER

Just use escape sequences to mask the MLLP codes see http://www.hl7standards.com/blog/2006/11/02/hl7-escape-sequences/

But if you only want to send more than one HL7-Message in just one MLLP envelope, I would use batch processing with FHS and BHS segments

0
Justin Ohms On

While perhaps not the same as the issue you are describing, it is not uncommon for HL7 messages to end up being double wrapped in MLLP envelopes. This is particularly if the message is transitioning through another system. (say from a billing system, through an EHR)

a standard envelope is

<VT>...hl7data...<FS><CR>

but a double wrapped message will look like this

<VT><VT>...hl7data...<FS><CR><FS><CR>

It's just something to look out for. And should be corrected by the system in the middle unwrapping and rewrapping the message correctly.