Crates
Crates
One page per workspace member — 14 of them — with what it does, what it depends on, what its features do, and a tour of its API. Start with hl7 or hl7-2 unless you know otherwise.
Core
The standards themselves, and the umbrella crate that re-exports them.
hl7
The umbrella crate: one module per HL7 standard
hl7-2
HL7 v2 itself: parse, navigate, validate, modify, render
hl7-3
HL7 v3: the RIM backbone, the data types, the message envelope
Transports
Getting messages across a network, and answering them.
hl7-2-mllp
MLLP: HL7 v2 framed on a TCP stream
hl7-2-soap
HL7 v2 carried in a SOAP envelope over HTTP
hl7-3-soap
HL7 v3 carried in a SOAP envelope over HTTP
Format conversions
ER7 in both directions against both target formats.
hl7-2-from-er7-into-xml
ER7 → the official v2.xml XML representation
hl7-2-from-xml-into-er7
v2.xml XML → ER7
hl7-2-from-er7-into-json
ER7 → typed JSON
hl7-2-from-json-into-er7
Typed JSON → ER7
Tooling and helpers
The macros, the dictionary builder, and the shared XML reader.
hl7-2-derive
#[derive(FromHl7)] and #[derive(ToHl7)] for struct mode
hl7-3-derive
#[derive(FromElement)] for HL7 v3 struct mode
hl7-2-from-xsd-into-json-dictionary
HL7 v2.xml XSDs → the JSON dictionary hl7-2 reads
hl7-2-xml-lite-helper
The small, dependency-free XML reader this family shares
And one crate outside the workspace
er7 is the ER7 encoding layer: delimiters,
escapes, paths, byte-for-byte rendering, and batch splitting. It has no dependencies of its own,
and it lives in its own repository, in its own
organization, rather than in this workspace — because plenty of people want the encoding
without the dictionary.
use er7::Message;
// Pipes and carets, with no opinion about what any field means.
let message = er7::parse(text)?;
assert_eq!(message.query("PID-5.1")?.as_deref(), Some("SMITH"));You rarely add it directly. hl7-2 and the conversion crates re-export what you
need, and hl7-2's byte-for-byte round-trip guarantee is really er7's guarantee, kept intact.
All of them, at a glance
| Crate | Layer | Version | Depends on | Spec | CLI |
|---|---|---|---|---|---|
hl7 | Core | 0.1.1 | hl7-2, hl7-3 | — | — |
hl7-2 | Core | 0.2.3 | er7 | yes | hl7-v2 |
hl7-3 | Core | 0.1.3 | hl7-2-xml-lite-helper | yes | — |
hl7-2-mllp | Transports | 0.1.3 | hl7-2 (feature `ack`), chrono (feature `clock`) | yes | — |
hl7-2-soap | Transports | 0.1.1 | hl7-2-xml-lite-helper | yes | — |
hl7-3-soap | Transports | 0.1.1 | hl7-2-xml-lite-helper | yes | — |
hl7-2-from-er7-into-xml | Format conversions | 0.6.0 | er7, hl7-2 | yes | hl7-2-from-er7-into-xml |
hl7-2-from-xml-into-er7 | Format conversions | 0.6.0 | er7, hl7-2-xml-lite-helper | yes | hl7-2-from-xml-into-er7 |
hl7-2-from-er7-into-json | Format conversions | 0.4.2 | er7 | yes | hl7-2-from-er7-into-json |
hl7-2-from-json-into-er7 | Format conversions | 0.4.2 | er7 | yes | hl7-2-from-json-into-er7 |
hl7-2-derive | Tooling and helpers | 0.1.3 | syn, quote | — | — |
hl7-3-derive | Tooling and helpers | 0.1.1 | syn, quote | — | — |
hl7-2-from-xsd-into-json-dictionary | Tooling and helpers | 0.1.1 | hl7-2-xml-lite-helper | yes | hl7-2-from-xsd-into-json-dictionary |
hl7-2-xml-lite-helper | Tooling and helpers | 0.1.1 | — | yes | — |
Versions are the latest published at the time of writing, shown so you can gauge how settled a crate is — not as a constraint to copy. See Versions and compatibility, and Architecture for why the seams fall where they do.