DSTU2 QA Preview

This page is part of the FHIR Specification (v1.0.0: DSTU 2 Ballot 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.4 Resource Provenance - Content

Security Work GroupMaturity Level: 1Compartments: 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.

6.4.1 Scope and Usage

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. A Audit Event resource contains overlapping information, but is created as events occur, to track and audit the events. Audit Event resources are often (though not exclusively) created by the application responding to the read/query/create/update etc. event.

6.4.2 Boundaries and Relationships

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.

6.4.3 Background and Context

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; where as Audit Event 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 period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.

The Provenance resource actually 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.

6.4.4 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Provenance ΣDomainResourceWho, What, When for a set of resources
... target Σ1..*Reference(Any)Target Reference(s) (usually version specific)
... period Σ0..1PeriodWhen the activity occurred
... recorded Σ1..1instantWhen the activity was recorded / updated
... reason Σ0..*CodeableConceptReason the activity is occurring
PurposeOfUse (Extensible)
... activity Σ0..1CodeableConceptActivity that occurred
ProvenanceEventCurrentState (Extensible)
... location Σ0..1Reference(Location)Where the activity occurred, if relevant
... policy Σ0..*uriPolicy or plan the activity was defined by
... agent Σ0..*BackboneElementAgents involved in creating resource
.... role Σ1..1CodingWhat the agents involvement was
ProvenanceParticipantRole (Extensible)
.... actor Σ0..1Reference(Practitioner | RelatedPerson | Patient | Device | Organization)Individual, device or organization playing role
.... userId Σ0..1IdentifierAuthorization-system identifier for the agent
.... relatedAgent Σ0..*BackboneElementTrack delegation between agents
..... type Σ1..1CodeableConceptType of relationship between agents
v3 Code System RoleLinkType (Example)
..... target Σ1..1uriReference to other agent in this resource by id
... entity Σ0..*BackboneElementAn entity used in this activity
.... role Σ1..1codederivation | revision | quotation | source
ProvenanceEntityRole (Required)
.... type Σ1..1CodingThe type of resource in this entity
ResourceType (Extensible)
.... reference Σ1..1uriIdentity of entity
.... display Σ0..1stringHuman description of entity
.... agent Σ0..1see agentEntity is attributed to this agent
... signature Σ0..*SignatureSignature on target

doco Documentation for this format

UML Diagram

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]The reason that the activity was taking placereason : CodeableConcept [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 : CodeableConcept [0..1] « The activity took place. (Strength=Extensible)ProvenanceEventCurrentState+ »Where the activity occurred, if relevantlocation : Reference [0..1] « Location »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..*]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 activityrole : Coding [1..1] « The role that a provenance agent played with respect to the activity (Strength=Extensible)ProvenanceParticipantRole+ »The individual, device or organization that participated in the eventactor : Reference [0..1] « Practitioner|RelatedPerson|Patient|Device| Organization »The identify of the agent as known by the authorization systemuserId : Identifier [0..1]RelatedAgentThe type of relationship between agentstype : CodeableConcept [1..1] « Type of relationship between two provenance agents (Strength=Example)v3 Code System RoleLinkType?? »An internal reference to another agent listed in this provenance by it's idtarget : uri [1..1]EntityHow the entity was used during the activityrole : code [1..1] « How an entity was used in an activity (Strength=Required)ProvenanceEntityRole! »The type of the entity. If the entity is a resource, then this is a resource typetype : Coding [1..1] « The type of an entity used in an activity (Strength=Extensible)ResourceType+ »Identity of the Entity used. May be a logical or physical uri and maybe absolute or relativereference : uri [1..1]Human-readable description of the entitydisplay : string [0..1]A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents - e.g. this human author used this device, or one person acted on another's behestrelatedAgent[0..*]An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibilityagent[0..*]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..1]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 -->
 <reason><!-- 0..* CodeableConcept Reason the activity is occurring --></reason>
 <activity><!-- 0..1 CodeableConcept Activity that occurred --></activity>
 <location><!-- 0..1 Reference(Location) Where the activity occurred, if relevant --></location>
 <policy value="[uri]"/><!-- 0..* Policy or plan the activity was defined by -->
 <agent>  <!-- 0..* Agents involved in creating resource -->
  <role><!-- 1..1 Coding What the agents involvement was --></role>
  <actor><!-- 0..1 Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) Individual, device or organization playing role --></actor>
  <userId><!-- 0..1 Identifier Authorization-system identifier for the agent --></userId>
  <relatedAgent>  <!-- 0..* Track delegation between agents -->
   <type><!-- 1..1 CodeableConcept Type of relationship between agents --></type>
   <target value="[uri]"/><!-- 1..1 Reference to other agent in this resource by id -->
  </relatedAgent>
 </agent>
 <entity>  <!-- 0..* An entity used in this activity -->
  <role value="[code]"/><!-- 1..1 derivation | revision | quotation | source -->
  <type><!-- 1..1 Coding The type of resource in this entity --></type>
  <reference value="[uri]"/><!-- 1..1 Identity of entity -->
  <display value="[string]"/><!-- 0..1 Human description of entity -->
  <agent><!-- 0..1 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
  "reason" : [{ CodeableConcept }], // Reason the activity is occurring
  "activity" : { CodeableConcept }, // Activity that occurred
  "location" : { Reference(Location) }, // Where the activity occurred, if relevant
  "policy" : ["<uri>"], // Policy or plan the activity was defined by
  "agent" : [{ // Agents involved in creating resource
    "role" : { Coding }, // R!  What the agents involvement was
    "actor" : { Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) }, // Individual, device or organization playing role
    "userId" : { Identifier }, // Authorization-system identifier for the agent
    "relatedAgent" : [{ // Track delegation between agents
      "type" : { CodeableConcept }, // R!  Type of relationship between agents
      "target" : "<uri>" // R!  Reference to other agent in this resource by id
    }]
  }],
  "entity" : [{ // An entity used in this activity
    "role" : "<code>", // R!  derivation | revision | quotation | source
    "type" : { Coding }, // R!  The type of resource in this entity
    "reference" : "<uri>", // R!  Identity of entity
    "display" : "<string>", // Human description of entity
    "agent" : { Content as for Provenance.agent } // Entity is attributed to this agent
  }],
  "signature" : [{ Signature }] // Signature on target
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Provenance ΣDomainResourceWho, What, When for a set of resources
... target Σ1..*Reference(Any)Target Reference(s) (usually version specific)
... period Σ0..1PeriodWhen the activity occurred
... recorded Σ1..1instantWhen the activity was recorded / updated
... reason Σ0..*CodeableConceptReason the activity is occurring
PurposeOfUse (Extensible)
... activity Σ0..1CodeableConceptActivity that occurred
ProvenanceEventCurrentState (Extensible)
... location Σ0..1Reference(Location)Where the activity occurred, if relevant
... policy Σ0..*uriPolicy or plan the activity was defined by
... agent Σ0..*BackboneElementAgents involved in creating resource
.... role Σ1..1CodingWhat the agents involvement was
ProvenanceParticipantRole (Extensible)
.... actor Σ0..1Reference(Practitioner | RelatedPerson | Patient | Device | Organization)Individual, device or organization playing role
.... userId Σ0..1IdentifierAuthorization-system identifier for the agent
.... relatedAgent Σ0..*BackboneElementTrack delegation between agents
..... type Σ1..1CodeableConceptType of relationship between agents
v3 Code System RoleLinkType (Example)
..... target Σ1..1uriReference to other agent in this resource by id
... entity Σ0..*BackboneElementAn entity used in this activity
.... role Σ1..1codederivation | revision | quotation | source
ProvenanceEntityRole (Required)
.... type Σ1..1CodingThe type of resource in this entity
ResourceType (Extensible)
.... reference Σ1..1uriIdentity of entity
.... display Σ0..1stringHuman description of entity
.... agent Σ0..1see agentEntity is attributed to this agent
... signature Σ0..*SignatureSignature on target

