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.
Coding A compound value. Consists of:
  • Code
  • Code System
  • Display Text
CodeableConcept A compound value. Consists of:
  • Display Text
  • 0 or more Coding attributes

Relationships

Common Entities

Attachment

Entity: Attachment

Attribute Type Description HL7 API GUI: 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 API GUI: 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 ID String The ID assigned to this data point by the source system.
Privacy Label Enum
  • GENERAL_HEALTH
  • MENTAL_HEALTH
  • SEXUAL_HEALTH
  • SOCIAL_CARE
  Various, depending on associated data type
Specialty String The 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 API GUI: 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 API GUI: Patient
Public ID String An ID for this Organisation.     
Name String The name of this Organisation.    

Entity: Team

Attribute Type Description HL7 API GUI: Patient
Public ID String An ID for this Team.    
Name String The name of this Team.    

Entity: Person

Attribute Type Description HL7 API GUI: Patient
Public ID String An ID for this Person.


Entity: User

Attribute Type Description HL7 API GUI: Patient
Public ID String An ID for this User.


Title String Title. For Patient
Given Name String The first name of the User. For Patient
Family Name String The 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

Attribute Type Description HL7 API GUI: 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.
Postal Code String The postal code.
Date of Birth Local Date Date of birth.
Phone String The phone number of the professional.  
Job Title String What the professional does.    
Email String The email address of the professional.    

Entity: Role

Attribute Type Description HL7 API GUI: Patient
Public ID String An ID for this Role.


Entity: Country

No attributes.

Entity: Consent Record

Attribute Type Description HL7 API GUI: Patient
Public ID String An ID for this Consent Record.
   
General Health Granted Boolean Whether or not the patient has granted access to the general health portion of their medical record.
 
Mental Health Granted Boolean Whether or not the patient has granted access to the mental health portion of their medical record.    
Sexual Health Granted Boolean Whether or not the patient has granted access to the sexual health portion of their medical record.
 
Social Care Granted Boolean Whether or not the patient has granted access to the social care portion of their medical record.    
Reason Code Enum
  • MIGRATED
  • CREATED_ACCOUNT
  • REFERRAL
  • POWER_OF_ATTORNEY
  • COURT_ORDER
  • EXPLICIT_CONSENT
  • DISCHARGE
  • SAFEGUARDING
  • PATIENT_OPT_OUT
   
Reason Text String A description justifying why these consent values where set.

Discharged Boolean  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.

Please see the manual for more information.

Entity: Patient - Extends: User

Patient

Attribute Type Description HL7 API GUI: 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 The status of the patient.  
Registered Boolean Whether or not the patient has registered with PKB. If a patient is registered, they have the ability to log into their account.


Deregistered Boolean Whether or not a patient has explicitly opted out of receiving invitations to register.    
Sharing Disabled Boolean Whether or not the patient has requested Sharing Disabled.    
Access Frozen Boolean Whether or not access to this medical record has been frozen.    
Entered Timestamp Timestamp Flexibly used, depending on the type of data. It is broadly intended to capture the timestamp when the information was entered into the originating system.  
Persisted Timestamp Timestamp The timestamp when the information was persisted in PKB.    

Entity: Contact

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

Value String The value of the contact information.
Is Primary Boolean Indicates 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 API GUI: Patient
Value String The value of the ID.
  • Profile page

Entity: National ID Type

Attribute Type Description HL7 API GUI: 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 System String Used by the FHIR API to indicate that an identifier belongs to this National ID Type.    

Entity: Local ID

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

Entity: Local ID Type

Attribute Type Description HL7 API GUI: Patient
Public ID String The ID of the Local ID Type.    
Name String The name of this specific ID type, to help distinguish between several. For example, Hospital XYZ ID.  
  • Profile page
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.  

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.

Please see the manual for more information.

Entity: Allergy - Extends: Data Point


Attribute Type Description HL7 API GUI: 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.

Please see the manual for more information.

Entity: Appointment - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Type Coding The 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.

Status Enum 
  • ACTIVE
  • CANCELLED
  • DNA

Entity: Appointment Participant

