Skip to content

Commit ebc6c31

Browse files
authored
Merge pull request #1871 from opensafely/evansd-patch-1
Add further details on patient identifiers
2 parents da05235 + 99ba0fe commit ebc6c31

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/security-levels.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ This includes external datasets imported into the database, for instance hospita
4141

4242
Only data for patients who are present in the GP data held by EMIS or TPP are imported from external datasets (a matching processing is carried using the pseudonymised NHS number). The external data is stored only in pseudonymised form.
4343

44+
The system guarantees that patient identifiers cannot be queried or searched. In ehrQL (the OpenSAFELY query language, and the only mechanism through which users access patient-level data) the patient_id variable is handled implicitly and never exposed to the query language. This prevents any lookup or filtering by individual patient. Identifiers are used only to link multiple extracts of data within a single secure project workspace, supporting consistent analysis without any risk of re-identification.
45+
46+
EMIS and TPP securely hash NHS numbers for linkage purposes using a secret key shared with external dataset providers. Level 2 contains neither NHS numbers nor those hashes. Instead, each backend supplies a system-specific patient identifier that is unique to the OpenSAFELY environment and cannot be traced back to an NHS number. These identifiers are implemented differently across backends (for example, integers in TPP and hexadecimal strings in EMIS), are meaningless outside the platform, and cannot be used to identify individuals or to perform direct lookups.
47+
4448
The schema for the TPP database can be seen in [this notebook](https://reports.opensafely.org/reports/opensafely-tpp-database-schema/).
4549

4650
### Where is this data held?

0 commit comments

Comments
 (0)