FHIR Release 3 (STU)

This page is part of the FHIR Specification (v3.0.2: STU 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

6.3 Resource Provenance - Content

Security Work GroupMaturity Level: 3 Trial UseCompartments: Device, Patient, Practitioner, RelatedPerson

Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.

The Provenance resource tracks information about the activity that created a version of a resource, including the entities and agents involved in producing a resource. This information can be used to form assessments about its quality, reliability or trustworthiness, or to provide pointers for where to go to further investigate the origins of the resource and the information in it.

Provenance resources are a record-keeping assertion that gathers information about the context in which the information in a resource was obtained. Provenance resources are prepared by the application that initiates the create/update etc. of the resource. An AuditEvent resource contains overlapping information, but is created as events occur, to track and audit the events. AuditEvent resources are often (though not exclusively) created by the application responding to the read/query/create/update/etc. event.

Many other FHIR resources contain some elements that represent information about how the resource was obtained, and therefore they overlap with the functionality of the Provenance resource. These properties in other resources should always be used in preference to the Provenance resource, and the Provenance resource should be used where additional information is required, though overlap can occur.

The relationship between a resource and its provenance is established by a reference from the provenance resource to its target. In this way, provenance may be provided about any resource or version, including past versions. There may be multiple provenance records for a given resource or version of a resource.

The Provenance resource is based on the W3C Provenance specification , and mappings are provided. The Provenance resource is tailored to fit the FHIR use-cases for provenance more directly. In terms of W3C Provenance the FHIR Provenance resources covers "Generation" of "Entity" with respect to FHIR defined resources for creation or updating; whereas AuditEvent covers "Usage" of "Entity" and all other "Activity" as defined in W3C Provenance.

The W3C Provenance Specification has the following fundamental model:

Key concepts

Where:

  • Target - An entity that is a FHIR resource instance that is created, updated or deleted.
  • Entity - An entity is a physical, digital, conceptual or other kind of thing with some fixed aspects; entities may be real or imaginary.
  • Agent - An agent is something that bears some form of responsibility for an activity taking place, for the existence of an entity, or for another agent's activity.
  • Activity - An activity is something that occurs over a time period and acts upon or with entities. It may include consuming, processing, transforming, modifying, relocating, using, or generating entities.

The Provenance resource corresponds to a single activity that identifies a set of resources (target) generated by the activity. The activity also references other entities (entity) that were used and the agents (agent) that were associated with the activity. To record multiple activities that resulted in one (target), record each (activity) in independent Provenance records all pointing at that (target).

The Provenance resource depends upon having References to all the resources, entities, and agents involved in the activity. These References need not be resolvable. The references must provide a unique and ambiguous identification. If a resource, entity, or agent can have different versions that must be identified, then the Reference must have versioning information included.

Versioning and unique identification are not mandated for all systems that provide Resources, entities, and agents. But, inclusion of Provenance requirements may introduce requirements for versioning and unique identification on those systems

The Provenance resource is based on leveraging the W3C Provenance specification to represent HL7 support of provenance throughout its standards and explicitly modelled as functional capabilities in ISO/HL7 10781 EHR System Functional Model Release 2 and ISO 21089 Trusted End-to-End Information Flows. Mappings are provided. The Provenance resource is tailored to fit the FHIR use-cases for provenance more directly. In terms of W3C Provenance the FHIR Provenance resources covers "Generation" of "Entity" with respect to FHIR defined resources for creation or updating; whereas AuditEvent covers "Usage" of "Entity" and all other "Activity" as defined in W3C Provenance.

This resource is referenced by DeviceRequest, MedicationAdministration, MedicationDispense, MedicationRequest, ProcedureRequest, ReferralRequest and Task

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Provenance DomainResourceWho, What, When for a set of resources
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... target Σ1..*Reference(Any)Target Reference(s) (usually version specific)
... period 0..1PeriodWhen the activity occurred
... recorded Σ1..1instantWhen the activity was recorded / updated
... policy 0..*uriPolicy or plan the activity was defined by
... location 0..1Reference(Location)Where the activity occurred, if relevant
... reason 0..*CodingReason the activity is occurring
PurposeOfUse (Extensible)
... activity 0..1CodingActivity that occurred
ProvenanceActivityType (Extensible)
... agent 1..*BackboneElementActor involved
.... role Σ0..*CodeableConceptWhat the agents role was
SecurityRoleType (Extensible)
.... who[x] Σ1..1Who participated
..... whoUriuri
..... whoReferenceReference(Practitioner | RelatedPerson | Patient | Device | Organization)
.... onBehalfOf[x] 0..1Who the agent is representing
..... onBehalfOfUriuri
..... onBehalfOfReferenceReference(Practitioner | RelatedPerson | Patient | Device | Organization)
.... relatedAgentType 0..1CodeableConceptType of relationship between agents
v3 Code System RoleLinkType (Example)
... entity 0..*BackboneElementAn entity used in this activity
.... role Σ1..1codederivation | revision | quotation | source | removal
ProvenanceEntityRole (Required)
.... what[x] Σ1..1Identity of entity
..... whatUriuri
..... whatReferenceReference(Any)
..... whatIdentifierIdentifier
.... agent 0..*see agentEntity is attributed to this agent
... signature 0..*SignatureSignature on target

doco Documentation for this format

UML Diagram (Legend)

Provenance (DomainResource)The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activitytarget : Reference [1..*] Any The period during which the activity occurredperiod : Period [0..1]The instant of time at which the activity was recordedrecorded : instant [1..1]Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etcpolicy : uri [0..*]Where the activity occurred, if relevantlocation : Reference [0..1] Location The reason that the activity was taking placereason : Coding [0..*] The reason the activity took place. (Strength=Extensible)PurposeOfUse+ An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entitiesactivity : Coding [0..1] The activity that took place. (Strength=Extensible)ProvenanceActivityType+ A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicatedsignature : Signature [0..*]AgentThe function of the agent with respect to the activity. The security role enabling the agent with respect to the activityrole : CodeableConcept [0..*] The role that a provenance agent played with respect to the activity. (Strength=Extensible)SecurityRoleType+ The individual, device or organization that participated in the eventwho[x] : Type [1..1] uri|Reference(Practitioner|RelatedPerson| Patient|Device|Organization) The individual, device, or organization for whom the change was madeonBehalfOf[x] : Type [0..1] uri|Reference(Practitioner| RelatedPerson|Patient|Device|Organization) The type of relationship between agentsrelatedAgentType : CodeableConcept [0..1] Type of relationship between two provenance agents. (Strength=Example)v3 Code System RoleLinkType?? EntityHow the entity was used during the activityrole : code [1..1] How an entity was used in an activity. (Strength=Required)ProvenanceEntityRole! Identity of the Entity used. May be a logical or physical uri and maybe absolute or relativewhat[x] : Type [1..1] uri|Reference(Any)|Identifier An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking placeagent[1..*]The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entityagent[0..*]An entity used in this activityentity[0..*]

XML Template

<Provenance xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <target><!-- 1..* Reference(Any) Target Reference(s) (usually version specific) --></target>
 <period><!-- 0..1 Period When the activity occurred --></period>
 <recorded value="[instant]"/><!-- 1..1 When the activity was recorded / updated -->
 <policy value="[uri]"/><!-- 0..* Policy or plan the activity was defined by -->
 <location><!-- 0..1 Reference(Location) Where the activity occurred, if relevant --></location>
 <reason><!-- 0..* Coding Reason the activity is occurring --></reason>
 <activity><!-- 0..1 Coding Activity that occurred --></activity>
 <agent>  <!-- 1..* Actor involved -->
  <role><!-- 0..* CodeableConcept What the agents role was --></role>
  <who[x]><!-- 1..1 uri|Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) Who participated --></who[x]>
  <onBehalfOf[x]><!-- 0..1 uri|Reference(Practitioner|RelatedPerson|Patient|
    Device|Organization) Who the agent is representing --></onBehalfOf[x]>
  <relatedAgentType><!-- 0..1 CodeableConcept Type of relationship between agents --></relatedAgentType>
 </agent>
 <entity>  <!-- 0..* An entity used in this activity -->
  <role value="[code]"/><!-- 1..1 derivation | revision | quotation | source | removal -->
  <what[x]><!-- 1..1 uri|Reference(Any)|Identifier Identity of entity --></what[x]>
  <agent><!-- 0..* Content as for Provenance.agent Entity is attributed to this agent --></agent>
 </entity>
 <signature><!-- 0..* Signature Signature on target --></signature>
