hl7kit
Dependency-free HL7 v2.x parser and builder with byte spans for every node. See the
workspace README for an overview and the crate
documentation (cargo doc -p hl7kit --open) for the API.
let msg = parse?;
let patient = msg.get;
let span = msg.get_span; // where it is in `msg.raw()`
// Imaging-order identifiers, ORM^O01 (ZDS) and OMI^O23 (IPC) alike.
let order = extract;
order.study_uid; // IPC-3.1 first, ZDS-1.1 second
order.study_uid_source; // Some(StudyUidSource::Ipc3 | Zds1)
order.source_path; // "OBR-18" or "IPC-1.1"
order.warnings; // ConflictingStudyUid when IPC segments disagree
OrderField::paths() lists the candidate paths per field in precedence
order; path() is deprecated since 0.2.0.