FHIR Artifacts >Profile: Provenance

Profile: Provenance

Derived from: Provenance (R4)

Canonical_URLProfile_StatusFHIR_Version
http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-provenanceactive4.0.1

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work

Differential View

idΣ0..1string
id0..1string
extensionC0..*Extension
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileΣ0..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagS Σ0..*CodingBinding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
originalCreateDateS C0..1Extension(dateTime)
originalUpdateDateS C0..1Extension(dateTime)
modifierExtension?! C0..*Extension
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierΣ0..1Identifier
displayΣ0..1string
occurredPeriodPeriod
occurredDateTimedateTime
recordedS Σ1..1instant
policyS0..*uri
location0..1Reference(Location)
reason0..*CodeableConceptBinding
activityS0..1CodeableConceptBinding
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
id0..1string
extensionC0..*Extension
id0..1string
extensionC0..*Extension
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
role0..*CodeableConcept
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierS Σ0..1Identifier
displayS Σ0..1string
onBehalfOf0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
roleS Σ1..1codeBinding
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierS Σ0..1Identifier
displayΣ0..1string
agent0..*see (agent)
signature0..*Signature

Hybrid View

idΣ0..1string
id0..1string
extensionC0..*Extension
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileΣ0..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagS Σ0..*CodingBinding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
originalCreateDateS C0..1Extension(dateTime)
originalUpdateDateS C0..1Extension(dateTime)
modifierExtension?! C0..*Extension
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierΣ0..1Identifier
displayΣ0..1string
occurredPeriodPeriod
occurredDateTimedateTime
recordedS Σ1..1instant
policyS0..*uri
location0..1Reference(Location)
reason0..*CodeableConceptBinding
activityS0..1CodeableConceptBinding
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
id0..1string
extensionC0..*Extension
id0..1string
extensionC0..*Extension
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
role0..*CodeableConcept
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierS Σ0..1Identifier
displayS Σ0..1string
onBehalfOf0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
roleS Σ1..1codeBinding
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierS Σ0..1Identifier
displayΣ0..1string
agent0..*see (agent)
signature0..*Signature

Snapshot View

idΣ0..1string
id0..1string
extensionC0..*Extension
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileΣ0..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagS Σ0..*CodingBinding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
originalCreateDateS C0..1Extension(dateTime)
originalUpdateDateS C0..1Extension(dateTime)
modifierExtension?! C0..*Extension
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierΣ0..1Identifier
displayΣ0..1string
occurredPeriodPeriod
occurredDateTimedateTime
recordedS Σ1..1instant
policyS0..*uri
location0..1Reference(Location)
reason0..*CodeableConceptBinding
activityS0..1CodeableConceptBinding
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
id0..1string
extensionC0..*Extension
id0..1string
extensionC0..*Extension
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
role0..*CodeableConcept
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierS Σ0..1Identifier
displayS Σ0..1string
onBehalfOf0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
roleS Σ1..1codeBinding
id0..1string
extensionC0..*Extension
referenceS Σ C0..1string
typeΣ0..1uriBinding
identifierS Σ0..1Identifier
displayΣ0..1string
agent0..*see (agent)
signature0..*Signature

Table View

Provenance..
Provenance.meta..
Provenance.meta.tag..
Provenance.extension..
Provenance.extension:originalCreateDateExtension0..1
Provenance.extension:originalUpdateDateExtension0..1
Provenance.target..
Provenance.target.reference..
Provenance.recorded..
Provenance.policy..
Provenance.activity..
Provenance.agent..
Provenance.agent.type..
Provenance.agent.type.coding..
Provenance.agent.type.coding.system..
Provenance.agent.type.coding.code..
Provenance.agent.type.coding.display..
Provenance.agent.who..
Provenance.agent.who.reference..
Provenance.agent.who.identifier..
Provenance.agent.who.display..
Provenance.entity1..
Provenance.entity.role..
Provenance.entity.what..
Provenance.entity.what.reference..
Provenance.entity.what.identifier..

JSON View

