Expand description
FHIR StructureDefinition Snapshot Expansion
This crate provides functionality to expand StructureDefinition snapshots by resolving complex types, choice types, and contentReferences.
§Example
use tlq_fhir_snapshot::{SnapshotExpander, generate_snapshot, generate_differential, generate_deep_snapshot};
use tlq_fhir_context::{DefaultFhirContext, FhirContext};
// Load a package (from registry-client)
// let package = FhirPackage::from_directory(...)?;
// let ctx = DefaultFhirContext::new(package);
// Generate snapshot from differential
// let snapshot = generate_snapshot(&base_snapshot, &differential)?;
// Generate differential from snapshot
// let differential = generate_differential(&base_snapshot, &snapshot)?;
// Expand snapshot (deep expansion)
// let expander = SnapshotExpander::new();
// let expanded = expander.expand_snapshot(snapshot, &ctx)?;
// Or use the convenience function:
// let deep_snapshot = generate_deep_snapshot(&snapshot, &ctx)?;Re-exports§
pub use error::Error;pub use error::Result;pub use expanded_context::BorrowedFhirContext;pub use expanded_context::ExpandedFhirContext;pub use expander::SnapshotExpander;pub use generator::generate_deep_snapshot;pub use generator::generate_differential;pub use generator::generate_snapshot;pub use snapshot_generation::generate_structure_definition_differential;pub use snapshot_generation::generate_structure_definition_snapshot;pub use validation::validate_differential;pub use validation::validate_snapshot;
Modules§
- error
- Error types for snapshot expansion
- expanded_
context - expander
- Snapshot expansion for StructureDefinitions
- generator
- Snapshot and differential generation
- inheritance
- FHIR constraint inheritance and propagation
- merge
- FHIR-specific merge semantics for snapshot generation
- normalization
- ID and slice name normalization for FHIR elements
- slicing
- FHIR slicing engine for snapshot generation
- snapshot_
generation - Snapshot and differential generation for StructureDefinition resources
- validation
- Validation functions for FHIR snapshots and differentials
Structs§
- Differential
- Differential - a set of elements that define changes from the base
- Element
Definition - FHIR ElementDefinition - defines an element in a resource or data type structure
- Element
Definition Type - Data type for an element
- Snapshot
- Snapshot - a set of elements that define the structure