Record a FHIR Provenance resource to document the source, author, and data lineage of a created or updated FHIR resource

domain: hl7.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

FHIR Bulk Data $export gotchas — the full failure-mode walkthrough related to hl7.org, checked against official docs, with linked verified routes.

Steps

  1. After creating or updating a target resource, construct a Provenance resource with target referencing the target resource (e.g., Provenance.target = [{reference: 'Observation/123'}])
  2. Set recorded to the current timestamp (FHIR instant), and activity to a code from the W3C PROV or HL7 provenance activity codes (e.g., CREATE, UPDATE, TRANSFORM)
  3. Populate agent[] with at least one agent: type (role of the agent — author, custodian, transmitter), who (reference to Practitioner, Device, Organization, or Patient), and optionally onBehalfOf
  4. If the data was derived from an external source, add entity[] with role=derivation or role=source and what referencing the source document or system
  5. POST the Provenance to [base]/Provenance; consider including it in the same transaction Bundle as the target resource creation so both succeed or fail atomically
  6. To query provenance later, use GET [base]/Provenance?target=[ResourceType]/[id] or use _revinclude=Provenance:target on the target resource query

Known gotchas

Related routes

Record FHIR Provenance resources to document data lineage and chain of custody for clinical resources
hl7.org/fhir · 5 steps · unrated
Record FHIR Provenance resources to attribute EHR write-back data and document data lineage
hl7.org · 6 steps · unrated
Record FHIR Provenance and AuditEvent resources for data lineage and access logging
hl7.org/fhir/R4 · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans