Skip to content
Nav Menu
Partner Developer Portal
Partner Developer Portal
Search
Ctrl
K
Cancel
Home
Documentation
Partner Developer Documentation
Expand navigation
Collapse navigation
Navigation
Collapse navigation
Close navigation
Getting Started
Onboarding
New Partner Onboarding
Existing Partner & Further Functionality
Integration Compliance & Assurance Standards
Authentication
Partner API
Partner API Overview
Partner API Swagger
Partner API Migration
Using the Partner API
Vaccination Event Guidance
Enlivio FHIR Platform
FHIR Overview
FHIR R4 API
Overview
ERD
Shared Guidance
Authentication
Organisation Identifiers
Paging
Field Filtering
HTTP Status Codes
Base
Patient
Definition
ERD
Schema
Organization
Definition
ERD
Schema
Location
Definition
ERD
Schema
Practitioner
Definition
ERD
Schema
Clinical
Observation
Definition
ERD
Schema
Immunization
Definition
ERD
Schema
MedicationStatement
Definition
ERD
Schema
Condition
Definition
ERD
Schema
EMIS-X App Launch
App Launch Overview
EMIS-X Analytics
Explorer
Trino Query Optimisation
Community Pharmacy
models
warehouse
Attendance Absences
Definition
ERD
Schema
Attendance Register
Definition
ERD
Schema
CPS
Definition
ERD
Schema
Dispensing
Definition
ERD
Schema
DMR
Definition
ERD
Schema
Epharmacy Registration
Definition
ERD
Schema
Fridge Log
Definition
ERD
Schema
MDS
Definition
ERD
Schema
MDS EMAR
Definition
ERD
Schema
NMS
Definition
ERD
Schema
Ordering
Definition
ERD
Schema
Patient
Definition
ERD
Schema
Prescribing
Definition
ERD
Schema
Prescribing Scotland
Definition
ERD
Schema
RDS
Definition
ERD
Schema
Stock
Definition
ERD
Schema
Community Pharmacy Mart Relationships
Incremental Primary Care Views (iPCVs)
About iPCV
Overview
Glossary
iPCV Flavours
Using iPCV
Overview
Data Freshness & Availability
Understanding Deltas
Privacy & Filtering Controls
Dates & Time Fields
How to check iPCV schemas?
Common Query Patterns
Data Model Documentation
Overview
Organisations and Users
Overview
Organisation
Definition
ERD
Schema
Location
Definition
ERD
Schema
Organisation Location
Definition
ERD
Schema
Sharing Agreement
Definition
ERD
Schema
User in Role
Definition
ERD
Schema
Changes in iPCV V2
Patient
Overview
Patient
Definition
ERD
Schema
Patient Filter Options
Definition
ERD
Schema
Patient Registration History
Definition
ERD
Schema
Changes in iPCV V2
Appointments
Overview
Appointment Session
Definition
ERD
Schema
Appointment Session User
Definition
ERD
Schema
Appointment Slot
Definition
ERD
Schema
Changes in iPCV V2
Consultations
Overview
Consultation
Definition
ERD
Schema
Consultation Section
Definition
ERD
Schema
Changes in iPCV V2
Care Records
Overview
Observation
Definition
ERD
Schema
Allergy
Definition
ERD
Schema
Immunisation
Definition
ERD
Schema
Problem
Definition
ERD
Schema
Referral
Definition
ERD
Schema
Diary
Definition
ERD
Schema
Family History
Definition
ERD
Schema
Changes in iPCV V2
Medications
Overview
Drug Record
Definition
ERD
Schema
Issue Record
Definition
ERD
Schema
Problem Medication Bridge
Definition
ERD
Schema
Changes in iPCV V2
Clinical Coding & Reference Data
Overview
Codeable Concept
Definition
ERD
Schema
Clinical Code
Definition
ERD
Schema
Drug Code
Definition
ERD
Schema
MKB Drug Pack
Definition
ERD
Schema
MKB Mapping — Attributes
Definition
ERD
Schema
MKB Mapping — DMD Preparation
Definition
ERD
Schema
MKB Mapping — Ethnicity
Definition
ERD
Schema
Sensitive SNOMED Code
Definition
ERD
Schema
Changes in iPCV v2
Platform & Operations
Overview
Data Freshness (Runs Status)
Definition
ERD
Schema
Changes in iPCV V2
iPCV V1 to V2 Migration Guide
About this guide
What is changing in V2?
Migration Steps
FAQ & Troubleshooting
Changelog
OpenSafely
OpenSafely
Data Freshness & Quality
Practice Transfers
Clinical code
Definition
ERD
Schema
Codeable concept
Definition
ERD
Schema
Consultation
Definition
Entity Relationship Diagram
Schema
Drug Code
Definition
ERD
Schema
MKB Drug Pack
Definition
ERD
Schema
MKB Mapping — Attributes
Definition
ERD
Schema
Observation
Definition
ERD
Schema
Patient
NHS Number De-duplication
Definition
ERD
Schema
Referral
Definition
ERD
Schema
Patient Registration History
Definition
ERD
Schema
Appointment Slot
Definition
ERD
Schema
Consultation Section
Definition
ERD
Schema
Diary
Definition
ERD
Schema
FAQ
OpenSafely FAQ
Why can a medication drug record exist without a matching issue record?
What date and time formats are used across OpenSafely models?
How should I use organisation information in OpenSafely models?
How should I interpret is_national_data_opted_in?
How should I work with registration history?
How do model_run and model_data_quality relate to freshness and trust?
Model Data Quality
Definition
ERD
Schema
Model Run
Definition
ERD
Schema
Medication Drug Record
Definition
ERD
Schema
Medication Issue Record
Definition
ERD
Schema
MKB Mapping — DMD Preparation
Definition
ERD
Schema
MKB Mapping — Ethnicity
Definition
ERD
Schema
Problem
Definition
ERD
Schema
Query Utilisation
Definition
ERD
Schema
Query Optimization for OpenSAFELY
Sensitive SNOMED Code
Definition
ERD
Schema
Sharing Agreements
Definition
ERD
Schema
Recruit-Explorer
Patient Identifiable Data
Patient Identifiable Data
Allergy
Definition
ERD
Schema
Clinical Code
Definition
ERD
Schema
Codeable Concept
Definition
ERD
Schema
Consultation
Definition
ERD
Schema
Diary Entry
Definition
ERD
Schema
Drug Code
Definition
ERD
Schema
Drug Record
Definition
ERD
Schema
Drug Record Problem Link
Definition
ERD
Schema
Immunisation
Definition
ERD
Schema
Issue Record
Definition
ERD
Schema
Issue Record Problem Link
Definition
ERD
Schema
Location
Definition
ERD
Schema
MKB Mapping Attributes
Definition
ERD
Schema
MKB Mapping DMD Preparation
Definition
ERD
Schema
MKB Mapping Ethnicity
Definition
ERD
Schema
MKB Version
Definition
ERD
Schema
Observation
Definition
ERD
Schema
Organisation
Definition
ERD
Schema
Organisation Location
Definition
ERD
Schema
Patient
Definition
ERD
Schema
Problem
Definition
ERD
Schema
Referral
Definition
ERD
Schema
Session
Definition
ERD
Schema
Session User
Definition
ERD
Schema
Sharing Organisation
Definition
ERD
Schema
Slot
Definition
ERD
Schema
User in Role
Definition
ERD
Schema
Anonymised
Anonymised
Allergy
Definition
ERD
Schema
Clinical Code
Definition
ERD
Schema
Codeable Concept
Definition
ERD
Schema
Consultation
Definition
ERD
Schema
Diary Entry
Definition
ERD
Schema
Drug Code
Definition
ERD
Schema
Drug Record
Definition
ERD
Schema
Drug Record Problem Link
Definition
ERD
Schema
Immunisation
Definition
ERD
Schema
Issue Record
Definition
ERD
Schema
Issue Record Problem Link
Definition
ERD
Schema
Location
Definition
ERD
Schema
MKB Mapping Attributes
Definition
ERD
Schema
MKB Mapping DMD Preparation
Definition
ERD
Schema
MKB Mapping Ethnicity
Definition
ERD
Schema
MKB Version
Definition
ERD
Schema
Observation
Definition
ERD
Schema
Organisation
Definition
ERD
Schema
Organisation Location
Definition
ERD
Schema
Patient
Definition
ERD
Schema
Problem
Definition
ERD
Schema
Referral
Definition
ERD
Schema
Session
Definition
ERD
Schema
Session User
Definition
ERD
Schema
Sharing Organisation
Definition
ERD
Schema
Slot
Definition
ERD
Schema
User In Role
Definition
ERD
Schema
IM1 - Bulk Extract
Overview
Change Log
Models
Overview
Location
Definition
ERD
Schema
Organisation
Definition
ERD
Schema
Organisation Location
Definition
ERD
Schema
Patient
Definition
ERD
Schema
Patient History
Definition
ERD
Schema
User In Role
Definition
ERD
Schema
Sharing Organisation
Definition
ERD
Schema
Session
Definition
ERD
Schema
Session User
Definition
ERD
Schema
Slot
Definition
ERD
Schema
Patient Audit
Definition
ERD
Schema
Registration Audit
Definition
ERD
Schema
Consultation
Definition
ERD
Schema
Diary
Definition
ERD
Schema
Observation
Definition
ERD
Schema
Observation Referral
Definition
ERD
Schema
Problem
Definition
ERD
Schema
Clinical Code
Definition
ERD
Schema
Drug Code
Definition
ERD
Schema
Drug Record
Definition
ERD
Schema
Issue Record
Definition
ERD
Schema
Insights
Explorer IQ
Overview
Models
Accesscontrol
Accesscontrol Areaofwork
Definition
ERD
Schema
Accesscontrol Jobcategory
Definition
ERD
Schema
Admin
Admin Globaluserinrole
Definition
ERD
Schema
Admin Patientwarning
Definition
ERD
Schema
Admin Team
Definition
ERD
Schema
Admin Teamuserinrole
Definition
ERD
Schema
Admin Warningtrigger
Definition
ERD
Schema
Appointment
Appointment Assignmentlist
Definition
ERD
Schema
Appointment Assignmentlistpatientschedule
Definition
ERD
Schema
Appointment Assignmentlistpatientscheduleslot
Definition
ERD
Schema
Appointment Bookingmethod
Definition
ERD
Schema
Appointment Deferralreason
Definition
ERD
Schema
Appointment Embargotype
Definition
ERD
Schema
Appointment Linkedslot
Definition
ERD
Schema
Appointment Linkedslottype
Definition
ERD
Schema
Appointment Patientschedule
Definition
ERD
Schema
Appointment Reason
Definition
ERD
Schema
Appointment Schedule
Definition
ERD
Schema
Appointment Session
Definition
ERD
Schema
Appointment Sessioncategory
Definition
ERD
Schema
Appointment Sessionlocation
Definition
ERD
Schema
Appointment Sessionservice
Definition
ERD
Schema
Appointment Sessiontype
Definition
ERD
Schema
Appointment Sessionuser
Definition
ERD
Schema
Appointment Slot
Definition
ERD
Schema
Appointment Slothistory
Definition
ERD
Schema
Appointment Slotstatus
Definition
ERD
Schema
Appointment Slottype
Definition
ERD
Schema
Appointment Status
Definition
ERD
Schema
Appointment Statusprogression
Definition
ERD
Schema
Appointment Statustype
Definition
ERD
Schema
Appointment Statustypestatus
Definition
ERD
Schema
Audit
Audit Accessaudit
Definition
ERD
Schema
Audit Accesstype
Definition
ERD
Schema
Audit Activitycontext
Definition
ERD
Schema
Audit Careraudit
Definition
ERD
Schema
Audit Itemtype
Definition
ERD
Schema
Audit Modetype
Definition
ERD
Schema
Audit Patientaudit
Definition
ERD
Schema
Audit Registrationaudit
Definition
ERD
Schema
Bedmanagement
Bedmanagement Admission
Definition
ERD
Schema
Bedmanagement Admissiontype
Definition
ERD
Schema
Bedmanagement Assignmentstatus
Definition
ERD
Schema
Bedmanagement Bed
Definition
ERD
Schema
Bedmanagement Bedaction
Definition
ERD
Schema
Bedmanagement Bedevent
Definition
ERD
Schema
Bedmanagement Bedfeature
Definition
ERD
Schema
Bedmanagement Bedhasfeature
Definition
ERD
Schema
Bedmanagement Bedpatient
Definition
ERD
Schema
Bedmanagement Bedpatienthistory
Definition
ERD
Schema
Bedmanagement Bedreservation
Definition
ERD
Schema
Bedmanagement Bedreservationstatus
Definition
ERD
Schema
Bedmanagement Bedstatus
Definition
ERD
Schema
Bedmanagement Bedstatushistory
Definition
ERD
Schema
Bedmanagement Bedtype
Definition
ERD
Schema
Bedmanagement Colour
Definition
ERD
Schema
Bedmanagement Sourceofadmission
Definition
ERD
Schema
Bedmanagement Ward
Definition
ERD
Schema
Bedmanagement Wardgraphiclocation
Definition
ERD
Schema
Bedmanagement Warditemtype
Definition
ERD
Schema
Bedmanagement Wardpatientassignment
Definition
ERD
Schema
Bedmanagement Wardpatientassignmenthistory
Definition
ERD
Schema
Bedmanagement Wardstatushistory
Definition
ERD
Schema
Careplan
Careplan Displayedfield
Definition
ERD
Schema
Careplan Displayedfielddisplaysection
Definition
ERD
Schema
Careplan Organisationdisplayedfield
Definition
ERD
Schema
Careplanresource
Careplanresource Resource
Definition
ERD
Schema
Careplanresource Type
Definition
ERD
Schema
Carerecord
Carerecord Careplan
Definition
ERD
Schema
Carerecord Careplanchangestate
Definition
ERD
Schema
Carerecord Careplandetail
Definition
ERD
Schema
Carerecord Careplanstatustype
Definition
ERD
Schema
Carerecord Consultation
Definition
ERD
Schema
Carerecord Consultationaccompanyinguser
Definition
ERD
Schema
Carerecord Consultationepisode
Definition
ERD
Schema
Carerecord Consultationsection
Definition
ERD
Schema
Carerecord Diary
Definition
ERD
Schema
Carerecord Diaryreminder
Definition
ERD
Schema
Carerecord Document
Definition
ERD
Schema
Carerecord Observation
Definition
ERD
Schema
Carerecord Problem
Definition
ERD
Schema
Carerecord Problemdeletionhistory
Definition
ERD
Schema
Carerecord Problemdiary
Definition
ERD
Schema
Carerecord Problemdrugrecord
Definition
ERD
Schema
Carerecord Problemissuerecord
Definition
ERD
Schema
Carerecord Problemobservation
Definition
ERD
Schema
Carerecord Problemreport
Definition
ERD
Schema
Carerecord Range
Definition
ERD
Schema
Carerecord Referral
Definition
ERD
Schema
Carerecord Referralactivity
Definition
ERD
Schema
Carerecord Report
Definition
ERD
Schema
Carerecord Reportconsultation
Definition
ERD
Schema
Carerecord Reporthcp
Definition
ERD
Schema
Carerecord Reportobservation
Definition
ERD
Schema
Carerecord Reportspecimen
Definition
ERD
Schema
Carerecord Servicetype
Definition
ERD
Schema
Carerecord Specimenobservation
Definition
ERD
Schema
Carerecord Testrequest
Definition
ERD
Schema
Carerecord Testrequestobservation
Definition
ERD
Schema
Carerecord Userdatastamp
Definition
ERD
Schema
Childhealth
Childhealth Mothersinformation
Definition
ERD
Schema
Childhealth Patienttreatmentcentre
Definition
ERD
Schema
Childhealth Treatmentcentre
Definition
ERD
Schema
Coding
Coding Subsetmember
Definition
ERD
Schema
Config
Config Serviceward
Definition
ERD
Schema
Consultationmode
Consultationmode Consultationstyle
Definition
ERD
Schema
Dataservices
Dataservices Changelog
Definition
ERD
Schema
Dataservices Changelogsource
Definition
ERD
Schema
Dbo
Dbo Address
Definition
ERD
Schema
Dbo Addresstype
Definition
ERD
Schema
Dbo Alternatecorrespondenceformat
Definition
ERD
Schema
Dbo Birthregdistrict
Definition
ERD
Schema
Dbo Caseloadpatientstatus
Definition
ERD
Schema
Dbo Codelookup
Definition
ERD
Schema
Dbo Contacttype
Definition
ERD
Schema
Dbo Externalusualgpdetails
Definition
ERD
Schema
Dbo Location
Definition
ERD
Schema
Dbo Locationtype
Definition
ERD
Schema
Dbo Nationalcodelookup
Definition
ERD
Schema
Dbo Organisation
Definition
ERD
Schema
Dbo Organisationidentifier
Definition
ERD
Schema
Dbo Organisationlocation
Definition
ERD
Schema
Dbo Organisationspeciality
Definition
ERD
Schema
Dbo Organisationteam
Definition
ERD
Schema
Dbo Organisationtype
Definition
ERD
Schema
Dbo Organisationuser
Definition
ERD
Schema
Dbo Patient
Definition
ERD
Schema
Dbo Patientadditionaladdress
Definition
ERD
Schema
Dbo Patientaddress
Definition
ERD
Schema
Dbo Patientassociate
Definition
ERD
Schema
Dbo Patientassociatenonregisteredidentifier
Definition
ERD
Schema
Dbo Patientassociatepatient
Definition
ERD
Schema
Dbo Patientassociatetype
Definition
ERD
Schema
Dbo Patientcontact
Definition
ERD
Schema
Dbo Patientdeathlocation
Definition
ERD
Schema
Dbo Patientgphistory
Definition
ERD
Schema
Dbo Patienthistory
Definition
ERD
Schema
Dbo Patientidentifier
Definition
ERD
Schema
Dbo Patientidentifiertype
Definition
ERD
Schema
Dbo Patientorganisationrelationship
Definition
ERD
Schema
Dbo Patientorganisationrelationshiptype
Definition
ERD
Schema
Dbo Patientproperties
Definition
ERD
Schema
Dbo Patientstatus
Definition
ERD
Schema
Dbo Patienttype
Definition
ERD
Schema
Dbo Secondaryaddresstype
Definition
ERD
Schema
Dbo Secondarycareorganisation
Definition
ERD
Schema
Dbo Sex
Definition
ERD
Schema
Dbo Speciality
Definition
ERD
Schema
Dbo Teamfolder
Definition
ERD
Schema
Dbo User
Definition
ERD
Schema
Dbo Useridentifier
Definition
ERD
Schema
Dbo Useridentifiertype
Definition
ERD
Schema
Dbo Userinrole
Definition
ERD
Schema
Dbo Userinroleidentifier
Definition
ERD
Schema
Episodemanagement
Episodemanagement Carecontact
Definition
ERD
Schema
Episodemanagement Carepathway
Definition
ERD
Schema
Episodemanagement Diagnosis
Definition
ERD
Schema
Episodemanagement Episodestatus
Definition
ERD
Schema
Episodemanagement Episodetitle
Definition
ERD
Schema
Episodemanagement Groupsession
Definition
ERD
Schema
Episodemanagement Groupsessioncareprofessional
Definition
ERD
Schema
Episodemanagement Onwardreferral
Definition
ERD
Schema
Episodemanagement Organisationcarepathway
Definition
ERD
Schema
Episodemanagement Organisationcarepathwayepisodetitle
Definition
ERD
Schema
Episodemanagement Organisationservicetype
Definition
ERD
Schema
Episodemanagement Organisationsettings
Definition
ERD
Schema
Episodemanagement Patientpathway
Definition
ERD
Schema
Episodemanagement Referralepisode
Definition
ERD
Schema
Episodemanagement Referralreason
Definition
ERD
Schema
Episodemanagement Rttclock
Definition
ERD
Schema
Episodemanagement Rttperiod
Definition
ERD
Schema
Episodemanagement Rttstatuscodeoffer
Definition
ERD
Schema
Episodemanagement Rttstatuscodes
Definition
ERD
Schema
Mapping
Mapping Snomedinteropoutgoing
Definition
ERD
Schema
Ndop
Ndop Optinpatients
Definition
ERD
Schema
Patientadmin
Patientadmin Activityconfiguration
Definition
ERD
Schema
Patientadmin Activityconfigurationhistory
Definition
ERD
Schema
Patientadmin Dischargeorrejectionreason
Definition
ERD
Schema
Patientadmin Episode
Definition
ERD
Schema
Patientadmin Folder
Definition
ERD
Schema
Patientadmin Listentry
Definition
ERD
Schema
Patientadmin Patientadminstatus
Definition
ERD
Schema
Patientadminconfig
Patientadminconfig States
Definition
ERD
Schema
Pds
Pds Patientflags
Definition
ERD
Schema
Pds Patientmergearchive
Definition
ERD
Schema
Prescribing
Prescribing Authorisedissueshistory
Definition
ERD
Schema
Prescribing Drugrecord
Definition
ERD
Schema
Prescribing Drugrecordcancellation
Definition
ERD
Schema
Prescribing Issuemethod
Definition
ERD
Schema
Prescribing Issuerecord
Definition
ERD
Schema
Prescribing Localmixture
Definition
ERD
Schema
Prescribing Localmixtureconstituent
Definition
ERD
Schema
Prescribing Prescribingstatus
Definition
ERD
Schema
Prescribing Prescriptiontype
Definition
ERD
Schema
Prescribing Servicecostcentre
Definition
ERD
Schema
Professionalcontact
Professionalcontact Clinicaldiscipline
Definition
ERD
Schema
Professionalcontact Contact
Definition
ERD
Schema
Professionalcontact Patientprofessionalcontact
Definition
ERD
Schema
Professionalcontact Professionalcontacttype
Definition
ERD
Schema
Referralmanagement
Referralmanagement Referralmanagementstatus
Definition
ERD
Schema
Referralmanagement Taskstatus
Definition
ERD
Schema
Referralmanagement Urgency
Definition
ERD
Schema
Referralmanagement Workflowtask
Definition
ERD
Schema
Unscheduledcare
Unscheduledcare Attendance
Definition
ERD
Schema
Unscheduledcare Attendanceaction
Definition
ERD
Schema
Unscheduledcare Attendancedetail
Definition
ERD
Schema
Unscheduledcare Conveyingambulancetrust
Definition
ERD
Schema
Unscheduledcare Dataentryprocedure
Definition
ERD
Schema
Unscheduledcare Departmenttype
Definition
ERD
Schema
Unscheduledcare Dischargedestination
Definition
ERD
Schema
Unscheduledcare Safeguardingconcern
Definition
ERD
Schema
Variation
Variation Scottishethnicity
Definition
ERD
Schema
EMIS Web Improvements
Deferred Visits Enhancements
Self Help Internal Tables
Overview
Agreement Organisation Status
Definition
ERD
Schema
Alembic Version
Definition
ERD
Schema
Application Logs
Definition
ERD
Schema
Backfill State
Definition
ERD
Schema
Enhanced Sharing Agreement
Definition
ERD
Schema
Extract Run
Definition
ERD
Schema
Extract Run Batches
Definition
ERD
Schema
Extract Run Tables
Definition
ERD
Schema
Extract Table State
Definition
ERD
Schema
Insights Client Project Config
Definition
ERD
Schema
Insights Client Table Config
Definition
ERD
Schema
Status
Definition
ERD
Schema
Table Inclusion
Definition
ERD
Schema
User Metrics
Definition
ERD
Schema
Recruit
Third-Party Integration
Online Test Requests
Online Test Request
GitHub
Privacy Policy
Terms of Use
v1.21.0
ERD
erDiagram Patient { id id PK }