Help

Help

Answers to the questions that come up before the first line of code, symptoms and fixes for the failures people actually hit, and where to ask when neither covers it.

In this section

Where to look first

  1. The crate's own spec/index.md — numbered section by section, and the single source of truth. If the spec and anything else disagree, the spec is right. See Specifications.
  2. docs.rs for the crate, which is generated from the code that actually shipped.
  3. Troubleshooting on this site, for the failures with a known cause.
  4. The repository at github.com/hl7-rust/hl7-rust — issues, and the crate's own AGENTS.md, which documents the conventions a change has to meet.

Quick answers

Which crate do I install?
cargo add hl7, and use hl7::v2. See Which crate do I need?
Why is the binary called hl7-v2 when the crate is hl7-2?
hl7-v2 on crates.io is an unrelated package, so the crate took the other name; the binary kept the readable one. See the crate page.
My message has segments the standard does not define. Is that a problem?
No. Unknown segments convert positionally and never fail a parse, and a Z-segment does not fail strict mode either. When you want them named, write a dictionary.
Is any of this a validator?
hl7-2 checks a message against its dictionary and reports diagnostics. The four conversion crates check nothing at all. See Validating.
Can I use these commercially?
Yes. Every crate is offered under MIT, Apache-2.0, BSD-3-Clause, GPL-2.0-only, or GPL-3.0-only, at your option. See Licensing.
Is FHIR supported?
Not yet. The umbrella crate deliberately leaves hl7::fhir free for it.

More at the FAQ, and the organization's other repositories are at github.com/hl7-rust.