TCP/IP protocols mean that the data just starts coming in a stream, so how do you know where one HL7 message ends and the next one starts?
There is no set size. Some messages are quite concise, with a couple segments. Other HL7 standard messages are extremely long with repeating observation segments that contain an entire doctor’s report. Minimal Lower-Layer Protocol (MLP) is how you wrap an HL7 message with a header and footer to insure you know where a message starts, where a message stops, and where the next message starts.
These headers and trailers are usually non-printable characters that would not typically be in the content of HL7 messages.
The header is a vertical tab character <VT> its hex value is 0x0b.
The trailer is a field separator character <FS> (hex 0x1c) immediately followed by a carriage return <CR> (hex 0x0d)
It will look like this:
<VT>(hex 0x0b) |
HL7 Message goes here | <FS>(hex 0x1c) |
<CR>(hex 0x0d) |
You may find that some clinical applications do not adhere to this standard. In these cases, it is extremely helpful to have flexible interface tools to adjust to the custom wrapping or no wrapping such that HL7 messages are properly recognized by your system.
Related posts:
- HL7 Specifications Defined
- What Are Z Segments?
- What Are the Components of an HL7 Message?
- HL7 Escape Sequences
- What Is an ACK?




