Page Status: Outdated

Provenance - Fetch

Page index

Introduction

This section describes the process of fetching Provenence(s).

The basic approach to achieve this use case is an HTTP GET on Provenance. For example:

GET [base]/Provenence? TODO

Se Provenance for a complete list of query options.

Sequence diagram

The diagram below shows the typical sequence needed to get a provenance related to a change of one or more resources.

Note that the requests shown in the diagram doesn't include the full basepath. It only shows the last part of the http request including resource and possible search/query parameters.

See the generic example for other type of responses.

Examples

HTTP Header

Required authorization and provenance information.

TODO

Parameter Mandatory Comment
Authorization
X-Access
X-Purpose
X-Provenance
X-Request-ID
X-User-Agent
X-OrgInfo
X-PatientRef

This is an example of access and purpose type. The type must reflect the given situation. A full list of access and purpose types will be enclosed in the developer portal [Confluence, EHM][1].

See HTTP Header and Authorization for generic information about the HTTP header.

Example 1 - Integrity lock created by the practitioner

The provenance structure should be included in the X-Provenance header attribute. Note: The attribute must be Base64 encoded. This shows an example where a patient asks the practitioner to create an integrity lock

{
  "resourceType": "Provenance",
  "meta": {
    "profile": [
      "http://electronichealth.se/fhir/StructureDefinition/NLLProvenanceDataLock"
    ]
  },
  "extension": [
    {
      "url": "http://electronichealth.se/fhir/StructureDefinition/NLLProvenanceDataLockCoding",
      "valueCoding": {
        "code": "INTEGRITET"
      }
    }
  ],
  "occurredDateTime": "2019-12-03T11:49:30+01:00",
  "activity": {
    "coding": [
      {
        "code": "REGISTERED"
      }
    ]
  },
  "contained": [
    {
      "resourceType": "Practitioner",
      "id": "thePractitioner",
      "meta": {
        "profile": [
          "http://electronichealth.se/fhir/StructureDefinition/NLLPractitioner"
        ]
      },
      "extension": [
        {
          "extension": [
            {
              "url": "workplaceName",
              "valueString": "Min vardcentral"
            },
            {
              "url": "workplaceIdType",
              "valueCode": "ARBETSPLATSKOD"
            },
            {
              "url": "workplaceType",
              "valueCode": "HEALTHCARE"
            },
            {
              "url": "workplaceIdentifier",
              "valueString": "123123132-8"
            }
          ],
          "url": "http://electronichealth.se/fhir/StructureDefinition/NLLWorkplaceSummary"
        }
      ],
      "identifier": [
        {
          "system": "http://electronichealth.se/identifier/forskrivarkod",
          "value": "9001025"
        }
      ],
      "name": [
        {
          "family": "Läkarsson",
          "given": [
            "Kim"
          ]
        }
      ],
      "telecom": [
        {
          "extension": [
            {
              "url": "http://electronichealth.se/fhir/StructureDefinition/NLLContactPointType",
              "valueCode": "P"
            },
            {
              "url": "http://electronichealth.se/fhir/StructureDefinition/NLLAvailableToPatient",
              "valueBoolean": false
            }
          ],
          "value": "011-900000",
          "rank": 1
        },
        {
          "extension": [
            {
              "url": "http://electronichealth.se/fhir/StructureDefinition/NLLContactPointType",
              "valueCode": "W"
            },
            {
              "url": "http://electronichealth.se/fhir/StructureDefinition/NLLAvailableToPatient",
              "valueBoolean": false
            }
          ],
          "value": "011-900001",
          "rank": 1
        }
      ],
      "address": [
        {
          "extension": [
            {
              "url": "http://electronichealth.se/fhir/StructureDefinition/NLLAvailableToPatient",
              "valueBoolean": false
            }
          ],
          "type": "postal",
          "line": [
            "Gatan 2"
          ],
          "city": "Kalmar",
          "postalCode": "39301"
        }
      ],
      "qualification": [
        {
          "code": {
            "coding": [
              {
                "system":"http://electronichealth.se/fhir/ValueSet/nll-hosp-yrkeskod",
                "code": "LK"
              }
            ]
          }
        }
      ]
    }
  ],
  "agent": [
    {
      "type": {
        "coding": [
          {
            "code": "enterer"
          }
        ]
      },
      "who": {
        "reference": "#thePractitioner"
      }
    },
    {
      "type": {
        "coding": [
          {
            "code": "author"
          }
        ]
      },
      "who": {
        "reference": "Patient/fdd9ac5b-b457-4478-a648-d95afce16a9f"
      }
    }
  ]
}