doco Documentation for this format

UML Diagram

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]The reason that the activity was taking placereason : CodeableConcept [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 : CodeableConcept [0..1] « The activity took place. (Strength=Extensible)ProvenanceEventCurrentState+ »Where the activity occurred, if relevantlocation : Reference [0..1] « Location »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..*]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 activityrole : Coding [1..1] « The role that a provenance agent played with respect to the activity (Strength=Extensible)ProvenanceParticipantRole+ »The individual, device or organization that participated in the eventactor : Reference [0..1] « Practitioner|RelatedPerson|Patient|Device| Organization »The identify of the agent as known by the authorization systemuserId : Identifier [0..1]RelatedAgentThe type of relationship between agentstype : CodeableConcept [1..1] « Type of relationship between two provenance agents (Strength=Example)v3 Code System RoleLinkType?? »An internal reference to another agent listed in this provenance by it's idtarget : uri [1..1]EntityHow the entity was used during the activityrole : code [1..1] « How an entity was used in an activity (Strength=Required)ProvenanceEntityRole! »The type of the entity. If the entity is a resource, then this is a resource typetype : Coding [1..1] « The type of an entity used in an activity (Strength=Extensible)ResourceType+ »Identity of the Entity used. May be a logical or physical uri and maybe absolute or relativereference : uri [1..1]Human-readable description of the entitydisplay : string [0..1]A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents - e.g. this human author used this device, or one person acted on another's behestrelatedAgent[0..*]An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibilityagent[0..*]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..1]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 -->
 <reason><!-- 0..* CodeableConcept Reason the activity is occurring --></reason>
 <activity><!-- 0..1 CodeableConcept Activity that occurred --></activity>
 <location><!-- 0..1 Reference(Location) Where the activity occurred, if relevant --></location>
 <policy value="[uri]"/><!-- 0..* Policy or plan the activity was defined by -->
 <agent>  <!-- 0..* Agents involved in creating resource -->
  <role><!-- 1..1 Coding What the agents involvement was --></role>
  <actor><!-- 0..1 Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) Individual, device or organization playing role --></actor>
  <userId><!-- 0..1 Identifier Authorization-system identifier for the agent --></userId>
  <relatedAgent>  <!-- 0..* Track delegation between agents -->
   <type><!-- 1..1 CodeableConcept Type of relationship between agents --></type>
   <target value="[uri]"/><!-- 1..1 Reference to other agent in this resource by id -->
  </relatedAgent>
 </agent>
 <entity>  <!-- 0..* An entity used in this activity -->
  <role value="[code]"/><!-- 1..1 derivation | revision | quotation | source -->
  <type><!-- 1..1 Coding The type of resource in this entity --></type>
  <reference value="[uri]"/><!-- 1..1 Identity of entity -->
  <display value="[string]"/><!-- 0..1 Human description of entity -->
  <agent><!-- 0..1 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
  "reason" : [{ CodeableConcept }], // Reason the activity is occurring
  "activity" : { CodeableConcept }, // Activity that occurred
  "location" : { Reference(Location) }, // Where the activity occurred, if relevant
  "policy" : ["<uri>"], // Policy or plan the activity was defined by
  "agent" : [{ // Agents involved in creating resource
    "role" : { Coding }, // R!  What the agents involvement was
    "actor" : { Reference(Practitioner|RelatedPerson|Patient|Device|
    Organization) }, // Individual, device or organization playing role
    "userId" : { Identifier }, // Authorization-system identifier for the agent
    "relatedAgent" : [{ // Track delegation between agents
      "type" : { CodeableConcept }, // R!  Type of relationship between agents
      "target" : "<uri>" // R!  Reference to other agent in this resource by id
    }]
  }],
  "entity" : [{ // An entity used in this activity
    "role" : "<code>", // R!  derivation | revision | quotation | source
    "type" : { Coding }, // R!  The type of resource in this entity
    "reference" : "<uri>", // R!  Identity of entity
    "display" : "<string>", // Human description of entity
    "agent" : { Content as for Provenance.agent } // Entity is attributed to this agent
  }],
  "signature" : [{ Signature }] // Signature on target
}

 

Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON), Questionnaire

