# Provenance when writing vital sign data ### 1. Provenance data around who authored the observation (e.g., the health system in patient mediated data from a healthcare provider) ![](https://hackmd.io/_uploads/S1h87epp2.png) ```js [{ "resourceType": "Provenance", "id": "contained_1", "target": [{"reference": "#"}], "recorded": "2019-07-09T15:26:23.217+00:00", "agent": [{ "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", "code": "author", "display": "Author" }] }, "who": { "display": "Saint Luke\'s Hospital of Kansas City", // identifier could be an url as in Patient Access Brands "identifier": { "system": "urn:ietf:rfc:3986", "value": "https://stlukes.example.org" } } },{ "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", "code": "transmitter", "display": "Transmitter" }] }, "who": { //this is the user submitting the data //can be populated by the EHR based on the SMART context if omitted "reference": "Patient/123" } }] }] ``` ### 2. Provenance data around who authored the observation (e.g., the health system in patient mediated data from a healthcare provider), maximalist version ```js [{ "resourceType": "Provenance", "id": "contained_1", "target": [{"reference": "#"}], "recorded": "2019-07-09T15:26:23.217+00:00", "agent": [{ "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", "code": "author", "display": "Author" }] }, "who": {"reference": "#contained_2"} },{ "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", "code": "transmitter", "display": "Transmitter" }] }, "who": {"reference": "Patient/123"} }] },{ "resourceType": "Organization", "id": "contained_2", "name": "Saint Luke's Hospital of Kansas City", "telecom": [{ "system": "phone", "value": "(816)932-2000", "use": "work" },{ "system": "other", "value": "http://www.saintlukeshealthsystem.org/locations/saint-lukes-hospital-kansas-city", "use": "work" }], "address": [{ "text": "3300 Washtenaw Avenue, Suite 227 Amherst MA 01002", "line": ["4401 Wornall Rd,"], "city": "Amherst", "state": "MA", "postalCode": "64111" }], "endpoint": [{"reference": "#contained_3" }] },{ "resourceType": "Endpoint", "id": "contained_3", "extension": [{ "url": "http://hl7.org/fhir/smart-app-launch/StructureDefinition/endpoint-fhir-version", "valueCode": "4.0.1" }], "status": "active", "connectionType": { "system": "http://terminology.hl7.org/CodeSystem/endpoint-connection-type", "code": "hl7-fhir-rest" }, "name": "FHIR R4 Endpoint for Saint Luke's", "managingOrganization": {"reference" : "#contained_2"}, "contact": [{ "system": "url", "value": "https://dev-portal.example.org" }], "payloadType": [{ "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/endpoint-payload-type", "code": "none" }] }], "address": "https://fhir.examplelabs.example.org/r4" }] ``` ### 3. Provenance data on the apps used to author and share the observation (e.g., BP app -> PHR -> EHR) ![](https://hackmd.io/_uploads/B1PWv1pah.png) ```js [{ "resourceType": "Provenance", "target": [{"reference": "#"}], "recorded": "2019-07-08", "agent": [{ "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", "code": "composer", "display": "Composer" }] }, "who": { //this is the app that provided the original data "display": "OMRON for iOS" } },{ "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", "code": "author", "display": "Author" }] }, "who": { "reference": "Patient/123" } }] },{ "resourceType": "Provenance", "target": [{"reference": "#"}], "recorded": "2019-07-09T10:26:23.217+00:00", "agent": [{ "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", "code": "assembler", "display": "Assembler" }] }, "who": { //this is the app that's transmitting the data "display": "Healthkit" } }] }] ```