Attribute Type Description HL7 API GUI: Patient
User Public ID Ref :
[[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.
Status Enum
  • ACCEPTED
The status is always Accepted. The status is always Accepted.

Entity: External Appointment Participant

Attribute Type Description HL7 API GUI: Patient
Name String
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.

Please see the manual for more information.

Entity: Care Plan - Extends: Data Point

Attribute Type Description HL7 API GUI: 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.

 

Consultation

Diagram

Consultation

Display

Team Coordinators can manage Consultations from the "Consultations" tab.

Patients can complete a Consultation from the Events & messages page.

Please see the manual for more information.

Entity: Consultation

Attribute Type Description HL7 API GUI: Patient
Public ID String An ID for this Consultation.     
Name String A textual name for this Consultation.    
Creation Timestamp Timestamp When the Consultation was created.    
Privacy Label Enum
  • GENERAL_HEALTH
  • MENTAL_HEALTH
  • SEXUAL_HEALTH
  • SOCIAL_CARE
   

Entity: Consultation Item

Attribute Type Description HL7 API GUI: Patient
ID String An ID for this Consultation Item, unique only within this Consultation.    
Text String The text to display.    
Type Enum
  • TITLE
  • TEXT
  • RADIO
  • CHECKBOX


Entity: Consultation Item Option

Attribute  Type Description HL7 API GUI: Patient
Text String The value of the option.  

Entity: Consultation Request

Attribute Type Description HL7 API GUI: Patient
Request Timestamp Timestamp When the Consultation Request was created.    

Entity: Consultation Response

Attribute Type Description HL7 API GUI: Patient
Status Enum
  • DRAFT
  • SENT
   
Request Timestamp Timestamp When the Consultation Response was requested.    
Completion Timestamp Timestamp When the Consultation Response was completed.    

Entity: Consultation Response Item

Attribute Type Description HL7 API GUI: Patient
Text String The value of the response.

Conversation

Diagram

Conversation

Display

Conversations appear in the Events & messages page of a patient's record.

Please see the manual for more information.

Entity: Conversation

Attribute Type Description HL7 API GUI: Patient
Conversation ID String A unique ID identifying this conversation. This ID will not change even if the conversation is modified.    

Entity: Message - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Timestamp Timestamp When the message was sent.
  • 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
Sender Ref :
[[User.Public ID]]
The PKB user who sent the message.    
Private     Boolean Whether or not the message is available to non-participants.

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


Entity: Recipient

Attribute  Type Description HL7 API GUI: Patient
User Public ID Ref :
[[User.Public ID]]
A PKB user who received the message.  
  • Conversation page

Diagnosis

Diagram

Display

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

Please see the manual for more information.

Entity: Diagnosis - Extends: Data Point

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

Document

Diagram

Display

Documents appear in the Events & messages page of a patient's record.

Please see the manual for more information.

Entity: Document - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Class Enum
  • IN_PATIENT
  • OUT_PATIENT
  • AMBULATORY
  • EMERGENCY
  • HOME
  • FIELD
  • DAYTIME
  • VIRTUAL
  • OTHER
Timestamp Timestamp The document timestamp.
  • Conversation page
Document Type Enum
  • DISCHARGE_SUMMARY
  • CLINIC_LETTER
  • REFERRAL_LETTER
  • APPOINTMENT_LETTER
  • ADMISSION_TCI_LETTER
  • MULTI_DISCIPLINARY_TEAM_MEETING_NOTES

Status Enum
  • READ
  • UNREAD


Encounter

Diagram

Display

Encounters appear in the Events & messages page of a patient's record.

Please see the manual for more information.

Entity: Encounter

Attribute Type Description HL7 API GUI: Patient
Encounter ID String A 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: Encounter Event - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Type Enum
  • PRE_ADMIT
  • PENDING_ADMIT
  • ADMIT
  • TRANSFER
  • DISCHARGE
  • UPDATE
 
Class Enum
  • 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

Entity: Location

Attribute Type Description HL7 API GUI: Patient
Name String The name.

Description String A brief description.
  • Conversation page
Address String The address.    

Entity: External Participant

Attribute Type Description HL7 API GUI: Patient
Role Enum
  • ATTENDER
  • REFERRER
  • 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.

Please see the manual for more information.

Entity: Lab Report

Attribute Type Description HL7 API GUI: Patient
External ID String An ID provided by the sender. This ID allows a sender to modify the data point.
Enterer Location String A description of the location of the person who entered the request.
Received Timestamp Timestamp When the lab received the specimen.
Discipline String The diagnostic service.  

Entity: Lab Result - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Service String The overarching service of the lab results.
Test Coding The test that was performed
  • Lab results listings page
  • Lab result details page
Units Coding The 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 Inclusive Boolean Whether or not the Range Low value is inclusive.
Range High Number The highest expected value for this lab result.
Range High Inclusive Boolean Whether 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
Comparator Enum
  • 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.

Please see the manual for more information.

Entity: Measurement - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Name String The name of the type of measurement. 

Code System String The code system used.
Code of Whole String The code representing the overall measurement.    
Code String The code of the first value, if this is a multi-valued measurement.    
Code2 String The code of the second value, if this is a multi-valued measurement.    
Unit String The units of the value.  
Unit2 String The 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.

Please see the manual for more information.

Entity: Medication - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Status Enum
  • ACTIVE
  • INACTIVE
   
Substance CodeableConcept The medication.
Start Timestamp Timestamp When the medication was started.
End Timestamp Timestamp When the medication was finished.
Frequency Text String How frequently the medication should be taken.
Frequency Value Number A representation of how frequently the medication should be taken, when combined with Frequency Units.    
Frequency Units Enum
  • HOUR
   
Frequency Priority Enum Can be used to capture a frequency instruction of:
  • AS_DIRECTED
  • AS_NEEDED
   
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.

Please see the manual for more information.

Entity: Radiology Report - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Timestamp Timestamp The clinically relevant timestamp of the report.
Title String A title for the report.
Description String The report contents.
Enterer Location String A 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.

Please see the manual for more information.

Entity: Symptom Report - Extends: Data Point

Attribute Type Description HL7 API GUI: Patient
Symptom CodeableConcept  The symptom which is being reported.    
Timestamp Timestamp Timestamp for the symptom report.


Severity Enum
  • NONE
  • MILD
  • MODERATE
  • SEVERE
   

Comments