Examples
Runnable programs from the model crate’s examples/ directory. Each is
a tutorial in its header comment and a complete program below it; run
one from a checkout with cargo run --example <name> (some need extra
cargo features — the page says which).
build_patient— Build a FHIR R5Patientwith the generated builder and serialize itclient_crud— FHIR REST client CRUD against the public HAPI test server (featureclient)code_systems— Use FHIR R5 code systems as type-safe Rust enumsconvert_release— Convert a resource between FHIR releases, and read the loss reportextensions— Read and write FHIR extensions ergonomically withExtensionExtoperation_outcome— Turn validation results into a FHIROperationOutcomeprimitive_extensions— Read and write FHIR primitive extensions — the_fieldsiblingsr3_patient— Build a FHIR R3Patient, serialize it, validate it, and read it backr4_and_r5_side_by_side— Use the R4 and R5 models in one program, and convert between themr4_patient— Build a FHIR R4Patient, serialize it, validate it, and read it backread_bundle— Read a FHIR R5Bundleand dispatch on each entry's resource typesearch_response— Consume a FHIR search response: typed entries, the total, and pagingtransaction_bundle— Build a FHIR transactionBundleand read resources back out of onetutorial— The guide's end-to-end tutorial, as a runnable programvalidate_resource— Validate FHIR R5 values with the [Validate] trait
The database family’s worked examples are a guide of their own: Examples.