6.6 Provenance リソース

logo fhir

HomeInfrastructureProvenance [provenance]

Resource Provenance - Content6.6

Provenance information that describes the activity that lead to the creation of a set of resources. This information can be used to help determine their reliability or trace where the information in them came from. The focus of the provenance resource is record keeping, audit and traceability, and not explicit statements of clinical significance.

The resource name as it appears in a RESTful URL is [root]/provenance/

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

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. The W3C Provenance Specification has the following fundamental model:

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.

Resource Content 6.6.1

<Provenance xmlns="http://hl7.org/fhir"> <!-- from Resource: extension, narrative, and contained --> <target><!-- 1..* Resource(Any) Target resource(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..1 CodeableConcept Reason the activity is occurring --></reason> <location><!-- 0..1 Resource(Location) Where the activity occurred, if relevant --></location> <policy value="[uri]"/><!-- 0..* Policy or plan the activity was defined by --> <agent> <!-- 0..* Person, organization, records, etc. involved in creating resource --> <role><!-- 1..1 Coding author | overseer | enterer | attester | source | cc: + --></role> <type><!-- 1..1 Coding Resource | Person | Application | Record | Document + --></type> <reference value="[uri]"/><!-- 1..1 Identity of agent (urn or url) --> <display value="[string]"/><!-- 0..1 Human description of participant --> </agent> <entity> <!-- 0..* An entity used in this activity --> <role value="[code]"/><!-- 1..1 derivation | revision | quotation | source --> <type><!-- 1..1 Coding Resource Type, or something else --></type> <reference value="[uri]"/><!-- 1..1 Identity of participant (urn or url) --> <display value="[string]"/><!-- 0..1 Human description of participant --> <agent><!-- 0..1 Content as for Provenance.agent Entity is attributed to this agent --></agent> </entity> <signature value="[string]"/><!-- 0..1 Base64 Cryptographic signature of resource (DigSig) --> </Provenance>

Alternate definitions: Schema/Schematron, Resource Profile

Terminology Bindings 6.6.1.1

Using the Provenance Resource6.6.1.2

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.

Digital Signatures6.6.1.3

The provenance resource includes a signature element which contains an XML digital signature. If present, the signature is always a signature of the target resource XML representation. The digital signature is always included as a plain string with appropriate escaping for both XML and JSON.

Note that modifications to the resource subsequent to the create of the provenance resource will break the digital signature.

Party References6.6.1.4

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="Person"/> </type> <reference value="person/@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.

Search Parameters 6.6.2

Search Parameters for RESTful searches. The standard parameters also apply. See Searching for more information.