Practice Transfers
Overview
Section titled “Overview”When a patient moves from one GP practice to another, their full clinical record (consultations, medications, referrals, etc.) transfers to the new practice. The OpenSafely pipeline handles this automatically — you do not need to do anything special when querying the data.
How It Works
Section titled “How It Works”One Row Per Patient
Section titled “One Row Per Patient”The pipeline maintains one row per patient globally in the patient model,
identified by NHS number. This means:
- A patient who moves from Practice A to Practice B will appear once, not twice.
- All clinical data (consultations, drug records, issue records, etc.) is linked to the patient’s current active registration.
- The pseudonymised
nhs_numberis stable — it does not change when the patient moves practice, so longitudinal research across practice transfers is straightforward.
How the Current Practice Is Determined
Section titled “How the Current Practice Is Determined”When multiple registrations exist for the same NHS number, the pipeline selects the most recent active registration using this priority:
- Most recent
registration_start_datetime - Most recently updated record (
model_updated_datetime) - Deterministic tie-break on
patient_id
Only registrations at qualifying England GP practices with a valid NHS number are considered.
What You Will See
Section titled “What You Will See”| Scenario | Result in the patient model |
|---|---|
| Patient registered at one practice | Single row with that practice’s organisation |
| Patient transfers to a new practice | Single row updated to show the new practice |
| Patient’s old practice record is closed | No change — the new practice is already represented |
Clinical event models (consultation, medication_drug_record,
medication_issue_record, etc.) are filtered to the patient’s current winning
registration, providing a unified longitudinal view of the patient’s record.
Impact on Analysis
Section titled “Impact on Analysis”Longitudinal Studies
Section titled “Longitudinal Studies”Because nhs_number is stable across practice transfers, you can track a
patient’s full clinical history regardless of how many times they have moved.
All historical clinical events are accessible under the same patient_id once
the new practice holds the record.
Organisation-Level Analysis
Section titled “Organisation-Level Analysis”If you are analysing data at the organisation level, be aware that:
- A patient’s clinical history will appear under their current practice, not their historical practice(s).
- Patient counts by organisation reflect the current registration landscape at the point of the monthly data refresh.
- Patients who transferred mid-month will appear under their new practice at the next monthly refresh.
Edge Cases
Section titled “Edge Cases”Timing Between Refreshes
Section titled “Timing Between Refreshes”The pipeline processes data weekly, but consumer-facing views update monthly (last Sunday of the month). If a patient transfers mid-cycle:
- The transfer will be reflected at the next monthly refresh.
- You will never see duplicate records for the same patient — deduplication is enforced before data reaches the consumer-facing models.
Record Merges
Section titled “Record Merges”Occasionally, practices perform manual record merges (e.g. when a patient was accidentally registered twice at the same practice). These merges happen upstream in the clinical system and flow through as a single consolidated record. The pipeline trusts the upstream source and does not perform its own clinical record merging.
Soft-Deleted Patients
Section titled “Soft-Deleted Patients”When a patient’s record is soft-deleted at a practice (e.g. the patient has left and the record is marked inactive):
- If the patient has an active registration elsewhere, that registration becomes the current record.
- If no active registration remains anywhere, the patient is excluded from all models.
Patients Without a Valid NHS Number
Section titled “Patients Without a Valid NHS Number”Patients missing a valid NHS number cannot be deduplicated across practices. These records are excluded to prevent false matches.
Related Documentation
Section titled “Related Documentation”- NHS Number De-duplication — detailed technical explanation of the deduplication logic and eligibility criteria
- Data Freshness & Quality — update cadence and data scope information