{
"resourceType": "StructureDefinition",
"id": "profile-provenance",
"url": "http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-provenance",
"name": "ProvenanceEHR",
"title": "Provenance EHR",
"status": "active",
"description": "This profile sets minimum expectations for the Provenance resource to record, search, and fetch provenance information associated with a record. It covers the minimal (basic) information to support lineage of information. It specifies which core elements, extensions, vocabularies, and value sets **SHALL** be present and constrains how the elements are used. Before reviewing this profile, implementers are encouraged to read the Basic Provenance guidance page, which documents several key use cases, specifically, the organization responsible for the most recent action on the resource.",
"fhirVersion": "4.0.1",
"kind": "resource",
"abstract": false,
"type": "Provenance",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Provenance",
"derivation": "constraint",
"element": [
{
"id": "Provenance.meta.tag",
"path": "Provenance.meta.tag",
"mustSupport": true,
"binding": {
"strength": "preferred",
"valueSet": "http://ontariohealth.ca/fhir/ehr/ValueSet/clinical-data-foundation-domain"
}
},
{
"id": "Provenance.extension",
"path": "Provenance.extension",
"slicing": {
{
"type": "value",
"path": "url"
}
],
"ordered": false,
"rules": "open"
}
},
{
"id": "Provenance.extension:originalCreateDate",
"path": "Provenance.extension",
"sliceName": "originalCreateDate",
"min": 0,
"max": "1",
"type": [
{
"code": "Extension",
"profile": [
"http://ontariohealth.ca/fhir/ehr/StructureDefinition/ext-original-create-date"
]
}
],
"mustSupport": true
},
{
"id": "Provenance.extension:originalUpdateDate",
"path": "Provenance.extension",
"sliceName": "originalUpdateDate",
"min": 0,
"max": "1",
"type": [
{
"code": "Extension",
"profile": [
"http://ontariohealth.ca/fhir/ehr/StructureDefinition/ext-original-update-date"
]
}
],
"mustSupport": true
},
{
"id": "Provenance.target",
"path": "Provenance.target",
"short": "The Resource(s) this Provenance record supports",
"mustSupport": true
},
{
"id": "Provenance.target.reference",
"path": "Provenance.target.reference",
"mustSupport": true
},
{
"id": "Provenance.recorded",
"path": "Provenance.recorded",
"short": "Timestamp when the activity was recorded / updated",
"mustSupport": true
},
{
"id": "Provenance.policy",
"path": "Provenance.policy",
"mustSupport": true
},
{
"id": "Provenance.activity",
"path": "Provenance.activity",
"mustSupport": true,
"binding": {
"strength": "extensible",
"valueSet": "http://ontariohealth.ca/fhir/ehr/ValueSet/provenance-activity-type"
}
},
{
"id": "Provenance.agent",
"path": "Provenance.agent",
"short": "Actor involved. For HL7v2 conversion: Ontario Health HL7v2 to FHIR Translation Engine, MSH-3.2 (unique identifier representing the sending system), X-Gtwy-ID (unique identifier generated by APIM). For FHIR contribution: azp (unique identifier representing the Sending System, provided by OH, sourced from the OAG token), X-Gtwy-ID (unique identifier generated by OAG).",
"mustSupport": true
},
{
"id": "Provenance.agent.type",
"path": "Provenance.agent.type",
"mustSupport": true,
"binding": {
"strength": "extensible",
"valueSet": "http://ontariohealth.ca/fhir/ehr/ValueSet/provenance-agent-type"
}
},
{
"id": "Provenance.agent.type.coding",
"path": "Provenance.agent.type.coding",
"mustSupport": true
},
{
"id": "Provenance.agent.type.coding.system",
"path": "Provenance.agent.type.coding.system",
"mustSupport": true
},
{
"id": "Provenance.agent.type.coding.code",
"path": "Provenance.agent.type.coding.code",
"mustSupport": true
},
{
"id": "Provenance.agent.type.coding.display",
"path": "Provenance.agent.type.coding.display",
"mustSupport": true
},
{
"id": "Provenance.agent.who",
"path": "Provenance.agent.who",
"mustSupport": true
},
{
"id": "Provenance.agent.who.reference",
"path": "Provenance.agent.who.reference",
"mustSupport": true
},
{
"id": "Provenance.agent.who.identifier",
"path": "Provenance.agent.who.identifier",
"mustSupport": true
},
{
"id": "Provenance.agent.who.display",
"path": "Provenance.agent.who.display",
"mustSupport": true
},
{
"id": "Provenance.entity",
"path": "Provenance.entity",
"short": "An entity used in this activity. For HL7v2 conversion: MSH-10 (Message Control ID / message unique identifier). For FHIR contribution: X-Request-ID.",
"min": 1,
"mustSupport": true
},
{
"id": "Provenance.entity.role",
"path": "Provenance.entity.role",
"mustSupport": true
},
{
"id": "Provenance.entity.what",
"path": "Provenance.entity.what",
"mustSupport": true
},
{
"id": "Provenance.entity.what.reference",
"path": "Provenance.entity.what.reference",
"mustSupport": true
},
{
"id": "Provenance.entity.what.identifier",
"path": "Provenance.entity.what.identifier",
"mustSupport": true
}
]
}
}

Usage

The Ontario Provenance profile is used to provide information about tracking information about an activity that created, revised, deleted, or signed a version of a resource, describing the entities and agents involved

Clinical Data Foundation (CDF) attribute requirements

Provenance.target has references to one or multiple FHIR resources created or updated as part of a FHIR interaction or HL7v2 conversion

