HL7 v2 messages (ER7): parse, read and build with terser paths, escapes, character sets and acknowledgements; MLLP client, listener and server
[decks]
"@deckyard/hl7" = "^0.1.0"| Version | Status | Kind | Pin | Requires | Engines | Capabilities |
|---|---|---|---|---|---|---|
| 0.1.0 | live | git | a49f6906d584 | - | jennifer >=0.26.0 | net |
LGPL-3.0-only
0.1.0HL7 version 2 for Jennifer programs: parse, read, change and build ADT, ORU, ORM, SIU and any other message in the pipe-delimited encoding, with terser-style paths (PID-5-1, OBX(2)-5), escapes, character sets from MSH-18 and acknowledgements; and send, receive and serve them over MLLP. Strict: input that breaks HL7's encoding is an error, and an unchanged message encodes back byte for byte.
jvc add @deckyard/hl7This vendors the deck to vendor/<scope>/hl7/. Without jvc, unpack the src/ subtree of a release archive (<scope>-hl7-<version>.tar.gz) there.
use io;
import "@deckyard/hl7/" as hl7;
def m as hl7.Message init hl7.parse($text);
io.printf("%s, %s\n", hl7.get($m, "PID-5-1"), hl7.get($m, "PID-5-2"));
for (def obx in hl7.segmentsOf($m, "OBX")) {
io.printf("%s = %s\n", hl7.component($obx, 3, 1, 2), hl7.field($obx, 5));
}Jennifer 0.26.0 or newer and the default jennifer binary: MLLP needs net, which the stock jennifer-tiny lacks.
tools/check-all.sh # the full gate, as CI runs it
jennifer test src/hl7_test.j # the tests, with a scripted MLLP peer
tools/check-docs.sh # docs against the code
tools/pack.sh dist # build the release archiveLGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <[email protected]>.
tools/check-headers.sh checks every source file's SPDX header against deck.toml.