How should I work with registration history?
OpenSafely presents a deduplicated current-registration view in the patient
model. This supports consistent cohort construction and avoids duplicate rows
for people who move between practices.
What to expect
Section titled “What to expect”- A patient appears once in
patientfor their current registration. - When a patient transfers practice, the patient row is updated to the new organisation context.
- Historical events remain available and linked through the deduplicated patient representation.
For full transfer behaviour, see Practice Transfers and Patient De-duplication.
Study design guidance
Section titled “Study design guidance”- For current population analyses, use the
patientmodel as the authoritative registration view. - For longitudinal analyses, use stable patient identifiers (
nhs_number) and time-filtered event models. - The
patientmodel does not provide a full historical registration timeline; historical registrations are not exposed as a separate customer-facing model.
Practical SQL pattern
Section titled “Practical SQL pattern”SELECT p.patient_id, p.organisation_id, p.registration_start_datetime, p.registration_end_datetime, p.is_active, p.has_diedFROM explorer_open_safely.patient AS pWHERE p.is_active = TRUE