{
"name": "fhir",
"version": "1.1.0",
"description": "A Rust implementation of the HL7 FHIR data model, plus a spec-driven code generator that produces it from the official FHIR specification JSON. Three releases are modelled, R5 (5.0.0), R4 (4.0.1) and R3 (3.0.2, also called STU3), as separate module trees and separate cargo features. Every resource and datatype is a serde-serializable Rust type that round-trips to and from canonical FHIR JSON.",
"repository": "https://github.com/joelparkerhenderson/fhir-rust-crate/",
"import_as": "fhir",
"modules": {
"r5": "FHIR Release 5 (5.0.0) API root (feature `r5`, on by default).",
"r4": "FHIR Release 4 (4.0.1) API root (feature `r4`). Same shape as `r5`; generated by `cargo run -- r4`.",
"r3": "FHIR Release 3 (3.0.2, also called STU3) API root (feature `r3`). Same shape as `r5`; generated by `cargo run -- r3`.",
"r5::resources": "The 158 R5 resources as structs, plus the polymorphic `Resource` enum tagged by `resourceType`.",
"r4::resources": "The 146 R4 resources as structs, plus the polymorphic `Resource` enum tagged by `resourceType`.",
"r3::resources": "The 117 R3 resources as structs, plus the polymorphic `Resource` enum tagged by `resourceType`.",
"r5::types": "The ~50 complex datatypes and 21 primitive newtypes. Primitives serialize transparently to their underlying JSON value.",
"r4::types": "The 43 complex datatypes and 20 primitive newtypes. Primitives serialize transparently to their underlying JSON value.",
"r3::types": "The 36 complex datatypes and 18 primitive newtypes. Primitives serialize transparently to their underlying JSON value.",
"r5::codes": "FHIR CodeSystems as type-safe enums.",
"r4::codes": "FHIR CodeSystems as type-safe enums.",
"r3::codes": "FHIR CodeSystems as type-safe enums.",
"r5::validate": "The `Validate` trait and `#[derive(Validate)]`, reporting pathed `ValidationIssue`s.",
"r4::validate": "The `Validate` trait and `#[derive(Validate)]`, reporting pathed `ValidationIssue`s.",
"r3::validate": "The `Validate` trait and `#[derive(Validate)]`, reporting pathed `ValidationIssue`s.",
"r5::meta": "Per-element metadata extracted from the specification (cardinality, bindings, value[x] choice types, reference target profiles, summary membership), queryable by FHIR path.",
"r4::meta": "Per-element metadata extracted from the specification (cardinality, bindings, value[x] choice types, reference target profiles, summary membership), queryable by FHIR path.",
"r3::meta": "Per-element metadata extracted from the specification (cardinality, bindings, value[x] choice types, reference target profiles, summary membership), queryable by FHIR path.",
"r5::choice": "Support types for value[x] choice enums (Primitive<T>) plus the FhirChoice derive.",
"r4::choice": "Support types for value[x] choice enums (Primitive<T>) plus the FhirChoice derive.",
"r3::choice": "Support types for value[x] choice enums (Primitive<T>) plus the FhirChoice derive.",
"r5::coded": "The Coded<E> wrapper typing required-binding fields as their codes enum with an Unknown(String) fallback.",
"r4::coded": "The Coded<E> wrapper typing required-binding fields as their codes enum with an Unknown(String) fallback.",
"r3::coded": "The Coded<E> wrapper typing required-binding fields as their codes enum with an Unknown(String) fallback.",
"r5::extension_ext": "The ExtensionExt/ModifierExtensionExt traits: extension(url), extensions(url), set_extension, add_extension.",
"r4::extension_ext": "The ExtensionExt/ModifierExtensionExt traits: extension(url), extensions(url), set_extension, add_extension.",
"r3::extension_ext": "The ExtensionExt/ModifierExtensionExt traits: extension(url), extensions(url), set_extension, add_extension.",
"r5::builder": "BuilderError for the generated Type::builder() builders.",
"r4::builder": "BuilderError for the generated Type::builder() builders.",
"r3::builder": "BuilderError for the generated Type::builder() builders.",
"r5::bundle_util": "Bundle iteration (iter_resources, resources::<T>), next_link paging, and the transaction/batch builder.",
"r4::bundle_util": "Bundle iteration (iter_resources, resources::<T>), next_link paging, and the transaction/batch builder.",
"r3::bundle_util": "Bundle iteration (iter_resources, resources::<T>), next_link paging, and the transaction/batch builder.",
"r5::summary": "to_summary_value: the FHIR _summary=true view via the is_summary metadata.",
"r4::summary": "to_summary_value: the FHIR _summary=true view via the is_summary metadata.",
"r3::summary": "to_summary_value: the FHIR _summary=true view via the is_summary metadata.",
"r5::temporal": "Parsing and precision-aware comparison for the date/time primitives (Date::parse_parts, DateParts, FHIR precision ordering).",
"r4::temporal": "Parsing and precision-aware comparison for the date/time primitives (Date::parse_parts, DateParts, FHIR precision ordering).",
"r3::temporal": "Parsing and precision-aware comparison for the date/time primitives (Date::parse_parts, DateParts, FHIR precision ordering).",
"r5::parse": "The spec-driven code generator that reads the FHIR specification JSON in `DEFINITIONS_DIR`.",
"r4::parse": "The spec-driven code generator that reads the FHIR specification JSON in `DEFINITIONS_DIR`.",
"r3::parse": "The spec-driven code generator that reads the FHIR specification JSON in `DEFINITIONS_DIR`.",
"r5::abstract_types": "Base/abstract FHIR interfaces used by the generator.",
"r4::abstract_types": "Base/abstract FHIR interfaces used by the generator.",
"r3::abstract_types": "Base/abstract FHIR interfaces used by the generator.",
"r5::properties": "Generator-internal support module.",
"r4::properties": "Generator-internal support module.",
"r3::properties": "Generator-internal support module.",
"r5::resource": "Generator-internal support module.",
"r4::resource": "Generator-internal support module.",
"r3::resource": "Generator-internal support module.",
"r5::todo": "Generator-internal support module.",
"r4::todo": "Generator-internal support module.",
"r3::todo": "Generator-internal support module.",
"r5::xml": "(feature `xml`) FHIR XML to_xml/from_xml via a meta-driven serde_json::Value bridge.",
"r4::xml": "(feature `xml`) FHIR XML to_xml/from_xml via a meta-driven serde_json::Value bridge.",
"r3::xml": "(feature `xml`) FHIR XML to_xml/from_xml via a meta-driven serde_json::Value bridge.",
"validate": "Release-independent: the `Validate` trait and `ValidationIssue`, re-exported by every release.",
"coded": "Release-independent: the `Coded<E>` wrapper for required-binding codes.",
"builder": "Release-independent: `BuilderError` for the generated `Type::builder()` builders.",
"meta": "Release-independent: the shape of the per-element metadata table and its lookups.",
"temporal": "Release-independent: date/time parsing and precision-aware comparison.",
"summary": "Release-independent: the `_summary=true` pruning algorithm.",
"xml": "Release-independent: the FHIR XML bridge (feature `xml`).",
"client": "Release-independent: the async FHIR REST client, generic over a `Release` (feature `client`).",
"release": "The `Release` trait: naming a FHIR release in generic code. Implemented by `r4::R4` and `r5::R5`.",
"codegen": "The spec-JSON to Rust code generator, parameterized by FHIR release (`codegen::Version`).",
"prelude": "Crate-root prelude (use fhir::prelude::*) re-exporting the most-used resources, datatypes, Validate, Coded, and ExtensionExt.",
"util": "Small string helpers."
},
"key_types": [
"fhir::r5::resources::Resource",
"fhir::r5::resources::Patient",
"fhir::r5::resources::Observation",
"fhir::r5::resources::Bundle",
"fhir::r5::types::Code",
"fhir::r5::types::Id",
"fhir::r5::types::DateTime",
"fhir::r5::types::Boolean",
"fhir::r5::types::Integer64",
"fhir::r5::types::HumanName",
"fhir::r5::types::CodeableConcept",
"fhir::r5::types::Period",
"fhir::r5::validate::Validate",
"fhir::r5::validate::ValidationIssue"
],
"cardinality_mapping": {
"0..1": "Option<T>",
"1..1": "T",
"0..*": "Option<Vec<T>>",
"1..*": "Vec<T>",
"value[x]": "one field per allowed type, named value_<type>"
},
"examples": {
"build_patient": "Construct a Patient and serialize to canonical FHIR JSON.",
"validate_resource": "Validate a resource and inspect ValidationIssues.",
"read_bundle": "Read a Bundle and dispatch on each entry's resource type.",
"code_systems": "Use CodeSystem enums as type-safe coded values."
},
"documentation": {
"README.md": "Overview and quick start.",
"CONTRIBUTING.md": "Build/test commands and the code-generator workflow.",
"AGENTS.md": "Guidance for AI coding agents and contributors.",
"spec/": "The living specifications (the source of truth).",
"CHANGELOG.md": "Release history."
},
"releases": {
"r5": {
"fhir_version": "5.0.0",
"module": "fhir::r5",
"feature": "r5",
"default": true,
"primitive_datatypes": 21,
"complex_datatypes": 50,
"resources": 158,
"code_system_enums": 419
},
"r4": {
"fhir_version": "4.0.1",
"module": "fhir::r4",
"feature": "r4",
"default": false,
"primitive_datatypes": 20,
"complex_datatypes": 43,
"resources": 146,
"code_system_enums": 486
},
"r3": {
"fhir_version": "3.0.2",
"module": "fhir::r3",
"feature": "r3",
"default": false,
"aliases": [
"STU3"
],
"primitive_datatypes": 18,
"complex_datatypes": 36,
"resources": 117,
"code_system_enums": 386
}
},
"release_policy": "Releases are modelled as separate Rust types, never shared. R3, R4 and R5 disagree about which elements exist and what they admit, so one type standing for both would either accept data invalid in both releases or silently drop data valid in one. Convert between releases explicitly, through JSON. Code that does not name a release's types lives once at the crate root and is re-exported by each release module, so every release\u2019s validate::Validate is the same trait."
}