Provenance.entity.what (an entity used in this activity) has a reference to or an identifier of an object or resource that was a source for this operation, e.g.

  • For HL7v2 conversion, this might be a reference to an actual Binary that has the full HL7v2 message, or just a message identifier from MSH-10 (Message Control ID / message unique identifier), or both
  • For FHIR contribution, this might be a reference to a source FHIR resource (in case it gets stored) or just a X-Request-ID, or both
  • For decomposition of a FHIR Bundle into discrete resources, this might be a reference to a source FHIR Bundle (in case it gets stored) or just a X-Request-ID, or both

Provenance.agent.who (individual, device or organization that participated in the event)
For HL7v2 conversion, at least three agents:

  • oh_hl7v2_to_fhir_adapter (or whatever we call this - might be an actual Device FHIR resource or just an identifier)
  • MSH-3.2 (unique identifier representing the sending system)
  • X-Gtwy-ID (unique identifier generated by APIM)

For FHIR, at least two agents:

  • azp (unique identifier representing the Sending System, provided by OH, sourced from the OAG token)
  • X-Gtwy-ID (unique identifier generated by OAG)

For each of these agents, we'll need to define a type, e.g. author, assembler, composer, performer, etc. (codes are defined at Valueset-provenance-agent-type - FHIR v4.0.1 but may be extended)

Provenance.entity.what System URIs - MSH-10

  • MSH-10 (Message Control ID / message unique identifier)
    • In acCDR, a unique identifier: MSH.3.1 (org OID) + MSH.10
    • In MI, 99.999% of MSH.3.1 (org OID) + MSH.10 is unique but there are a few exceptions
      • OCINet: The only time a message ID might not be unique from a site is when a linked report has been intentionally split into multiple messages (this is typically done because many downstream systems can't handle linked messages, so the site breaks them up)
      • Since HL7 doesn’t strictly enforce uniqueness for the Message Control ID (as it’s mostly used for troubleshooting), some sites don’t bother making it unique in these scenarios
      • In systems that support linking, we sometimes use the repeated Message Control ID (along with other identifiers) as an indicator that the reports are linked
    • The same ID might also be reused during manual resends, for example, if something was corrected and resent

Provenance.entity.what System URIs - X-Request-ID

  • X-Request-ID (optionally provided by a FHIR client as a unique identifier. If this value is not provided by the client, APIM (Azure API Manager) will generate a GUID prefixed by “APIM-”)
    • For APIM generated GUID: replace “APIM-” prefix with “urn:uuid:” prefix and set system to "urn:ietf:rfc:3986"
    • When provided by a client, it’s supposed to be a UUID
      • Architecture team’s comment: It wouldn't be critical if there is a collision given that it's used to look up records, in the unlikely event that multiple records would match, it would be very easy to sort things out by using additional information (site, timestamp)

Provenance.agent.who System URIs

  • MSH-3.2 (unique identifier representing the sending system)
    • It’s always an OID: use it as is (with the “urn:oid:” prefix) and system = “urn:ietf:rfc:3986”
  • azp (unique identifier for a Sending System, sourced from the OAG token and provided by OH)
  • X-Gtwy-ID (unique identifier generated by APIM for HL7v2 and by OAG for FHIR)
    • It’s always a GUID: use it as is (with the “urn:uuid:” prefix) and system = “urn:ietf:rfc:3986”

HALO attribute requirements

Provenance.target has references to one or multiple FHIR resources created or updated as part of a FHIR interaction

Provenance.entity.what (an entity used in this activity) has a reference to or an identifier of an object or resource that was a source for this operation, e.g.

  • For FHIR contribution, this might be a reference to a source FHIR resource (in case it gets stored) or just a X-Request-ID, or both
  • For decomposition of a FHIR Bundle into discrete resources, this might be a reference to a source FHIR Bundle (in case it gets stored) or just a X-Request-ID, or both

Provenance.agent.who (individual, device or organization that participated in the event)
For FHIR, six agents: Agent.type:

  • For EMR = composer
  • For SOFA = assembler
  • For SMARTAPP = assembler
  • For ORG = author
  • For LOCAL_FHIR_USER = enterer
  • For SMARTAPP_FHIR_USER = enterer
  • Agent.who
    • EMR

      • Who.reference.type= Device

      • Who.reference.identifier = EMR_ID value

      • Who.reference.display=EMR_name

    • SoFA

      • Who.reference.type= Device

      • Who.reference.identifier = Launch_ID value

      • Who.reference.display=SoFA

    • SmartApp

      • Who.reference.type= Device

      • Who.reference.identifier = SmartApp_Id Value

      • Who.reference.display=Smart_App name

    • Organization

      • Who.reference.type= Organization

      • Who.reference.identifier = Org_ID value

      • Who.reference.display=Organization

    • SmartApp FHIR User

      • Who.reference.type= Practitioner

      • Who.reference.identifier = SMARTAPP_FHIR_USER value

      • Who.reference.display=SmartApp FHIR User

    • Local FHIR User

      • Who.reference.type= Practitioner

      • Who.reference.identifier = Local_FHIR_USER value

      • Who.reference.display=Local FHIR User