</Provenance>

JSON Template

{doco
  "resourceType" : "Provenance",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "target" : [{ Reference(Any) }], // R!  Target Reference(s) (usually version specific)
  "period" : { Period }, // When the activity occurred
  "recorded" : "<instant>", // R!  When the activity was recorded / updated
  "policy" : ["<uri>"], // Policy or plan the activity was defined by
  "location" : { Reference(Location) }, // Where the activity occurred, if relevant
  "reason" : [{ Coding }], // Reason the activity is occurring
  "activity" : { Coding }, // Activity that occurred
  "agent" : [{ // R!  Actor involved
    "role" : [{ CodeableConcept }], // What the agents role was
    // who[x]: Who participated. One of these 2:
    "whoUri" : "<uri>",
    "whoReference" : { Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) },
    // onBehalfOf[x]: Who the agent is representing. One of these 2:
    "onBehalfOfUri" : "<uri>",
    "onBehalfOfReference" : { Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) },
    "relatedAgentType" : { CodeableConcept } // Type of relationship between agents
  }],
  "entity" : [{ // An entity used in this activity
    "role" : "<code>", // R!  derivation | revision | quotation | source | removal
    // what[x]: Identity of entity. One of these 3:
    "whatUri" : "<uri>",
    "whatReference" : { Reference(Any) },
    "whatIdentifier" : { Identifier },
    "agent" : [{ Content as for Provenance.agent }] // Entity is attributed to this agent
  }],
  "signature" : [{ Signature }] // Signature on target
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:Provenance;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:Provenance.target [ Reference(Any) ], ... ; # 1..* Target Reference(s) (usually version specific)
  fhir:Provenance.period [ Period ]; # 0..1 When the activity occurred
  fhir:Provenance.recorded [ instant ]; # 1..1 When the activity was recorded / updated
  fhir:Provenance.policy [ uri ], ... ; # 0..* Policy or plan the activity was defined by
  fhir:Provenance.location [ Reference(Location) ]; # 0..1 Where the activity occurred, if relevant
  fhir:Provenance.reason [ Coding ], ... ; # 0..* Reason the activity is occurring
  fhir:Provenance.activity [ Coding ]; # 0..1 Activity that occurred
  fhir:Provenance.agent [ # 1..* Actor involved
    fhir:Provenance.agent.role [ CodeableConcept ], ... ; # 0..* What the agents role was
    # Provenance.agent.who[x] : 1..1 Who participated. One of these 2
      fhir:Provenance.agent.whoUri [ uri ]
      fhir:Provenance.agent.whoReference [ Reference(Practitioner|RelatedPerson|Patient|Device|Organization) ]
    # Provenance.agent.onBehalfOf[x] : 0..1 Who the agent is representing. One of these 2
      fhir:Provenance.agent.onBehalfOfUri [ uri ]
      fhir:Provenance.agent.onBehalfOfReference [ Reference(Practitioner|RelatedPerson|Patient|Device|Organization) ]
    fhir:Provenance.agent.relatedAgentType [ CodeableConcept ]; # 0..1 Type of relationship between agents
  ], ...;
  fhir:Provenance.entity [ # 0..* An entity used in this activity
    fhir:Provenance.entity.role [ code ]; # 1..1 derivation | revision | quotation | source | removal
    # Provenance.entity.what[x] : 1..1 Identity of entity. One of these 3
      fhir:Provenance.entity.whatUri [ uri ]
      fhir:Provenance.entity.whatReference [ Reference(Any) ]
      fhir:Provenance.entity.whatIdentifier [ Identifier ]
    fhir:Provenance.entity.agent [ See Provenance.agent ], ... ; # 0..* Entity is attributed to this agent
  ], ...;
  fhir:Provenance.signature [ Signature ], ... ; # 0..* Signature on target
]

