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.
https://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-provenance.html
In Canvas a Provenance record is created each time the following data types are created or updated in the Canvas database:
- AllergyIntolerance
- CarePlan
- CareTeamMembership
- Condition
- ConsolidatedImmunization
- Coverage
- Device
- DiagnosticReport
- DocumentReference
- Encounter
- Goal
- Observation
- Patient
- Prescription
- Procedure
- ServiceRequest
- 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 author. 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". The agent is the record’s committer, or its originator when the record has no committer. When the agent is a patient, such as a write made with a patient-context token, the reference is to that patient in the format "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0". When a family member or other representative acts on the patient’s chart through family portal access, the reference is to the RelatedPerson their access was given from, in the format "RelatedPerson/3f1b2c7d8e9a4b5c6d7e8f9a0b1c2d3e". If the reference is Organization/00000000-0000-0000-0002-000000000000, Canvas couldn’t identify that committer or originator on the patient’s chart, so Canvas Medical is the default agent.
Type the reference refers to (e.g. “Practitioner”, “Patient”, “RelatedPerson”, “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 author. 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". The agent is the record’s committer, or its originator when the record has no committer. When the agent is a patient, such as a write made with a patient-context token, the reference is to that patient in the format "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0". When a family member or other representative acts on the patient’s chart through family portal access, the reference is to the RelatedPerson their access was given from, in the format "RelatedPerson/3f1b2c7d8e9a4b5c6d7e8f9a0b1c2d3e". If the reference is Organization/00000000-0000-0000-0002-000000000000, Canvas couldn’t identify that committer or originator on the patient’s chart, so Canvas Medical is the default agent.
Type the reference refers to (e.g. “Practitioner”, “Patient”, “RelatedPerson”, “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" } } ] }