Skip to content

Provenance Profile

Canonical../StructureDefinition/nexus-emr-core-provenance
Statusdraft · 1.26.0
BaseProvenance (constraint)
SourceFSH · JSON

Attribution for AI-mediated and cross-boundary writes: what was produced, when, by which agent (human or non-human), from what inputs, and -- for generated text -- which verbatim source passage each statement rests on. Used standalone against a produced resource, and contained in an AI-suggestion review Task against the suggestion contained alongside it.

Elements / Details

Every element this profile touches, with its full definition. Element names in the tables link here.

Provenance

Short Nexus EMR Provenance Core
Definition A record of what produced or changed a resource: the activity, when it was recorded, the agents responsible (which may include a non-human agent), and the inputs it derived from. Primary intended use is AI-action attribution -- keeping an AI-produced resource traceable to the agent that produced it, the human who accepted it, and the record context it was generated from. Where the product is generated text, the attributedFact extension carries the trail at statement grain: each statement with the verbatim quote(s) backing it.
Comments Some parties may be duplicated between the target resource and its provenance. For instance, the prescriber is usually (but not always) the author of the prescription resource. This resource is defined with close consideration for W3C Provenance.
Cardinality 0..*
Invariants dom-2, dom-3, dom-4, dom-5, dom-6, provenance-target-required, provenance-ai-action-names-agent
Also called History, Event, Activity

Provenance.id

Short Logical id of this artifact
Definition The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
Comments The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

Provenance.meta

Short Metadata about the resource
Definition The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
Cardinality 0..1
Type Meta
Invariants ele-1

Provenance.meta.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

Provenance.meta.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

Provenance.meta.versionId

Short Version specific identifier
Definition The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.
Comments The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.
Cardinality 0..1
Type id
Invariants ele-1

Provenance.meta.lastUpdated

Short When the resource version last changed
Definition When the resource last changed - e.g. when the version changed.
Comments This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a read interaction.
Cardinality 0..1
Type instant
Invariants ele-1

Provenance.meta.source

Short Identifies EMR instance & pipeline version the resource came from
Definition A URI that identifies the EMR pipeline and version from which this resource originated. This tells you which EMR instance (recommend using the instance identifier), and the version of the pipeline code/transformations.
Comments In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. This element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.
Cardinality 0..1
Type uri
Must Support yes
Invariants ele-1

Provenance.meta.profile

Short Profiles this resource claims to conform to
Definition A list of profiles (references to StructureDefinition resources) that this resource claims to conform to. The URL is a reference to StructureDefinition.url.
Comments It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.
Cardinality 0..*
Type canonical
Invariants ele-1

Provenance.meta.security

Short Security Labels applied to this resource
Definition Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.
Comments The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.
Cardinality 0..*
Type Coding
Binding security-labels (extensible)
Invariants ele-1

Provenance.meta.tag

Short Tags applied to this resource
Definition Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.
Comments The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.
Cardinality 0..*
Type Coding
Binding common-tags (example)
Invariants ele-1

Provenance.implicitRules

Short A set of rules under which this content was created
Definition A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
Comments Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.
Cardinality 0..1
Type uri
Modifier yes — This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
Invariants ele-1

Provenance.language

Short Language of the resource content
Definition The base language in which the resource is written.
Comments Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
Cardinality 0..1
Type code
Binding languages (preferred)
Invariants ele-1

Provenance.text

Short Narrative
Definition A human-readable narrative summary of the NexusEmrCoreProvenance resource for human interpretation.
Comments Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
Cardinality 0..1
Type Narrative
Must Support yes
Invariants ele-1
Also called narrative, html, xhtml, display

Provenance.contained

Short Contained, inline Resources
Definition These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
Comments This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.
Cardinality 0..*
Type Resource
Also called inline resources, anonymous resources, contained resources

Provenance.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

Provenance.extension:attributedFact