Changes since DSTU2

Provenance
Provenance.reason
  • Type changed from CodeableConcept to Coding
Provenance.activity
  • Type changed from CodeableConcept to Coding
  • Change value set from http://hl7.org/fhir/ValueSet/v3-ProvenanceEventCurrentState to http://hl7.org/fhir/ValueSet/provenance-activity-type
Provenance.agent
  • Min Cardinality changed from 0 to 1
Provenance.agent.role
  • Min Cardinality changed from 1 to 0
  • Max Cardinality changed from 1 to *
  • Type changed from Coding to CodeableConcept
  • Change value set from http://hl7.org/fhir/ValueSet/provenance-agent-role to http://hl7.org/fhir/ValueSet/security-role-type
Provenance.agent.who[x]
  • Added Element
Provenance.agent.onBehalfOf[x]
  • Added Element
Provenance.agent.relatedAgentType
  • Added Element
Provenance.entity.what[x]
  • Added Element
Provenance.entity.agent
  • Max Cardinality changed from 1 to *
Provenance.agent.actor
  • deleted
Provenance.agent.userId
  • deleted
Provenance.agent.relatedAgent
  • deleted
Provenance.entity.type
  • deleted
Provenance.entity.reference
  • deleted
Provenance.entity.display
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON.

See R2 <--> R3 Conversion Maps (status = 2 tests that all execute ok. 1 fail round-trip testing and 1 r3 resources are invalid (1 errors).).

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Provenance DomainResourceWho, What, When for a set of resources
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... target Σ1..*Reference(Any)Target Reference(s) (usually version specific)
... period 0..1PeriodWhen the activity occurred
... recorded Σ1..1instantWhen the activity was recorded / updated
... policy 0..*uriPolicy or plan the activity was defined by
... location 0..1Reference(Location)Where the activity occurred, if relevant
... reason 0..*CodingReason the activity is occurring
PurposeOfUse (Extensible)
... activity 0..1CodingActivity that occurred
ProvenanceActivityType (Extensible)
... agent 1..*BackboneElementActor involved
.... role Σ0..*CodeableConceptWhat the agents role was
SecurityRoleType (Extensible)
.... who[x] Σ1..1Who participated
..... whoUriuri
..... whoReferenceReference(Practitioner | RelatedPerson | Patient | Device | Organization)
.... onBehalfOf[x] 0..1Who the agent is representing
..... onBehalfOfUriuri
..... onBehalfOfReferenceReference(Practitioner | RelatedPerson | Patient | Device | Organization)
.... relatedAgentType 0..1CodeableConceptType of relationship between agents
v3 Code System RoleLinkType (Example)
... entity 0..*BackboneElementAn entity used in this activity
.... role Σ1..1codederivation | revision | quotation | source | removal
ProvenanceEntityRole (Required)
.... what[x] Σ1..1Identity of entity
..... whatUriuri
..... whatReferenceReference(Any)
..... whatIdentifierIdentifier
.... agent 0..*see agentEntity is attributed to this agent
... signature 0..*SignatureSignature on target

