---
title: "Facade Provenance"
canonical: "https://wiki.patientsknowbest.com/space/api/3365011901/Facade%20Provenance"
format: markdown
---
[https://www.hl7.org/fhir/STU3/provenance.html](https://www.hl7.org/fhir/STU3/provenance.html)

## Overview

The Provenance resource is the mechanism by which PKB will return source information.

Currently, this is only supported for instances of [[Data Point]].

## Relevant PKB entities

- [[[Source]]](https://pkbdev.atlassian.net/wiki/spaces/api/pages/3363700789/Data+Model#Source)

## Mappings

| **FHIR** | **PKB** | **Notes** |
| --- | --- | --- |
| Resource id | N/A |  |
| Provenance.target | A Reference to the data for which the Provenance applies.<br>- target: Reference
  - reference = the relative URL of the resource |  |
| Provenance.recorded | [[Data Point.Persisted Timestamp]] |  |
| Provenance.agent | - agent: BackboneElement
  - whoReference = onBehalfOfReference (excluding extensions). Until secondary provenance is fully supported, whoReference will match onBehalfOfReference.
  - onBehalfOfReference.extension[?]: Extension
    - url = "[http://fhir.patientsknowbest.com/structuredefinition/source-person](http://fhir.patientsknowbest.com/structuredefinition/source-person)"
    - valueReference: Reference   
<conditional>
    - If Source Person is a Professional:
      - reference = the relative URL of the Practitioner resource
      - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]]
    - Else if Source Person is a Patient:   
<conditional>
      - If Provenance.target references data in the same Patient's account:
        - reference = the relative URL of the Patient resource
        - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]]
      - Else :
        - reference = a reference to a contained RelatedPerson instance ([see RelatedPerson mappings](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3365077486))
        - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]]
  - onBehalfOfReference.extension[?]: Extension
    - url = "[http://fhir.patientsknowbest.com/structuredefinition/source-team](http://fhir.patientsknowbest.com/structuredefinition/source-team)"
    - valueReference: Reference
      - reference = the relative URL of the Organization of the [[Team]]
      - display = [[Team.Name]]
  - onBehalfOfReference.extension[?]: Extension
    - url = "[http://fhir.patientsknowbest.com/structuredefinition/source-organisation](http://fhir.patientsknowbest.com/structuredefinition/source-organisation)"
    - valueReference: Reference
      - reference = the relative URL of the Organization of the [[Organisation]]
      - display = [[Organisation.Name]]
  - onBehalfOfReference: Reference   
<conditional>
  - If any extension is present, use the valueReference from the first one (as determined by the documented order above.)
  - Else:
    - display = "No source information available" |  |