Data Model

This Data Model is currently in draft.
This data model is intended to provide a high level overview of what a PKB medical record looks like.

Rather than trying to show the entire model in one diagram, partial illustrations are given below that each take one topic as their focus.

Notation

Cardinality

Cardinality is indicated through the following symbols.

 Exactly One  Zero or One  Zero or More  One or More
       

Specialization

The example below indicates that Entity B is a more specialized version of Entity A.

Data Types

Name Description
String A textual value.
Local Date A date. It contains no time information, and time zone processing is not applied.
Timestamp A point in time with both date and time information. The point in time is evaluated within a time zone, and hence can be meaningfully displayed in an alternative time zone.
Number A numerical value that can have a real value, i.e. not necessarily an integer.
Enum A value that can only contain one of a predefined enumeration of values.
Boolean A value that is either true or false.
Binary Raw data. For example, the contents of an uploaded file.
Ref A value which references an attribute in another entity. The data type will match that of the referenced attribute.
CodingA compound value. Consists of:
  • Code
  • Code System
  • Display Text
CodeableConceptA compound value. Consists of:
  • Display Text
  • 0 or more Coding attributes

Relationships

Common Entities

Attachment

Entity: Attachment

Attribute Type Description HL7 APIGUI: Patient
Public ID String The ID of the attachment.  
Filename String
  • The filename of the attachment.
Various, depending on associated data type
Content Binary The content of the attachment. Various, depending on associated data type
Media Type String The type of media contained in the content.

Data Point

Entity: Data Point

Attribute Type Description HL7 APIGUI: Patient
Data Point ID String A unique ID identifying this data point. This ID will not change even if the data point is modified.   
External Data Point IDStringThe ID assigned to this data point by the source system.
Privacy LabelEnum
  • GENERAL_HEALTH
  • MENTAL_HEALTH
  • SEXUAL_HEALTH
  • SOCIAL_CARE
 Various, depending on associated data type
SpecialtyStringThe specialty associated with the data point.
  • PV1-10.1
Various, depending on associated data type
Entered Timestamp Timestamp Flexibly used, depending on the type of data. It is broadly intended to capture the timestamp when the data point was entered into the originating system.  
Persisted Timestamp Timestamp The timestamp when the data point was persisted in PKB.   

Source

Entity: Source

Attribute Type Description HL7 APIGUI: Patient
Source Organisation Ref : [[Organisation.Public ID]] The organisation which created the data point. This is derived from the HL7 connection. See here for more information.Various, depending on associated data type
Source Team Ref :
[[Team.Public ID]]
The team which created the data point. This is derived from the HL7 connection. See here for more information.Various, depending on associated data type
Source Person Ref :
[[User.Public ID]]
The PKB user who created the data point. This value is never set for data sent via HL7.Various, depending on associated data type
Source Text String Source information, other than organisation, team, or person. Various, depending on associated data type

Administrative, User & Identifier Entities

Administrative

Entity: Organisation

Attribute Type Description HL7 APIGUI: Patient
Public IDStringAn ID for this Organisation.   
NameStringThe name of this Organisation.  

Entity: Team

Attribute Type Description HL7 APIGUI: Patient
Public IDStringAn ID for this Team.  
NameStringThe name of this Team.  

Entity: Person

AttributeTypeDescriptionHL7 APIGUI: Patient
Public IDStringAn ID for this Person.


Entity: User

AttributeTypeDescriptionHL7 APIGUI: Patient
Public IDStringAn ID for this User.


TitleStringTitle.For Patient
Given NameStringThe first name of the User.For Patient
Family NameStringThe last name of the User.For Patient

Entity: Privacy Officer - Extends: User

No attributes.

Entity: Organisation Administrator - Extends: User

No attributes.

Entity: Team Coordinator - Extends: User

No attributes.

Entity: Professional - Extends: User

AttributeTypeDescriptionHL7 APIGUI: Patient
Address Line 1StringFirst line of the address.
Address Line 2StringSecond line of the address.
CityStringThe nearest city or town.
StateStringThe state.
Postal CodeStringThe postal code.
Date of BirthLocal DateDate of birth.
PhoneStringThe phone number of the professional. 
Job TitleStringWhat the professional does.  
EmailStringThe email address of the professional.  

Entity: Role