Short Per-fact citations for AI-generated text (statement + verbatim quotes)
Definition May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments Present when the target is AI-generated text produced under the cite-every-fact contract (summaries, chiefly). Repeats in fact order; order is significant. A generated summary need not be persisted at all -- but when it or its provenance is, this is where the citation trail lives, so the trail survives the write-back at full fidelity.
Cardinality 0..*
Type Extension(Attributed Fact)
Must Support yes
Invariants ele-1, ext-1
Also called extensions, user content

Provenance.modifierExtension

Short Extensions that cannot be ignored
Definition May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
Invariants ele-1, ext-1
Also called extensions, user content

Provenance.target

Short The resource(s) this provenance describes
Definition The resources produced or changed by the activity. For an AI write-back this is the resource the AI produced -- the drafted DocumentReference, the suggested MedicationRequest, the Task. Multiple targets are permitted and are the normal case for a single AI action that writes a bundle: one Provenance covering the set is preferable to one per resource, because the action was one decision.
Comments Per the Nexus EMR logical-reference model these MAY be identifier-only. A consumer resolving provenance MUST handle a reference with no literal reference -- this is the single most common cause of provenance appearing 'missing' when it is present.
Cardinality 1..*
Type Reference(Resource)
Must Support yes
Invariants ele-1

Provenance.occurred[x]

Short When the activity happened
Definition The period during which the activity occurred.
Comments Preferred over recorded as THE date. A provenance written asynchronously (a queued write-back) has a recorded well after the action; dating the action to the bookkeeping timestamp misplaces it in every timeline.
Cardinality 0..1
Type Period, dateTime
Must Support yes
Invariants ele-1

Provenance.recorded

Short When this provenance record was created
Definition The instant of time at which the activity was recorded.
Comments This can be a little different from the time stamp on the resource if there is a delay between recording the event and updating the provenance and target resource.
Cardinality 1..1
Type instant
Must Support yes
Invariants ele-1

Provenance.policy

Short Policy or plan the activity was defined by
Definition Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.
Comments For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element.
Cardinality 0..*
Type uri
Invariants ele-1

Provenance.location

Short Where the activity occurred, if relevant
Definition Where the activity occurred, if relevant.
Cardinality 0..1
Type Reference(Location)
Invariants ele-1

Provenance.reason

Short Reason the activity is occurring
Definition The reason that the activity was taking place.
Cardinality 0..*
Type CodeableConcept
Binding v3-PurposeOfUse (extensible)
Invariants ele-1

Provenance.activity

Short What kind of activity produced the target
Definition 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.
Comments Deliberately unbound. R4's example binding (provenance-activity-type) does not anticipate AI-mediated authorship -- draft-generated, AI-suggested, human-accepted -- and asserting it would mis-describe the data. Treat the activity vocabulary as open and read activity.text, which is what the examples carry. A validator run against the base spec will warn that no code was supplied; that warning is expected here.
Cardinality 0..1
Type CodeableConcept
Must Support yes
Binding provenance-activity-type (extensible)
Invariants ele-1

Provenance.agent

Short Who took part in the action
Definition Who or what was responsible for the activity. For an AI-mediated action there are normally TWO agents and both matter: • the non-human agent that generated the content -- a Device, identifying the harness and, where a consumer needs it, the model; • the human who reviewed, accepted or attested to it -- a Practitioner. Recording only the human makes AI-drafted content indistinguishable from human-authored content, which is the specific outcome this profile exists to prevent. Recording only the AI loses accountability.
Requirements An agent can be a person, an organization, software, device, or other entities that may be ascribed responsibility.
Comments Includes the AI agent and its human supervisor where content was AI-drafted.
Cardinality 1..*
Type BackboneElement
Must Support yes
Invariants ele-1

Provenance.agent.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

Provenance.agent.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

Provenance.agent.modifierExtension

Short Extensions that cannot be ignored even if unrecognized
Definition May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
Invariants ele-1, ext-1
Also called extensions, user content, modifiers

Provenance.agent.type

