Provenance

  • Profile status: Draft
  • Canonical URL: http://fhir.smart4health.eu/StructureDefinition/s4h-provenance

Profile for the use of the Provenance resource in Smart4Health. Provenance is used to document how a FHIR resource was created, modified, transmitted, and otherwise acted upon by different actors (individual, organizations, or devices/IT systems).

Mandatory and must-support data elements

A valid instance according to this profile must satisfy the following constraints:

  • have at least one target resource to which the provenance information applies (element: target) - base constraint
  • include the time the provenance information was recorded (element: recorded) - base constraint
  • include at least one agent involved in the activity (element: agent) which is explicitly referred to (element: agent.who)- base constraint

In addition, 4 top-level elements are marked as must-support.

General guidance for using Provenance resources in Smart4Health

Systems handling Smart4Health data may create/retrieve Provenance instances to document/inspect the activities that happened to specific FHIR resources (e.g. data creation or import). Apart from indicating which other FHIR resource(s) a Provenance instance pertains to, the only information that must be captured is the time the provenance information was recorded and at least one agent involved in the activity. The profile contains slices on the Provenance.agent element to show how to capture an agent that acted as an author (creator) of a new resource or as an importer/transmitted of an existing resource. Apps that write directly to the Smart4Health platform (CHDP) without an intermediary can be assigned an S4H source ID and use this as a business identifier for their app acting as an agent (in Provenance.agent.who.identifier).

If possible, it is helpful to fill the Provenance.activity element to indicate exactly what activity took place. The profile contains slices on the Provenance.activity.coding element to explicitly show how to document resource import and resource creation. For these two activities, the format given in the slices should be used.

Note that the Provenance resources always pertains to the FHIR resource as a whole. If a resource contains e.g. embedded files, those may have a separate provenance history (e.g. they may have existed before the FHIR resource was created). In particular, a Provenance instance for a DocumentReference resource only documents provenance for that FHIR resource, not for embedded PDF documents etc. For instance, a Provenance instance asserting that a given person is an agent of type author for a DocumentReference only implies that this person created the resource. It does not imply that this person wrote e.g. a PDF letter contained in the DocumentReference.

Linking Provenance to target resources

The Smart4Health platform is end-to-end encrypted and hence does not offer a typical REST-interface. Accordingly, the linking between Provenance and the associated data resource should be done using logical references based on a business identifier (rather than URL-based literal references). The element Provenance.target.identifier is then used to point to the resource using the business ID. If the resource in question already has such a business ID (in its identifier field), that may be used. Otherwise, one must be added. This may be a globally unique URI in the form of a UUID with "urn:uuid:" pre-pended (e.g. urn:uuid:a76d9bbf-f293-4fb7-ad4c-2851cac77162) - in that case, Identifier.system should be set to urn:ietf:rfc:3986.

Example resources

Formal views of profile content

Differential view

Shows only differences relative to the base resource definition.

idΣ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
targetS Σ I1..*Reference(Resource)
occurredPeriodPeriod
occurredDateTimedateTime
recordedS Σ1..1instant
policy0..*uri
locationI0..1Reference(Location)
reason0..*CodeableConceptBinding
id0..1string
extensionI0..*Extension
resourceCreationΣ0..*CodingPattern
resourceImportΣ0..*CodingPattern
textΣ0..1string
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
typeΣ0..1CodeableConceptBinding
role0..*CodeableConcept
whoΣ I1..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
onBehalfOfI0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
typeΣ0..1CodeableConceptBindingPattern
role0..*CodeableConcept
whoΣ I1..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
onBehalfOfI0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
typeΣ0..1CodeableConceptBindingPattern
role0..*CodeableConcept
whoΣ I1..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
onBehalfOfI0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
roleΣ1..1codeBinding
whatΣ I1..1Reference(Resource)
agent0..*see (agent)
signature0..*Signature

Snapshot view

Shows all constraints, including those from underlying profiles and the base resource definition.

idΣ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
targetS Σ I1..*Reference(Resource)
occurredPeriodPeriod
occurredDateTimedateTime
recordedS Σ1..1instant
policy0..*uri
locationI0..1Reference(Location)
reason0..*CodeableConceptBinding
id0..1string
extensionI0..*Extension
resourceCreationΣ0..*CodingPattern
resourceImportΣ0..*CodingPattern
textΣ0..1string
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
typeΣ0..1CodeableConceptBinding
role0..*CodeableConcept
whoΣ I1..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
onBehalfOfI0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
typeΣ0..1CodeableConceptBindingPattern
role0..*CodeableConcept
whoΣ I1..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
onBehalfOfI0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
typeΣ0..1CodeableConceptBindingPattern
role0..*CodeableConcept
whoΣ I1..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
onBehalfOfI0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
roleΣ1..1codeBinding
whatΣ I1..1Reference(Resource)
agent0..*see (agent)
signature0..*Signature