AttributeTypeDescriptionHL7 APIGUI: Patient
Public IDStringAn ID for this Role.


Entity: Country

No attributes.

Entity: Consent Record

AttributeTypeDescriptionHL7 APIGUI: Patient
Public IDStringAn ID for this Consent Record.
  
General Health GrantedBooleanWhether or not the patient has granted access to the general health portion of their medical record.
 
Mental Health GrantedBooleanWhether or not the patient has granted access to the mental health portion of their medical record.  
Sexual Health GrantedBooleanWhether or not the patient has granted access to the sexual health portion of their medical record.
 
Social Care GrantedBooleanWhether or not the patient has granted access to the social care portion of their medical record.  
Reason CodeEnum
  • MIGRATED
  • CREATED_ACCOUNT
  • REFERRAL
  • POWER_OF_ATTORNEY
  • COURT_ORDER
  • EXPLICIT_CONSENT
  • DISCHARGE
  • SAFEGUARDING
  • PATIENT_OPT_OUT
  
Reason TextStringA description justifying why these consent values where set.

DischargedBoolean Indicates whether the actor is currently providing care to the patient.

Patient & Contact

Display

Demographics appear in the Settings page of the patient's record.

Entity: Patient - Extends: User

Patient

Attribute Type Description HL7 APIGUI: Patient
Middle Names String Any middle names of the patient.
Address Line 1 String First line of the address.
Address Line 2 String Second line of the address.
City String The nearest city or town.
State String The state.
Country String The country.
Postal Code String The postal code.
Date of Birth Local Date Date of birth.
Death Timestamp Timestamp When the patient died.
Gender Enum This is the administrative gender of the patient.
  • UNKNOWN
  • MALE
  • FEMALE
  • INDETERMINATE
Language Enum The primary language of the patient. Language dropdown shown in the footer of every page.
Time Zone Enum The patient's current preferred time zone. This will be used to localise times within the web interface.  
Skype ID String How to contact the patient on Skype.  
Phone String The phone number of the patient.
Status Enum Indicates, for example, whether the patient has registered with PKB or not.

Sharing DisabledBooleanWhether or not the patient has requested Sharing Disabled.  
Access FrozenBooleanWhether or not access to this medical record has been frozen.  

Entity: Contact

Attribute Type Description HL7 APIGUI: Patient
Public ID String The ID of the contact.  
Type Enum
  • EMAIL_ADDRESS

Value String The value of the contact information.
Is PrimaryBooleanIndicates whether this is primary. For example, if a patient has several email addresses, exactly one must be designated as primary, and that will be the one that receives notifications from PKB. 
Is Confirmed Boolean Indicates whether the contact has been confirmed. For example, a patient must confirm they have access to an email address by clicking a link before it is confirmed as belonging to them.  

Identifiers

Diagram

Entity: National ID

Attribute Type Description HL7 APIGUI: Patient
Value String The value of the ID.
  • Profile page

Entity: National ID Type

Attribute Type Description HL7 APIGUI: Patient
Name String The name of this specific ID type.  
  • Profile page
Country Codes Enum Each National ID Type is associated with one or more countries.   
HL7 Assigning Authority String This is only used by the HL7 API. When receiving an ID of this type in an HL7 message, the assigning authority must match this value.  
HL7 Type Code String This is only used by the HL7 API. When receiving an ID of this type in an HL7 message, the type code must match this value.  
FHIR Identifier SystemStringUsed by the FHIR API to indicate that an identifier belongs to this National ID Type.  

Entity: Local ID

AttributeTypeDescriptionHL7 APIGUI: Patient
ValueStringThe value of the ID.
  • Profile page

Entity: Local ID Type

AttributeTypeDescriptionHL7 APIGUI: Patient
Public IDStringThe ID of the Local ID Type.  
NameStringThe name of this specific ID type, to help distinguish between several. For example, Hospital XYZ ID. 
  • Profile page
HL7 Assigning AuthorityStringThis is only used by the HL7 API. When receiving an ID of this type in an HL7 message, the assigning authority must match this value. 
HL7 Type CodeStringThis is only used by the HL7 API. When receiving an ID of this type in an HL7 message, the type code must match this value. 

Entity: Organisation Level ID - Extends: Local ID

No attributes.

Entity: Organisation Level ID Type -  Extends: Local ID Type

