The Lower Layer Protocol (LLP), sometimes referred to as the Minimal Lower Layer Protocol (MLLP), is the absolute standard for transmitting HL7 messages via TCP/IP. Since TCP/IP is a continuous stream of bytes, a wrapping protocol is required for communications code to be able to recognize the start and the end of each message. The Lower Layer Protocol is the most common mechanism for sending unencrypted HL7 via TCP/IP over a local area network, such as those found in a hospital.
When using LLP, an HL7 message must be wrapped using a header and trailer (also called a footer) to signify the beginning and end of a message. These headers and footers are usually non-printable characters that would not be shown in the actual content of an HL7 message.
The typical structure of an HL7 message being sent via LLP is described in the table below. It contains four parts:
|Header||HL7 Message||Trailer||Carriage Return|
|Vertical tab character (0x0B)||The HL7 message is wrapped using a header and trailer (immediately followed by a carriage return):
|Field separator character (0x1C)||Carriage return (0x0D)|
Moreover, you must also ensure that each segment is terminated by an 0x0D (carriage return) character. This is mandated by the standard, but often HL7 log data can be received via FTP or email where the segment separators have been transformed into 0x0A characters.