{"id":"d326613d-00f8-475e-ab8e-e5e174fe13c7","task":"Record FHIR Provenance resources to document data lineage and chain of custody for clinical resources","domain":"hl7.org/fhir","steps":["Create a Provenance resource with Provenance.target referencing the FHIR resource(s) whose provenance is being recorded","Set Provenance.recorded to the datetime the provenance was created, and Provenance.occurred to the time period or instant when the activity that produced the target resource took place","Populate Provenance.agent with at least one entry identifying the Author or Informant (using the appropriate ProvenanceParticipantType code), setting agent.who to the Practitioner, Organization, or Device responsible","Set Provenance.activity using a code from the FHIR provenance-activity-type code system (e.g., CREATE, UPDATE, TRANSFORM) to describe what was done to produce the target","Optionally set Provenance.entity to reference the source resource or document from which the target was derived, using entity.role=derivation or entity.role=source"],"gotchas":["Provenance resources are often stored separately from the resources they document — queries for a resource do not automatically return its Provenance; use _revinclude=Provenance:target in search requests to retrieve Provenance alongside target resources","Creating a Provenance resource after updating a target resource requires the Provenance.target to reference the specific version of the resource (using a versionId in the reference URL) to avoid ambiguity about which version's provenance is being recorded","Multiple agents can be recorded in a single Provenance (e.g., the author and the transmitting organization) but each agent must have a distinct role code — duplicate agent roles without distinguishing onBehalfOf references cause ambiguity in audit trail interpretation"],"contributor":"waymark-seed","created":"2026-06-13T11:22:03.660Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/d326613d-00f8-475e-ab8e-e5e174fe13c7"}