doco Documentation for this format

UML Diagram (Legend)

Provenance (DomainResource)The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activitytarget : Reference [1..*] Any The period during which the activity occurredperiod : Period [0..1]The instant of time at which the activity was recordedrecorded : instant [1..1]Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etcpolicy : uri [0..*]Where the activity occurred, if relevantlocation : Reference [0..1] Location The reason that the activity was taking placereason : Coding [0..*] The reason the activity took place. (Strength=Extensible)PurposeOfUse+ An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entitiesactivity : Coding [0..1] The activity that took place. (Strength=Extensible)ProvenanceActivityType+ A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicatedsignature : Signature [0..*]AgentThe function of the agent with respect to the activity. The security role enabling the agent with respect to the activityrole : CodeableConcept [0..*] The role that a provenance agent played with respect to the activity. (Strength=Extensible)SecurityRoleType+ The individual, device or organization that participated in the eventwho[x] : Type [1..1] uri|Reference(Practitioner|RelatedPerson| Patient|Device|Organization) The individual, device, or organization for whom the change was madeonBehalfOf[x] : Type [0..1] uri|Reference(Practitioner| RelatedPerson|Patient|Device|Organization) The type of relationship between agentsrelatedAgentType : CodeableConcept [0..1] Type of relationship between two provenance agents. (Strength=Example)v3 Code System RoleLinkType?? EntityHow the entity was used during the activityrole : code [1..1] How an entity was used in an activity. (Strength=Required)ProvenanceEntityRole! Identity of the Entity used. May be a logical or physical uri and maybe absolute or relativewhat[x] : Type [1..1] uri|Reference(Any)|Identifier An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking placeagent[1..*]The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entityagent[0..*]An entity used in this activityentity[0..*]

