hl7 0.2.1

HL7® implementation using Rust: parse, navigate, validate, modify, and render Health Level Seven (HL7) messages. HL7 v2 (releases 2.1-2.9) lives in `hl7::v2`; the HL7 v3 RIM and message envelope in `hl7::v3`; room for `hl7::fhir` as that standard is implemented. HL7®, and FHIR® are the registered trademarks of Health Level Seven International and their use of these trademarks does not constitute an endorsement by HL7. This project is an independent work.
Documentation
//! Health Level Seven (HL7®) for Rust.
//!
//! HL7 is not one standard but a family of them, and they have little in
//! common beyond the name and the problem: v2 is delimited text, v3 is
//! XML, the HL7® FHIR® standard is resources over HTTP. So this crate is
//! organized by standard, one module each, and the module you want is the
//! version your senders speak:
//!
//! - [`v2`] — HL7 v2, releases 2.1 through 2.9. The format most healthcare
//!   data still moves in.
//! - [`v3`] — HL7 v3: the Reference Information Model, and the
//!   three-level message envelope built from it. A foundation, not a full
//!   implementation — see that module's own documentation for scope.
//!
//! ```
//! use hl7::v2;
//!
//! let message = v2::parse("MSH|^~\\&|LAB||EPIC||20240101||ORU^R01|1|P|2.5\r\
//!                          PID|1||241900||SMITH^JOHN")?;
//! assert_eq!(message.structure_id(), "ORU_R01");
//! assert_eq!(message.get("PID-5.1")?.as_deref(), Some("SMITH"));
//! # Ok::<(), v2::Error>(())
//! ```
//!
//! Each module is its own crate underneath — `hl7::v2` is the `hl7-2`
//! crate, `hl7::v3` is `hl7-3`, both re-exported here — so a caller who
//! wants only one standard can depend on that crate directly instead of
//! this umbrella:
//!
//! ```toml
//! [dependencies]
//! hl7-2 = "0.3"
//! ```
//!
//! Nothing lives at the root but the modules. A name that means one thing
//! in v2 means another in FHIR — a "message", a "segment", a "code" — and
//! flattening them into one namespace would only invite mixing them up.
//!
//! See [`v2`] for everything HL7 v2, and `hl7-2`'s `spec/index.md` for the
//! normative specification of it.
//!
//! # Trademarks
//!
//! HL7®, and FHIR® are the registered trademarks of Health Level Seven
//! International and their use of these trademarks does not constitute an
//! endorsement by HL7.

// No `unsafe` anywhere in this crate, enforced rather than merely true:
// `forbid` cannot be lifted by an `allow` further down, so this is a
// property a reviewer can rely on without reading the sources. See
// SECURITY.md.
#![forbid(unsafe_code)]
#![warn(missing_docs, clippy::pedantic)]

pub use hl7_2 as v2;
pub use hl7_3 as v3;