10 September 202613 min readDocument processing

Medical and pharma document processing under GDPR: Art. 9 grounds, pseudonymize first, keep the model local

TL;DR

  • A prescription, a claim with a diagnosis or a discharge summary is health data under Art. 4(15) and special-category data under Art. 9. You need an Art. 9(2) ground on top of an Art. 6 basis, and a DPIA is mandatory at scale.
  • Sending a page with a name and a diagnosis to a US-owned inference API is a Chapter V transfer of special-category data, with the CLOUD Act behind it. The clean answer is that identifiable health data never leaves the controlled environment.
  • Pseudonymize before extraction: an identity pass replaces name, date of birth and identifiers with a token, the document model never sees the key store, and re-identification happens only at delivery inside the secrecy-bound zone.
  • Medical pages sit in the hard-page profile (8,000 input + 800 output tokens). On it, a €600/month reserved EU GPU crosses Claude Sonnet 5 at about 18,000 pages a month and GPT-4.1 at about 29,000.
  • Measure three numbers in the pilot: identity leakage into the extraction stage (target zero), field-level accuracy on hard pages after validation, and the human-touch rate you can staff with secrecy-bound reviewers.

Questions people ask

Can AI process medical documents under GDPR?
Yes, with an Art. 9(2) ground on top of the Art. 6 basis, a DPIA written before the first page, and a pipeline that keeps identifiable health data inside a controlled environment. Health care providers usually rely on Art. 9(2)(h) with the Art. 9(3) professional-secrecy condition; pharmacovigilance pairs Art. 6(1)(c) with Art. 9(2)(i); research uses Art. 9(2)(j) with Art. 89 safeguards. Member-state hosting rules such as France’s HDS certification stack on top.
Is pseudonymized medical data still personal data under GDPR?
Yes. Under Art. 4(5), pseudonymization means the data can no longer be attributed to a person without additional information that is kept separately and protected. It is a safeguard under Art. 32 and Art. 89, not an exit from the regulation. In a document pipeline that means the token-to-identity key lives in a separate, access-controlled store, the extraction model never receives it, and the token is swapped back only at delivery inside the controlled zone.
Can I send prescriptions or claims to OpenAI or Anthropic APIs under GDPR?
It is a Chapter V transfer of special-category data, and the room is narrow: the DPIA is mandatory, Art. 9(3) requires secrecy-bound handling that a foreign provider’s abuse-monitoring team is not, and the CLOUD Act means a US-owned provider’s EU region is a position to defend rather than a settlement. Even a tokenized page may remain identifiable if a rare diagnosis, a date and a town survive. The safer hybrid is a larger local model on the exceptions.
How do you validate AI extraction from handwritten prescriptions?
Parse strength, dose and frequency into a value–unit–interval triple and hard-fail impossible combinations — “mg” where the product only exists in “mcg,” “ml” for a tablet, a daily total outside the labeled range. Match every drug name against the WHO ATC classification and the national product register, where product codes with check digits catch a mis-read digit. Set the confidence threshold per field, not per page, so a reviewer sees only the uncertain frequency, not the whole prescription.
Does a local GPU beat cloud APIs on cost for medical document processing?
Earlier than for invoices, because medical pages sit in the hard-page profile of about 8,000 input and 800 output tokens. At list prices at the time of writing, a €600/month reserved EU GPU crosses Claude Sonnet 5 at roughly 18,000 pages a month and GPT-4.1 at roughly 29,000. Against GPT-4.1 Mini it may never cross on price — but Mini on handwriting drives a 1.3–2.0× retry multiplier, and the transfer question usually decides first.
Do member states add rules on top of GDPR for health data?
Yes, under Art. 9(4). France requires health data to be hosted by a provider with HDS certification, with an expectation of EEA hosting. Germany layers professional-secrecy law (§ 203 StGB) over GDPR and, since 2024, requires cloud processing of health data by care providers and insurers to take place in Germany, the EEA or an adequate country with a recognized security attestation. Hosting location and the host’s certification are regulated, not just the contract.

Want this worked out on your documents?

We will price a real sample against OpenAI or Anthropic and tell you whether Bulk document processing or a local model on your hardware is the cheaper first step.