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
In Canvas a Provenance record is created each time the following data types are create or updated in the Canvas database:
- AllergyIntolerance
- CarePlan
- CareTeamMembership
- Condition
- ConsolidatedImmunization
- Device
- DiagnosticReport
- DocumentReference
- Goal
- Observation
- Patient
- Prescription
- Procedure
- UpdateGoal
Endpoints
Provenance read
Read a Provenance resource.
Path Parameters
Response Payload Attributes
The FHIR Resource name.
The identifier of the Provenance.
Target Reference(s)
The reference string of the target in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787"
.
Type the reference refers to (e.g. “Patient”).
Text alternative for the resource.
When the activity was recorded / updated.
Where the activity occurred, if relevant. Currently, this will always appear as absent data.
Activity that occurred. Canvas supports a provenance of the record being either created or updated.
Code defined by a terminology system.
The system url of the coding.
The code of the activity.
Actor involved.
The agent will be populated by the committer or originator in Canvas as the auther. If neither is found, it will default to the Canvas Organization as the composer.
Code defined by a terminology system.
The system url of the coding.
The code.
The display name of the coding.
The reference string of who the agent is in the format of "Practitioner/a39cafb9d1b445be95a2e2548e12a787"
. If the reference is Organization/00000000-0000-0000-0002-000000000000
, a committer or originator couldn’t be found in Canvas as the agent, so Canvas Medical is the default agent.
Type the reference refers to (e.g. “Practitioner”, “Organization”).
Text alternative for the resource.
Who the agent is representing. This will always be the Canvas Medical Organization.
The reference string of who the organization is in the format of "Organization/00000000-0000-0000-0002-000000000000"
.
Type the reference refers to (e.g. “Organization”).
Responses
Errors
Provenance search
Search for Provenance resources.
Query Parameters
The identifier of the Provenance.
Search by the agent of the Provenance record in the format "Practitioner/a39cafb9d1b445be95a2e2548e12a787"
or Organization/00000000-0000-0000-0002-000000000000
.
Search by provenance records associated to a specific patient in the format Patient/a39cafb9d1b445be95a2e2548e12a787
.
Search by records where the target is a specific patient or observation in the format Patient/a39cafb9d1b445be95a2e2548e12a787
or "Observation/920807d3-034b-4423-a65b-980068cb4bd1"
.
Response Payload Attributes
The FHIR Resource name.
This element and value designate that the bundle is a search response. Search result bundles will always have the Bundle.type of searchset .
The number of resources that match the search parameter.
Attributes relevant to pagination, see our Pagination page for more detail.
The relation of the page search
The search url for the specific relation
The results bundle that lists out each object returned in the search
The attributes specific to the resource type, see the Attributes section below
Attributes
The FHIR Resource name.
The identifier of the Provenance.
Target Reference(s)
The reference string of the target in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787"
.
Type the reference refers to (e.g. “Patient”).
Text alternative for the resource.
When the activity was recorded / updated.
Where the activity occurred, if relevant. Currently, this will always appear as absent data.
Activity that occurred. Canvas supports a provenance of the record being either created or updated.
Code defined by a terminology system.
The system url of the coding.
The code of the activity.
Actor involved.
The agent will be populated by the committer or originator in Canvas as the auther. If neither is found, it will default to the Canvas Organization as the composer.
Code defined by a terminology system.
The system url of the coding.
The code.
The display name of the coding.
The reference string of who the agent is in the format of "Practitioner/a39cafb9d1b445be95a2e2548e12a787"
. If the reference is Organization/00000000-0000-0000-0002-000000000000
, a committer or originator couldn’t be found in Canvas as the agent, so Canvas Medical is the default agent.
Type the reference refers to (e.g. “Practitioner”, “Organization”).
Text alternative for the resource.
Who the agent is representing. This will always be the Canvas Medical Organization.
The reference string of who the organization is in the format of "Organization/00000000-0000-0000-0002-000000000000"
.
Type the reference refers to (e.g. “Organization”).
Responses
Errors
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/b8dfa97bdcdf4754bcd8197ca78ef0f0' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'
import requests url = "https://fumage-example.canvasmedical.com/Provenance?target=Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0" 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" } } ] }