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

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

## Description

This profile is…

- a description of how non-FHIR diagnosis 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 Condition 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 Condition 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

- [[[Diagnosis]]](https://wiki.patientsknowbest.com/space/api/3734601729/Entity%3A+Diagnosis)

| **FHIR** | **PKB** | **Notes** |
| --- | --- | --- |
| Resource id | [[Diagnosis.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 = <span style="color: #0747a6">"</span>[http://fhir.patientsknowbest.com/codesystem/privacy-label](http://fhir.patientsknowbest.com/codesystem/privacy-label)<span style="color: #0747a6">"</span>
    - 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 |  |
| Condition.identifier | - identifier[x]: Identifier
  - system = “[http://fhir.patientsknowbest.com/id/menudata-legacy-identifier”](#)
  - value = [[Data Point.Legacy Data Point ID]] |  |
| Condition.clinicalStatus | - clinicalStatus: CodeableConcept
  - coding[0]: Coding
    - system = “[http://terminology.hl7.org/CodeSystem/condition-clinical](http://terminology.hl7.org/CodeSystem/condition-clinical)”
    - code = [[Diagnosis.Status]]<br>[[Data Point.Status]] code mappings (PKB → FHIR):<br>- ACTIVE → active
- INACTIVE → inactive |  |
| Condition.category | - category: CodeableConcept
  - coding[0]: Coding
    - system = “[http://terminology.hl7.org/CodeSystem/condition-category](http://terminology.hl7.org/CodeSystem/condition-category)”
    - code = “problem-list-item” |  |
| Condition.code | [[Diagnosis.Diagnosis]] |  |
| Condition.subject | - subject: Reference
  - reference = the relative URL of the Patient resource
  - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]] |  |
| Condition.onsetDateTime | [[Diagnosis.Start Timestamp]] |  |
| Condition.abatementDateTime | [[Diagnosis.End Timestamp]] |  |
| Condition.recordedDate | [[Diagnosis.Date Asserted]] |  |
| Condition.note | - note: Annotation
  - text = [[Diagnosis.Details]] |  |