XML Template

<Provenance xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <target><!-- 1..* Reference(Any) Target Reference(s) (usually version specific) --></target>
 <period><!-- 0..1 Period When the activity occurred --></period>
 <recorded value="[instant]"/><!-- 1..1 When the activity was recorded / updated -->
 <policy value="[uri]"/><!-- 0..* Policy or plan the activity was defined by -->
 <location><!-- 0..1 Reference(Location) Where the activity occurred, if relevant --></location>
 <reason><!-- 0..* Coding Reason the activity is occurring --></reason>
 <activity><!-- 0..1 Coding Activity that occurred --></activity>
 <agent>  <!-- 1..* Actor involved -->
  <role><!-- 0..* CodeableConcept What the agents role was --></role>
  <who[x]><!-- 1..1 uri|Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) Who participated --></who[x]>
  <onBehalfOf[x]><!-- 0..1 uri|Reference(Practitioner|RelatedPerson|Patient|
    Device|Organization) Who the agent is representing --></onBehalfOf[x]>
  <relatedAgentType><!-- 0..1 CodeableConcept Type of relationship between agents --></relatedAgentType>
 </agent>
 <entity>  <!-- 0..* An entity used in this activity -->
  <role value="[code]"/><!-- 1..1 derivation | revision | quotation | source | removal -->
  <what[x]><!-- 1..1 uri|Reference(Any)|Identifier Identity of entity --></what[x]>
  <agent><!-- 0..* Content as for Provenance.agent Entity is attributed to this agent --></agent>
 </entity>
 <signature><!-- 0..* Signature Signature on target --></signature>
</Provenance>

JSON Template

{doco
  "resourceType" : "Provenance",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "target" : [{ Reference(Any) }], // R!  Target Reference(s) (usually version specific)
  "period" : { Period }, // When the activity occurred
  "recorded" : "<instant>", // R!  When the activity was recorded / updated
  "policy" : ["<uri>"], // Policy or plan the activity was defined by
  "location" : { Reference(Location) }, // Where the activity occurred, if relevant
  "reason" : [{ Coding }], // Reason the activity is occurring
  "activity" : { Coding }, // Activity that occurred
  "agent" : [{ // R!  Actor involved
    "role" : [{ CodeableConcept }], // What the agents role was
    // who[x]: Who participated. One of these 2:
    "whoUri" : "<uri>",
    "whoReference" : { Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) },
    // onBehalfOf[x]: Who the agent is representing. One of these 2:
    "onBehalfOfUri" : "<uri>",
    "onBehalfOfReference" : { Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) },
    "relatedAgentType" : { CodeableConcept } // Type of relationship between agents
  }],
  "entity" : [{ // An entity used in this activity
    "role" : "<code>", // R!  derivation | revision | quotation | source | removal
    // what[x]: Identity of entity. One of these 3:
    "whatUri" : "<uri>",
    "whatReference" : { Reference(Any) },
    "whatIdentifier" : { Identifier },
    "agent" : [{ Content as for Provenance.agent }] // Entity is attributed to this agent
  }],
  "signature" : [{ Signature }] // Signature on target
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:Provenance;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:Provenance.target [ Reference(Any) ], ... ; # 1..* Target Reference(s) (usually version specific)
  fhir:Provenance.period [ Period ]; # 0..1 When the activity occurred
  fhir:Provenance.recorded [ instant ]; # 1..1 When the activity was recorded / updated
  fhir:Provenance.policy [ uri ], ... ; # 0..* Policy or plan the activity was defined by
  fhir:Provenance.location [ Reference(Location) ]; # 0..1 Where the activity occurred, if relevant
  fhir:Provenance.reason [ Coding ], ... ; # 0..* Reason the activity is occurring
  fhir:Provenance.activity [ Coding ]; # 0..1 Activity that occurred
  fhir:Provenance.agent [ # 1..* Actor involved
    fhir:Provenance.agent.role [ CodeableConcept ], ... ; # 0..* What the agents role was
    # Provenance.agent.who[x] : 1..1 Who participated. One of these 2
      fhir:Provenance.agent.whoUri [ uri ]
      fhir:Provenance.agent.whoReference [ Reference(Practitioner|RelatedPerson|Patient|Device|Organization) ]
    # Provenance.agent.onBehalfOf[x] : 0..1 Who the agent is representing. One of these 2
      fhir:Provenance.agent.onBehalfOfUri [ uri ]
      fhir:Provenance.agent.onBehalfOfReference [ Reference(Practitioner|RelatedPerson|Patient|Device|Organization) ]
    fhir:Provenance.agent.relatedAgentType [ CodeableConcept ]; # 0..1 Type of relationship between agents
  ], ...;
  fhir:Provenance.entity [ # 0..* An entity used in this activity
    fhir:Provenance.entity.role [ code ]; # 1..1 derivation | revision | quotation | source | removal
    # Provenance.entity.what[x] : 1..1 Identity of entity. One of these 3
      fhir:Provenance.entity.whatUri [ uri ]
      fhir:Provenance.entity.whatReference [ Reference(Any) ]
      fhir:Provenance.entity.whatIdentifier [ Identifier ]
    fhir:Provenance.entity.agent [ See Provenance.agent ], ... ; # 0..* Entity is attributed to this agent
  ], ...;
  fhir:Provenance.signature [ Signature ], ... ; # 0..* Signature on target
]

