Minimal Lower Layer Protocol (MLLP) is a minimalistic transport protocol for HL7 v2 messaging.
<START_BLOCK><DATA><END_BLOCK><CR>
where:
<START_BLOCK> is 0x0b<DATA> is an HL7 message where segments are separated by <CR><END_BLOCK> is 0x1c<CR> is 0x0d${1} is the host${2} is the port${3} is the name of HL7 message file (see <DATA> above)#!/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
nc -l -k -p PORT | tr '\r' '\n'
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).
Source: mllp.md Created: 2024-01-09T08:54:42+02:00 Changed: 2025-02-13T15:46:03+02:00