No attributes.

Entity: Team Level ID - Extends: Local ID

No attributes.

Entity: Team Level ID Type - Extends: Local ID Type

No attributes.

Core Medical Entities

Allergy

Diagram

Display

Allergies appear in the Health > Allergies page of the patient's record.

Entity: Allergy - Extends: Data Point


Attribute Type Description HL7 APIGUI: Patient
Allergen CodeableConcept The allergen.
Onset Timestamp Timestamp When the symptoms began.
Reactions CodeableConcept List The reactions to the allergen.
Severity CodeableConcept How severe the reaction to the allergen is.

Appointment

Diagram

Display

Appointments appear in the Diary > Calendar page of the patient's record.

Entity: Appointment - Extends: Data Point

Attribute Type Description HL7 APIGUI: Patient
TypeCodingThe type of appointment.
Start Timestamp Timestamp When the appointment starts.
End Timestamp Timestamp When the appointment ends.
Subject String A brief reason for the appointment.
Description String A longer explanation of the appointment.
Location String Where the appointment is to be held.

StatusEnum 
  • ACTIVE
  • CANCELLED
  • DNA

Entity: Appointment Participant

AttributeTypeDescriptionHL7 APIGUI: Patient
User Public IDRef :
[[User.Public ID]]
The PKB user who is participating in the appointment.When appointments are created via the HL7 API, the patient will be added as the only Appointment Participant.
StatusEnum
  • ACCEPTED
The status is always Accepted.The status is always Accepted.

Entity: External Appointment Participant

AttributeTypeDescriptionHL7 APIGUI: Patient
NameString
The name of the participant (optionally including their role).

Care Plan

Diagram

Display

Care Plans appear in the Treatment > Plans page of the patient's record.

Entity: Care Plan - Extends: Data Point

Attribute Type Description HL7 APIGUI: Patient
Name String The name of the care plan.
Created Timestamp Timestamp The timestamp when the care plan was first created.
Last Edited Timestamp
Timestamp The timestamp when the care plan was last edited.
Action Plan String The main body of the care plan.
Green String An explanation of what to expect when the condition is under control.  
Amber String An explanation of what might need attention.  
Red String An explanation of what needs urgent attention.

 

Diagnosis

Diagram

Display

Diagnoses appear in the Health > Diagnosis page of the patient's record.

Entity: Diagnosis - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Diagnosis CodeableConcept The diagnosis.
Start TimestampTimestamp When the condition began.
End Timestamp Timestamp When the condition ended.  
DetailsStringAdditional information about this diagnosis. 
  • Diagnosis details page

Encounter

Diagram

Display

Encounters appear in the Discussions page of a patient's record.

Entity: Encounter

Attribute Type Description HL7 APIGUI: Patient
Encounter IDStringA unique ID identifying this encounter. This ID will not change even if the encounter is modified.  
External Encounter ID String The ID assigned to this encounter by the source system.  

Entity: Message - Extends: Data Point

Attribute Type Description HL7 APIGUI: Patient
Type Enum
  • MESSAGE
  • PRE_ADMIT
  • PENDING_ADMIT
  • ADMIT
  • TRANSFER
  • DISCHARGE
  • UPDATE
  • DOCUMENT
 
ClassEnum
  • IN_PATIENT
  • OUT_PATIENT
  • AMBULATORY
  • EMERGENCY
  • HOME
  • FIELD
  • DAYTIME
  • VIRTUAL
  • OTHER
Timestamp Timestamp The relevant timestamp will vary depending on the type of message. For HL7 ADT messages this will normally be the timestamp of the relevant event.
  • Conversation page
Subject String A brief description of what the message is about.  
  • Inbox page
  • Conversation page
Content String The content of the message.
 
  • Conversation page
Document TypeEnum
  • DISCHARGE_SUMMARY
  • CLINIC_LETTER
  • REFERRAL_LETTER
  • APPOINTMENT_LETTER
  • ADMISSION_TCI_LETTER
  • MULTI_DISCIPLINARY_TEAM_MEETING_NOTES

SenderRef :
[[User.Public ID]]
The PKB user who sent the message.  
Private    BooleanWhether or not the message is available to non-participants.

Note: This is a legacy feature. Messages can no longer be marked as private.
  