6.4.4.1 Terminology Bindings

PathDefinitionTypeReference
Provenance.reason The reason the activity took place.ExtensiblePurposeOfUse
Provenance.activity The activity took place.ExtensibleProvenanceEventCurrentState
Provenance.agent.role The role that a provenance agent played with respect to the activityExtensibleProvenanceParticipantRole
Provenance.agent.relatedAgent.type Type of relationship between two provenance agentsExamplev3 Code System RoleLinkType
Provenance.entity.role How an entity was used in an activityRequiredProvenanceEntityRole
Provenance.entity.type The type of an entity used in an activityExtensibleResourceType

6.4.4.2 Using the Provenance Resource

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.

6.4.4.3 Digital Signatures

The provenance resource includes a Digital Signature element 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 purposeOfSignature 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.

6.4.4.4 Party References

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

The code in the .type element is used to differentiate between the two: 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:

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

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 a user (a person) not represented by a FHIR resource:

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

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 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.

6.4.5 Search Parameters

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

NameTypeDescriptionPaths
agentreferenceIndividual, device or organization playing roleProvenance.agent.actor
(Device, Organization, Patient, Practitioner, RelatedPerson)
enddateEnd time with inclusive boundary, if not ongoingProvenance.period.end
entityuriIdentity of entityProvenance.entity.reference
entitytypetokenThe type of resource in this entityProvenance.entity.type
locationreferenceWhere the activity occurred, if relevantProvenance.location
(Location)
patientreferenceTarget Reference(s) (usually version specific)Provenance.target
(Patient)
sigtypetokenIndication 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)
useridtokenAuthorization-system identifier for the agentProvenance.agent.userId