---
title: "Aggregated Appointment"
canonical: "https://wiki.patientsknowbest.com/space/api/3365077229/Aggregated%20Appointment"
format: markdown
---
[http://fhir.patientsknowbest.com/structuredefinition/aggregated-appointment](http://fhir.patientsknowbest.com/structuredefinition/aggregated-appointment)

[https://www.hl7.org/fhir/R4/appointment.html](https://www.hl7.org/fhir/R4/appointment.html)

## Description

This profile is…

- a description of how non-FHIR appointment data will be mapped to FHIR in the [Aggregated FHIR endpoint](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3364388935) by PKB

This profile is not…

- a spec for all Appointment resources returned from the Aggregated FHIR endpoint; resources sent to a Customer FHIR endpoint are not guaranteed to conform to this profile
- a spec describing how Appointment resources must be sent to a Customer FHIR endpoint; some of the elements used in this profile might only be meaningful for migrated data and cannot be provided to a Customer FHIR endpoint

## Relevant PKB entities

- [[[Appointment]]](https://wiki.patientsknowbest.com/space/api/3729195048/Entity%3A+Appointment)
- [[[Appointment Participant]]](https://wiki.patientsknowbest.com/space/api/3729195048/Entity%3A+Appointment)
- [[[External Appointment Participant]]](https://wiki.patientsknowbest.com/space/api/3729195048/Entity%3A+Appointment)

| **FHIR** | **PKB** | **Notes** |
| --- | --- | --- |
| Resource id | [[Appointment.Aggregated Data Point ID]] |  |
| Resource meta | - meta: Meta
  - lastUpdated = time of most recent update, automatically maintained by the FHIR server. It is normal for this to be slightly later than any value returned in the [http://fhir.patientsknowbest.com/structuredefinition/version-persisted](http://fhir.patientsknowbest.com/structuredefinition/version-persisted) extension.
  - security[x]: Coding
    - system = ["http://fhir.patientsknowbest.com/codesystem/privacy-label](http://fhir.patientsknowbest.com/codesystem/privacy-label)"
    - code = [[Data Point.Privacy Label]]
  - security[x]: Coding
    - system =<span style="color: #0747a6"> “</span>[http://fhir.patientsknowbest.com/codesystem/source-organization](http://fhir.patientsknowbest.com/codesystem/source-organization)”
    - code = the resource ID of the Organization representing the [[Data Point.Source Organisation]]
  - security[x]: Coding
    - system =<span style="color: #0747a6"> “</span>[http://fhir.patientsknowbest.com/codesystem/source-team](http://fhir.patientsknowbest.com/codesystem/source-team)”
    - code = the resource ID of the Organization representing the [[Data Point.Source Team]]
  - <span style="color: #ff991f"><conditional></span>
  - <span style="color: #ff991f">If Source Person is a Professional:</span>
  - security[x]: Coding
    - system = <span style="color: #0747a6">“</span>[http://fhir.patientsknowbest.com/codesystem/source-practitioner](http://fhir.patientsknowbest.com/codesystem/source-practitioner)”
    - code = the resource ID of the Practitioner
  - <span style="color: #ff991f">Else if Source Person is a Patient:</span>
  - security[x]: Coding
    - system = <span style="color: #0747a6">“</span>[http://fhir.patientsknowbest.com/codesystem/source-patient](http://fhir.patientsknowbest.com/codesystem/source-patient)”
    - code = the resource ID of the Patient
  - security[x]: Coding
    - system =<span style="color: #0747a6"> “</span>[http://fhir.patientsknowbest.com/codesystem/connecting-org](http://fhir.patientsknowbest.com/codesystem/connecting-org)”
    - code = the resource ID of the Organization representing the [[Data Point.Connecting Organisation]]<br>[[Data Point.Privacy Label]] code mappings (PKB → FHIR):<br>GENERAL_HEALTH → GENERAL_HEALTH  
MENTAL_HEALTH → MENTAL_HEALTH  
SEXUAL_HEALTH → SEXUAL_HEALTH  
SOCIAL_CARE → SOCIAL_CARE |  |
|  | - extension[x]: Extension
  - url = “[http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id](http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id)”
  - valueString = [[Data Point.Uploaded Data ID]] | A single uploadeddata entry can result in multiple data points, so this ID does not necessarily uniquely identify a data point. |
|  | - extension[x]: Extension
  - url = “[http://fhir.patientsknowbest.com/structuredefinition/access-route](http://fhir.patientsknowbest.com/structuredefinition/access-route)”
  - valueCoding: Coding
    - system = “[http://fhir.patientsknowbest.com/codesystem/access-route](http://fhir.patientsknowbest.com/codesystem/access-route)”
    - code = [[Data Point.Access Route]]
    - display = display name for the corresponding access route |  |
|  | - extension[x]: Extension
  - url = <span style="color: #0747a6">"</span>[http://fhir.patientsknowbest.com/structuredefinition/source-text](http://fhir.patientsknowbest.com/structuredefinition/source-text)<span style="color: #0747a6">"</span>
  - valueString = [[Data Point.Source Text]] |  |
|  | - extension[x]: Extension
  - url = <span style="color: #0747a6">“</span>[http://fhir.patientsknowbest.com/structuredefinition/responsible-organization](http://fhir.patientsknowbest.com/structuredefinition/responsible-organization)<span style="color: #0747a6">”</span>
  - valueString = [[Data Point.Responsible Organisation Identifier]] |  |
|  | - extension[x]: Extension
  - url = <span style="color: #0747a6">“</span>[http://fhir.patientsknowbest.com/structuredefinition/partner-identifier](http://fhir.patientsknowbest.com/structuredefinition/partner-identifier)<span style="color: #0747a6">”</span>
  - valueReference: Reference
    - identifier: Identifier
      - system = <span style="color: #0747a6">“urn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d</span>”
      - value = [[Data Point.HL7 Partner]] |  |
|  | - extension[x]: Extension
  - url = <span style="color: #0747a6">“</span>[http://fhir.patientsknowbest.com/structuredefinition/privacy-override-source-organization](http://fhir.patientsknowbest.com/structuredefinition/privacy-override-source-organization)<span style="color: #0747a6">”</span>
  - valueReference: Reference
    - reference = the relative URL of the Organization resource for the source organisation of the most recent privacy override | Note that this is a reference, unlike the meta.security which contains a code. |
|  | - extension[x]: Extension
  - url = <span style="color: #0747a6">"</span>[http://fhir.patientsknowbest.com/structuredefinition/privacy-override-source-team](http://fhir.patientsknowbest.com/structuredefinition/privacy-override-source-team)<span style="color: #0747a6">”</span>
  - valueReference: Reference
    - reference = the relative URL of the Organization resource for the source team of the most recent privacy override | Note that this is a reference, unlike the meta.security which contains a code. |
|  | - extension[x]: Extension
  - url = <span style="color: #0747a6">"</span>[http://fhir.patientsknowbest.com/structuredefinition/privacy-override-source-person](http://fhir.patientsknowbest.com/structuredefinition/privacy-override-source-person)<span style="color: #0747a6">”</span>
  - valueReference: Reference
    - reference = the relative URL of the Patient or Practitioner resource of the source person of the most recent privacy override | Note that this is a reference, unlike the meta.security which contains a code. |
|  | - extension[x]: Extension
  - url = <span style="color: #0747a6">"</span>[http://fhir.patientsknowbest.com/structuredefinition/privacy-override-access-route](http://fhir.patientsknowbest.com/structuredefinition/privacy-override-access-route)<span style="color: #0747a6">”</span>
  - valueCoding: Coding
    - system = <span style="color: #0747a6">“</span>[http://fhir.patientsknowbest.com/codesystem/access-route](http://fhir.patientsknowbest.com/codesystem/access-route)<span style="color: #0747a6">”</span>
    - code = the access route which added the most recent privacy override
    - display = display name for the corresponding access route |  |
|  | - extension[x]: Extension
  - url = <span style="color: #0747a6">"</span>[http://fhir.patientsknowbest.com/structuredefinition/privacy-override-change-date](http://fhir.patientsknowbest.com/structuredefinition/privacy-override-change-date)<span style="color: #0747a6">“</span>
  - valueDateTime = the timestamp of the most recent privacy override |  |
|  | - extension[x]: Extension
  - url = “[http://fhir.patientsknowbest.com/structuredefinition/recorded-date](http://fhir.patientsknowbest.com/structuredefinition/recorded-date)”
  - valueDateTime = [[Data Point.Entered Timestamp]] |  |
|  | - extension[x]: Extension
  - url = “[http://fhir.patientsknowbest.com/structuredefinition/version-persisted](http://fhir.patientsknowbest.com/structuredefinition/version-persisted)”
  - valueDateTime = [[Data Point.Persisted Timestamp]] |  |
|  | - extension[x]: Extension
  - url = “[https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated](https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated)”
  - valueDateTime = as per extension definition |  |
| Appointment.identifier | - identifier[x]: Identifier
  - value = [[Data Point.External Data Point ID]]
- identifier[x]: Identifier
  - system = “[http://fhir.patientsknowbest.com/id/menudata-legacy-identifier](http://fhir.patientsknowbest.com/id/menudata-legacy-identifier)”
  - value = [[Data Point.Legacy Data Point ID]]
- identifier[x]: Identifier
  - system = “[http://fhir.patientsknowbest.com/id/common-identifier](http://fhir.patientsknowbest.com/id/common-identifier)”
  - value = [[Appointment.Common ID]] |  |
| Appointment.status | [[Appointment.Status]]<br>[[Appointment.Status]] code mappings (PKB → FHIR):<br>ACTIVE → booked  
CANCELLED → cancelled  
DNA → noshow |  |
| Appointment.serviceType | - serviceType: CodeableConcept
  - coding[0] = [[Appointment.Type]] |  |
| Appointment.specialty | - specialty: CodeableConcept
  - coding[0]: Coding
    - code = [[Data Point.Specialty]]
    - display = Resolve( [[Data Point.Specialty]] ) | The Resolve() notation indicates that the display value for the corresponding specialty code will be determined at the time of retrieval, based [on the (optional) code set for the source organisation](https://pkbdev.atlassian.net/wiki/spaces/api/pages/3365012136/Code+sets#Hospital-Service-(Specialty)). |
| Appointment.appointmentType | - appointmentType: CodeableConcept
  - coding[0]: Coding
    - display = [[Appointment.Subject]] |  |
| Appointment.start | [[Appointment.Start Timestamp]] |  |
| Appointment.end | [[Appointment.End Timestamp]] |  |
| Appointment.comment | [[Appointment.Description]] |  |
| Appointment.participant | For the [[Appointment->Appointment Participant]] corresponding to the [[Patient]], add a Reference to the Patient resource.<br>- participant: BackboneElement
  - actor: Reference
    - reference = the relative URL of the Patient resource
    - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]]
  - status = "accepted" |  |
| For any [[Appointment->Appointment Participant]] corresponding to a [[Professional]], add a Reference to the Practitioner resource.<br>- participant: BackboneElement
  - actor: Reference
    - reference = the relative URL of the Practitioner resource
    - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]]
  - status = "accepted" |  |
| For any [[Appointment->Appointment Participant]] corresponding to a [[Patient]] other than the patient receiving care (i.e. a carer), add a participant to the response.<br>- participant: BackboneElement
  - actor: Reference
    - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]]
  - status = "accepted" |  |
| For any [[Appointment->External Appointment Participant]], add a participant to the response.<br>- participant: BackboneElement
  - actor: Reference
    - display = [[External Appointment Participant.Name]]
  - status = "accepted" |  |
| - participant: BackboneElement
  - actor: Reference
    - type = “Location”
    - display = [[Appointment.Location]]
  - status = “accepted” |  |