Minimal Lower Layer Protocol (MLLP)

Minimal Lower Layer Protocol (MLLP) is a minimalistic transport protocol for HL7 v2 messaging.

Message Format

<START_BLOCK><DATA><END_BLOCK><CR>

where:

Minimal MLLP Bash Sender

#!/bin/bash
set -o errexit
exec 3<>/dev/tcp/${1}/${2}
echo -n -e "\x0b$(cat ${3})\x1c\x0d" >&3
cat | tr '\r' '\n' <&3
echo

Minimal MLLP Bash Receiver

nc -l -k -p PORT | tr '\r' '\n'

Editing HL7 Files

HL7 message files can be edited with any text editor as long as the editor doesn't apply any line end conversions. E.g. with vim use -b (binary mode).

Page Metadata

Source: mllp.md Created: 2024-01-09T08:54:42+02:00 Changed: 2025-02-13T15:46:03+02:00