Provenance

Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.

http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-provenance.html

Attributes

id
string

The identifier of the Provenance

target
array[json]

Target Reference(s)

recorded
datetime

When the activity was recorded / updated

activity
json

Activity that occurred

agent
array[json]

Actor involved

get
/Provenance/{id}

Provenance read

Read a Provenance resource.

Path Parameters

id required
string
The unique identifier for the Provenance

Responses

200 OK
Request was successful.

Errors

401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
404 Not Found
The requested resource was not found.

Query Parameters

_id
string

The identifier of the Provenance

agent
string

Who participated

patient
string

Where the activity involved patient data

target
string

Target Reference(s)

Responses

200 OK
Request was successful.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
  • curl --request GET \
         --url 'https://fumage-example.canvasmedical.com/Provenance/<id>' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/Provenance/<id>"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
        "resourceType": "Provenance",
        "id": "db1631ed-bcd3-4e43-84a1-7e507e8aa44c",
        "target": [
            {
                "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0",
                "type": "Patient"
            }
        ],
        "recorded": "2023-09-18T14:42:14.981528+00:00",
        "activity": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/v3-DataOperation",
                    "code": "CREATE"
                }
            ]
        },
        "agent": [
            {
                "type": {
                    "coding": [
                        {
                            "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
                            "code": "composer",
                            "display": "Composer"
                        }
                    ]
                },
                "who": {
                    "reference": "Organization/00000000-0000-0000-0002-000000000000",
                    "type": "Organization",
                    "display": "Canvas Medical"
                },
                "onBehalfOf": {
                    "reference": "Organization/00000000-0000-0000-0002-000000000000",
                    "type": "Organization"
                }
            }
        ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "unknown",
          "details": {
            "text": "Authentication failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "forbidden",
          "details": {
            "text": "Authorization failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "not-found",
          "details": {
            "text": "Unknown Provenance resource 'a47c7b0e-bbb4-42cd-bc4a-df259d148ea1'"
          }
        }
      ]
    }
    
  • curl --request GET \
         --url 'https://fumage-example.canvasmedical.com/Provenance?target=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/Provenance?target=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
        "resourceType": "Bundle",
        "type": "searchset",
        "total": 1,
        "link": [
            {
                "relation": "self",
                "url": "/Provenance?target=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0"
            },
            {
                "relation": "first",
                "url": "/Provenance?target=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0"
            },
            {
                "relation": "last",
                "url": "/Provenance?target=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0"
            }
        ],
        "entry": [
            {
                "resource": {
                    "resourceType": "Provenance",
                    "id": "db1631ed-bcd3-4e43-84a1-7e507e8aa44c",
                    "target": [
                        {
                            "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0",
                            "type": "Patient"
                        }
                    ],
                    "recorded": "2023-09-18T14:42:14.981528+00:00",
                    "activity": {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/v3-DataOperation",
                                "code": "CREATE"
                            }
                        ]
                    },
                    "agent": [
                        {
                            "type": {
                                "coding": [
                                    {
                                        "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
                                        "code": "composer",
                                        "display": "Composer"
                                    }
                                ]
                            },
                            "who": {
                                "reference": "Organization/00000000-0000-0000-0002-000000000000",
                                "type": "Organization",
                                "display": "Canvas Medical"
                            },
                            "onBehalfOf": {
                                "reference": "Organization/00000000-0000-0000-0002-000000000000",
                                "type": "Organization"
                            }
                        }
                    ]
                }
            }
        ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "invalid",
          "details": {
            "text": "Bad request"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "unknown",
          "details": {
            "text": "Authentication failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "forbidden",
          "details": {
            "text": "Authorization failed"
          }
        }
      ]
    }