Short The agent's role (author, verifier, attester, ...)
Definition The role this agent played in the activity -- for example author for the agent that generated the content, and attester or verifier for the human who reviewed and accepted it. Required (1..1) in this profile, matching US Core. This is the element that distinguishes a non-human generating agent from the human who took responsibility for its output; without it, a Provenance naming two agents does not say which did what.
Comments Bound extensible to provenance-agent-type by the base. author + attester is the expected pair for an AI-mediated write -- see the AI-drafted-note example.
Cardinality 1..1
Type CodeableConcept
Must Support yes
Binding provenance-agent-type (extensible)
Invariants ele-1

Provenance.agent.role

Short What the agents role was
Definition The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.
Comments For example: doctor, nurse, clerk, etc.
Cardinality 0..*
Type CodeableConcept
Binding security-role-type (example)
Invariants ele-1

Provenance.agent.who

Short The agent itself -- Practitioner, Device (AI/system), Organization, Patient
Definition The individual, device or organization that participated in the event.
Comments Practitioner is the primary provider identity in this IG. A non-human agent is a Device, referenced logically (by identifier) where the harness graph has no stored Device instance; set Reference.type to Device so a reader can tell what kind of agent it is without resolving. Whether model identity rides on that Device instance is open -- see the token/model accounting note at the top of this file.
Cardinality 1..1
Type Reference(Practitioner Profile | PractitionerRole Profile | Patient Profile | RelatedPerson Profile | Organization Profile | App Device Profile | Device Profile)
Must Support yes
Invariants ele-1

Provenance.agent.onBehalfOf

Short The party the agent acted for
Definition The individual, device, or organization for whom the change was made.
Comments Covers the delegation case the harness will need: an AI agent acting on behalf of the supervising practitioner, or of the clinic.
Cardinality 0..1
Type Reference(Practitioner Profile | PractitionerRole Profile | Organization Profile)
Must Support yes
Invariants ele-1

Provenance.entity

Short The inputs the activity derived from -- for AI, the record context it was given
Definition The resources the activity used as input. For an AI action this is the record context the model was given: the resources drawn from the patient compartment that informed the output. This is what makes an AI output auditable rather than merely attributable -- "this draft was generated from these twelve resources" is a reviewable claim, where "this draft came from the harness" is not.
Comments Records WHICH RESOURCES the activity read, and stays at that grain deliberately: statement-level attribution -- which generated sentence rests on which passage -- rides the attributedFact extension instead, and a citation there MAY point back to the entity it was drawn from. For a chart-wide compartment load, listing every member may still be prohibitively large, and a summarizing convention (the compartment snapshot's own identifier rather than each member) is the expected direction for that case.
Cardinality 0..*
Type BackboneElement
Must Support yes
Invariants ele-1

Provenance.entity.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

Provenance.entity.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

Provenance.entity.modifierExtension

Short Extensions that cannot be ignored even if unrecognized
Definition May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
Invariants ele-1, ext-1
Also called extensions, user content, modifiers

Provenance.entity.role

Short derivation | revision | quotation | source | removal
Definition How the entity was used during the activity.
Cardinality 1..1
Type code
Must Support yes
Binding provenance-entity-role (required)
Invariants ele-1

Provenance.entity.what

Short The input resource
Definition Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.
Comments May be identifier-only per the logical-reference model.
Cardinality 1..1
Type Reference(Resource)
Must Support yes
Invariants ele-1

Provenance.entity.agent

Short Entity is attributed to this agent
Definition 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 entity.
Comments A usecase where one Provenance.entity.agent is used where the Entity that was used in the creation/updating of the Target, is not in the context of the same custodianship as the Target, and thus the meaning of Provenance.entity.agent is to say that the entity referenced is managed elsewhere and that this Agent provided access to it. This would be similar to where the Entity being referenced is managed outside FHIR, such as through HL7 v2, v3, or XDS. This might be where the Entity being referenced is managed in another FHIR resource server. Thus it explains the Provenance of that Entity's use in the context of this Provenance activity.
Cardinality 0..*
Invariants ele-1

Provenance.signature

Short Signature on target
Definition A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.
Cardinality 0..*
Type Signature
Invariants ele-1