Page Status: updated 2023-02-28

Provenance

Page index

Introduction

The Provenance resource, shown in the profile NLLProvenance, contains additional information describing why a resource was created or changed, who performed and/or advised the change and when the change occurred.

When doing an HTTP POST or PUT (insert / update) of a resource, a Provenance resource must be provided in the HTTP header as a custom header parameter, X-Provenance, see HTTP Header and Authorization. The target of the Provenance is the resource(s) defined in the HTTP body. The provided provenance addresses why and who. The National Medication List adds when to the provenance.

See the HL7 FHIR documentation Provenance HTTP header for more details about the Provenance resource.

Regarding information about how the "must support"-property is used in the Swedish National MedicationList, please refer to the page Resources

Overview

idS Σ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
targetS Σ I1..*Reference(NLLMedicationRequest | NLLMedicationDispense | NLLMultiDoseDispConsent | NLLMultiDoseDispensingBasis | NLLDispensePaperPrescription | NLLDataLock | NLLAccessConsent)
occurredDateTimedateTime
recordedS Σ1..1instant
policy0..*uri
locationI0..1Reference(Location)
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
typeS Σ1..1CodeableConceptBinding
role0..*CodeableConcept
whoS Σ I1..1Reference(NLLPractitioner | NLLPatient)
onBehalfOfI0..1Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
roleΣ1..1codeBinding
whatΣ I1..1Reference(Resource)
agent0..*see (agent)
signature0..*Signature

Contained resources

References to other resources are based on contained resources in the following cases.

Element Resource Case
agent.who Practitioner Allways

For more information about references and contained resources see Resources - References.

Details

Description of all elements can be found here, Element descriptions.

Mapping of FHIR element names to the National Medication List names can be found here, Element language mappings.

Super provenance and sub provenances

The profile NLLProvenance is a super type compatible with all other sub-profiles used in the National Medication List. NLLProvenance can therefore be used as a replacement of all other provenance types.

The value sets used in NLLProvenance contain all codes for all scenarios in the National Medication List, and the references support all scenarios. To describe valid elements and combinations of data for specific scenarios a number of specialized sub-profiles are available.

See the following pages for more information about how to use the Provenance resource in scenarios where it is used together with information about the supporting sub-profiles.

Practitioner

The Provenance structure must conform to the type of activity it describes and who is doing it. In some use cases a practitioner is provided in the HTTP body, e.g. an agent is defined as requester in a MedicationRequest, as well as in the Provenance in the HTTP header. It is important that the practitioner is the same in both places in many of those use cases.

Supported operations

HTTP methods

Operation Supported Comment
Search (GET, POST) yes See below for supported search options.
Insert (POST) no
Update (PUT) no
Delete (DEL) no
Operation (GET, POST) no

When interacting with this resource a set of HTTP-headers must be included in the request, see HTTP Header and Authorization.

Query operations

The following query alternatives are available for this resource.

  1. ../Provenance/[id]
  2. ../Provenance?target=[ref]{&activity-type=[code]}

Compartment searches

Supported searches on a compartment. This kind of search returns a bundle with the related resources.

  1. ../Provenance/[id]/MedicationRequest returns all related medication requests.
  2. ../MedicationRequest/[id]/Provenance returns all related provenances.
  3. ../Basic/[id]/Provenance returns all related provenances (data locks and multi dose dispenses).
  4. ../Consent/[id]/Provenance returns all related provenances.
  5. ../MedicationDispense/[id]/Provenance returns all related provenances.

Include & reverse includes

Include and revinclude are not supported by this resource.

For generic information about how to search in FHIR look here.

Search parameters

The table below shows all supported search parameters.

Parameter Description Comment
Provenance/[id] A read based on the logical ID (UUID) of a provenance
../Provenance/<uuid>
Applicable for provenances related to Basic (multidose dispenses and datalock), medication request, medication dispense (not dispense paper prescription) and consent
target Reference to the target resource. Supported targets are MedicationRequest, MedicationDispense, Consent and Basic
..?target=Basic/<uuid>
..?target=MedicationRequest/<uuid>/_history/2
activity-type Type of activity
..&activity-type=REGISTRERA_FORSKRIVNING