StatusEnum
  • DRAFT
  • SENT
  • UNREAD
  • READ


Entity: Location

AttributeTypeDescriptionHL7 APIGUI: Patient
NameStringThe name.

DescriptionStringA brief description.
  • Conversation page
AddressStringThe address.  

Entity: Recipient

Attribute TypeDescriptionHL7 APIGUI: Patient
User Public IDRef :
[[User.Public ID]]
A PKB user who received the message. 
  • Conversation page

Entity: External Participant

Attribute Type Description HL7 APIGUI: Patient
Role Enum For example, consultant.  
  • Conversation page
Name String The name of the participant.
  • Conversation page

Lab Report

Diagram


Display

Test results appear in the Health > Laboratory page of the patient's record.

Entity: Lab Report

Attribute Type Description HL7 APIGUI: Patient
External ID String An ID provided by the sender. This ID allows a sender to modify the data point.
Enterer LocationStringA description of the location of the person who entered the request.
Received TimestampTimestampWhen the lab received the specimen.
DisciplineStringThe diagnostic service. 

Entity: Lab Result - Extends: Data Point

Attribute Type Description HL7 APIGUI: Patient
ServiceStringThe overarching service of the lab results.
TestCodingThe test that was performed
  • Lab results listings page
  • Lab result details page
UnitsCodingThe units of the result value
  • Lab results listings page
  • Lab result details page
Timestamp Timestamp The clinically relevant timestamp of the lab result.
  • Lab result details page
Value Number The result value.
  • Lab results details page
Value Text String The textual result value.
  • Lab results details page
Comments String Any comments associated with the lab result.
Range Low Number The lowest expected value for this lab result.
Range Low InclusiveBooleanWhether or not the Range Low value is inclusive.
Range High Number The highest expected value for this lab result.
Range High InclusiveBooleanWhether or not the Range High value is inclusive.
Textual Range String A textual range is used to indicate the expected outcome for a non-numeric test result.
  • Lab results details page
ComparatorEnum
  • GREATER_OR_EQUAL
  • LESS_OR_EQUAL
  • GREATER
  • LESS
  • Lab results details page

Measurement

Diagram

Display

Measurements appear in the Health > Measurements page of the patient's record.

Entity: Measurement - Extends: Data Point

Attribute Type Description HL7 APIGUI: Patient
NameStringThe name of the type of measurement. 

Code SystemStringThe code system used.
Code of WholeStringThe code representing the overall measurement.  
CodeStringThe code of the first value, if this is a multi-valued measurement.  
Code2StringThe code of the second value, if this is a multi-valued measurement.  
UnitStringThe units of the value. 
Unit2StringThe units of the second value.  
Timestamp Timestamp The timestamp when the measurement was taken.
Value Number The value of the measurement.
Value2 Number The second value, if relevant. This is intended to allow two related measurements to be grouped together, e.g.diastolic and systolic blood pressure. This is not a second reading of the first value.
Value Non-Numeric String The value of the measurement if it is not numeric.  

Medication

Diagram


Display

Medications appear in the Treatments > Medicines page of the patient's record.

Entity: Medication - Extends: Data Point

Attribute Type Description HL7 APIGUI: Patient
Substance CodeableConcept The medication.
Start TimestampTimestamp When the medication was started.
End TimestampTimestamp When the medication was finished.
Frequency String How frequently the medication should be taken.
Dose Value Number How much should be taken.
Dose Units CodeableConcept The units of the Dose Value.
Instructions String How to take the medication.

Radiology Report

Diagram


Display

Radiology reports appear in the Health > Imaging page of the patient's record.

Entity: Radiology Report - Extends: Data Point

Attribute Type Description HL7 APIGUI: Patient
Timestamp Timestamp The clinically relevant timestamp of the report.
Title String A title for the report.
Description String The report contents.
Enterer LocationStringA description of the location of the person who entered the request. 

Symptom

Diagram

Display

Symptom reports appear in the Health > Symptoms page of the patient's record.

Entity: Symptom Report - Extends: Data Point

AttributeTypeDescriptionHL7 APIGUI: Patient
SymptomCodeableConcept The symptom which is being reported.  
TimestampTimestampTimestamp for the symptom report.


SeverityEnum
  • NONE
  • MILD
  • MODERATE
  • SEVERE
  

Comments