Changes since DSTU2

Provenance
Provenance.reason
  • Type changed from CodeableConcept to Coding
Provenance.activity
  • Type changed from CodeableConcept to Coding
  • Change value set from http://hl7.org/fhir/ValueSet/v3-ProvenanceEventCurrentState to http://hl7.org/fhir/ValueSet/provenance-activity-type
Provenance.agent
  • Min Cardinality changed from 0 to 1
Provenance.agent.role
  • Min Cardinality changed from 1 to 0
  • Max Cardinality changed from 1 to *
  • Type changed from Coding to CodeableConcept
  • Change value set from http://hl7.org/fhir/ValueSet/provenance-agent-role to http://hl7.org/fhir/ValueSet/security-role-type
Provenance.agent.who[x]
  • Added Element
Provenance.agent.onBehalfOf[x]
  • Added Element
Provenance.agent.relatedAgentType
  • Added Element
Provenance.entity.what[x]
  • Added Element
Provenance.entity.agent
  • Max Cardinality changed from 1 to *
Provenance.agent.actor
  • deleted
Provenance.agent.userId
  • deleted
Provenance.agent.relatedAgent
  • deleted
Provenance.entity.type
  • deleted
Provenance.entity.reference
  • deleted
Provenance.entity.display
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON.

See R2 <--> R3 Conversion Maps (status = 2 tests that all execute ok. 1 fail round-trip testing and 1 r3 resources are invalid (1 errors).).

 

Alternate definitions: Master Definition (XML, JSON), XML Schema/Schematron (for ) + JSON Schema, ShEx (for Turtle)

PathDefinitionTypeReference
Provenance.reason The reason the activity took place.ExtensiblePurposeOfUse
Provenance.activity The activity that took place.ExtensibleProvenanceActivityType
Provenance.agent.role The role that a provenance agent played with respect to the activity.ExtensibleSecurityRoleType
Provenance.agent.relatedAgentType Type of relationship between two provenance agents.Examplev3 Code System RoleLinkType
Provenance.entity.role How an entity was used in an activity.RequiredProvenanceEntityRole

The Provenance resource identifies information about another resource (the reference element). The Provenance resource may be used in several different ways:

  • As part of a document bundle where it identifies the provenance of part or all of the document
  • On a RESTful system where it keeps track of provenance information relating to resources

When used in a document bundle, the references are often not explicitly versioned, but they always implicitly pertain to the version of the resource found in the document. On a RESTful system, the target resource reference should be version specific, but this requires special care: For new resources that need to have a corresponding Provenance resource, the version-specific reference is often not knowable until after the target resource has been updated. This can create an integrity problem for the system - what if the Provenance resource cannot be created after the target resource has been updated? To avoid any such integrity problems, the target resource and the Provenance resources should be submitted as a pair using a transaction.

