Anonymising NHS Patient Electronic Health Record Extracts – UK GDPR-compliant anonymisation per UK GDPR Art. 9

NHS Electronic Health Record (EHR) extracts contain special-category health data under UK GDPR Art. 9: patient names, NHS numbers, diagnoses, prescriptions, and care pathways. anonym.legal pseudonymises these identifiers across structured and free-text fields, preserving clinical codes, dates, and care pathways for audit, research, or quality-improvement purposes without exposing individual patient identities.

When this applies

This task applies when EHR extracts are shared with clinical auditors, NHS Informatics teams, or research partners who require the clinical substance of the records — diagnosis codes, episode dates, referral pathways — but have no lawful basis to process identifiable patient data.

  1. Upload the EHR extract (CSV, XML, or HL7 FHIR JSON) to anonym.legal; the engine preserves record structure and clinical coding.
  2. The engine detects patient-identifiable fields across 285+ entity categories: NHS numbers, full names, dates of birth, postcodes, GP surgery codes linked to named practitioners, and free-text clinical narratives.
  3. Each patient is assigned a consistent pseudonym and synthetic NHS number applied uniformly across all records in the extract.
  4. Clinical codes (SNOMED CT, ICD-10, OPCS-4), episode dates, and care-pathway sequences are preserved in clear text.
  5. Named clinicians referenced in the extract receive separate pseudonyms, maintaining the clinician–patient relationship without exposing practitioner identities.
  6. A reversible mapping table is generated with UK data residency, enabling re-identification by authorised Data Controllers only.
  7. The pseudonymised extract is released for the approved purpose; the mapping table is retained under the Data Controller's access-control policy.

What you provide

  • EHR extract file (CSV, XML, HL7 FHIR JSON, or XLSX)
  • Data dictionary or field specification for the extract
  • List of free-text clinical narrative fields requiring entity detection

Limitations & cautions

  • anonym.legal pseudonymises personal data but does not constitute the data-anonymisation required for research exemptions under DPA 2018 — a formal anonymisation risk assessment may still be required.
  • Rare disease presentations with very small patient populations may remain re-identifiable even after pseudonymisation; obtain a statistical disclosure-control review for small cohorts.
  • HL7 FHIR resources with deeply nested patient references require field-mapping configuration before processing.

FAQ

Does pseudonymisation satisfy the NHS Records Management Code of Practice 2021 requirements for sharing records?

The Code of Practice sets out retention and access standards; pseudonymisation supports the data-minimisation principle when sharing for secondary purposes. However, whether a specific sharing activity is lawful requires a Data Protection Impact Assessment and legal review against the relevant condition in DPA 2018 Schedule 1.

Are NHS numbers replaced with synthetic numbers or removed entirely?

By default, each NHS number is replaced with a consistent synthetic pseudonym that preserves the number format, allowing records for the same patient to be linked across the pseudonymised dataset without revealing the real NHS number.

Can the engine handle multi-episode extracts spanning several years?

Yes. The engine tracks patient entities across all episodes in the batch and applies consistent pseudonyms throughout, preserving longitudinal care-pathway information.

What happens to postcode data, which can be re-identifying?

Full postcodes are pseudonymised by default. If your analysis requires geographical granularity, you can configure the engine to preserve the sector portion of the postcode (the first four characters) while removing the unit, reducing re-identification risk.

Healthcare Records

About this page

We update this page when our platform or the law changes.

Read our founder note for how we work.

Each change shows up in the timestamp at the top.

We follow these rules

  • GDPR (EU 2016/679).
  • ISO/IEC 27001:2022.
  • NIS2 (EU 2022/2555).
  • HIPAA safe harbor under 45 CFR § 164.514(b)(2).

Our promise

We do not sell your data.

We do not train models on your text.

We store your files in Germany.

You can delete your account at any time.

You own your work.

Where we run

Our servers live in Falkenstein, Germany.

We use Hetzner. They hold ISO 27001 certification.

All data stays in the EU.

Backups run every day.

Need help?

Email support@anonym.legal.

We reply within one business day.

How we test

We run a full check suite on every release.

Each surface gets its own sweep script and report.

Human reviewers spot-check the output each week.

We track recall and precision on a labelled set.

Bad runs block the deploy.

What we never do

  • We never sell your information to third parties.
  • We never train models on what you upload.
  • We never keep your work after you delete it.
  • We never share keys with any outside firm.
  • We never run ads inside the product.

Plans in plain words

We sell credits, not seats.

One credit covers one short job.

Long jobs use a few credits each.

You can top up at any time.

Unused credits roll over each month.

Read the plans page for current rates.

Who built this

A small team of engineers and lawyers built this.

We ship from Europe and work in the open.

Our founder note spells out why we started.

Where to start

How the parts fit

A browser add-on cleans text inside Chrome.

A Word plug-in handles drafts in Office.

A small desktop tool works on whole folders.

An agent protocol link feeds large models safely.

All four share one core engine and one rule set.

Words from our team

We started this work after a lunch about cookies.

One friend kept getting odd ads on her phone.

We asked why a court file leaked through a draft.

We sketched the first build on a napkin that week.

By month three we had a tiny demo for a friend.

She used it on her first case the next day.

Common questions we hear

Can the tool read scanned PDFs? Yes, with OCR.

Does it work on long files? Yes, in small chunks.

Can I roll my own rule set? Yes, save it as a preset.

Does it run offline? The desktop build runs offline.

Do you keep my files? No, the cloud build wipes after each run.

Will it learn from my work? No, we never train on inputs.

A short tour of the workflow

Upload a file or paste a snippet of prose.

Pick the entities you want gone from the draft.

Choose a method: replace, mask, hash, encrypt, or redact.

Press run and watch the side panel show each hit.

Skim the result and tweak any rule that misfired.

Save the cleaned file or send it to a teammate.