The Provenance resource includes a signature element (digital signature) which can be used for standards based integrity verification and non-repudiation purposes. The Signature datatype provides details on use of the signature element. The Signature.type coded value of "Source" should be used when the signature is for simply proving that the resource content is the same as it was when the resource was updated or created.

Because the Provenance resource often refers to parties that are not represented as FHIR resources, agent and entity references can be either references to other resources, or they can refer to other entities that are not FHIR resources.

For Provenance.agent, the actor element is used to reference an existing resource. To reference an entity that is not a FHIR resource, the userId element is used.

A version specific reference to a FHIR resource on the same server:

  <agent>
    <actor>
      <reference value="Patient/34/_history/3"/>
    </actor>
  </agent>

A reference to a user (a person) not represented by a FHIR resource:

  <agent>
    <userId>
      <value value="http://acme.com/users/34"/>
    </userId>  
  </agent>

For Provenance.entity, the code in the .type element is used to differentiate between the two cases: if the code is in the system "http://hl7.org/fhir/resource-types", then the reference is to a resource, and the element reference functions exactly the same as in a resource reference.

A version specific reference to a FHIR resource on the same server:

  <entity>
    <type>
      <system value="http://hl7.org/fhir/resource-types"/>
      <code value="Patient"/>
    </type>
    <reference value="Patient/34/_history/3"/>
  </entity>

In effect, this is the same pattern as a standard resource reference, but the type becomes extensible to allow referencing other kinds of resources.

A reference to an entity (a person) not represented by a FHIR resource:

  <entity>
    <type>
      <system value="http://hl7.org/fhir/provenance-participant-type"/>  
      <code value="person"/>
    </type>  
    <reference value="http://acme.com/users/34"/>
  </entity>

One subtle issue with the use of the Provenance resource is to differentiate between whether the reference is to the resource itself, or whether the reference is to the real-world thing that the resource represents, e.g. was it the person involved in the activity, or the record of the person. For agents, it should be understood that the reference is to the real-world thing that the resource represents.

A Provenance record can be recorded to indicate who deleted a Resource. If versioning is supported, the version that was deleted is referenced in Provenance.target; if versioning is not supported then Provenance.target contains the non-version reference. Provenance.entity is not used unless there is a business requirement to do so.

Provenance can be used to record activities of an automaton that transforms input. Such as middleware that extracts information from a HL7 v2 message and creates FHIR resources, or middleware that extracts information from an HL7 CDA document and creates FHIR resources, etc. The Provenance in these cases is recording the activity of the middleware.

The middleware in this case would, in addition to creating the target resources, create a Provenance resource that indicates all the target resources (using Provenance.target). The middleware is identified as one of the Provenance.agent elements, with the Provenance.agent.role of assembler.

The middleware may record the source as another Provenance.agent element.

The original content is optionally saved. This might be as a DocumentReference, or Binary. The Provenance.entity would then point at this original content.

The original source might include some form of 'provenance' to cover the history of the original content prior to the import transformation. This original source 'provenance' should be converted into FHIR Provenance records as appropriate.

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionExpressionIn Common
agentreferenceWho participatedProvenance.agent.who
(Practitioner, Organization, Device, Patient, RelatedPerson)
agent-roletokenWhat the agents role wasProvenance.agent.role
enddateEnd time with inclusive boundary, if not ongoingProvenance.period.end
entity-idtokenIdentity of entityProvenance.entity.what.as(Identifier)
entity-refreferenceIdentity of entityProvenance.entity.what.as(Reference)
(Any)
locationreferenceWhere the activity occurred, if relevantProvenance.location
(Location)
patientreferenceTarget Reference(s) (usually version specific)Provenance.target
(Patient)
recordeddateWhen the activity was recorded / updatedProvenance.recorded
signature-typetokenIndication of the reason the entity signed the object(s)Provenance.signature.type
startdateStarting time with inclusive boundaryProvenance.period.start
targetreferenceTarget Reference(s) (usually version specific)Provenance.target
(Any)