Article 9 health data as engineering tasks: legal basis, DPA, EU residency, security, access and erasure, DPIA — mapped to what Anpheros covers. HIPAA: BAA on request. Not legal advice.
Under the GDPR, health data is a special category of personal data (Article 9): processing it is prohibited unless one of a short list of conditions applies, such as the person's explicit consent or the provision of health care, and it needs stronger safeguards than ordinary personal data. For software teams this turns into concrete design decisions: a documented legal basis, a processor agreement with every vendor that touches the data, EU data residency or a lawful transfer, access control and logging, and ways to give people their data and erase it. This page maps those requirements to engineering work and shows which parts a health data platform such as Anpheros already covers. It is technical guidance, not legal advice.
GDPR for health data — the developer checklist, and what Anpheros covers
Legal basis under Article 9Explicit consent or a healthcare basis; yours to decide and document
Processor agreement (Art. 28)Signed DPA before production data
Data in the EUGoogle Cloud europe-west4 (Netherlands)
Access control and logs (Art. 32)Per-project isolation, consent, an access log the patient sees
Rights of access and erasureExport the whole record as FHIR ($everything); delete through the API (soft delete, history kept)
Impact assessment (Art. 35)Your DPIA; the platform documents its own measures
The requirements, as engineering tasks
GDPR requirement
What it means in code and operations
In Anpheros
Article 9 legal basis
Decide and record why you process health data (explicit consent, healthcare, public health, research…)
Yours to decide and document; access by other apps goes through explicit OAuth consent, and each grant records the purpose the app declared
Article 28 processor agreement
Sign a data processing agreement with every processor
Production access requires a signed DPA
Chapter V transfers
Keep data in the EU/EEA, or use a lawful transfer mechanism
Stored and processed in the EU (Google Cloud europe-west4, Netherlands)
Per-project isolation, pairwise patient ids, encrypted documents with a customer-managed key, an access log
Article 15 right of access
Give the person a copy of their data
Patient/$everything (full FHIR record) and $summary (IPS)
Article 17 right to erasure
Delete when the basis ends or the person asks
Delete through the API; deletions are soft and versions are kept for audit — plan how your retention policy handles them
Article 25 data protection by design
Collect only what you need; limit who can see it
SMART scopes and category filters limit what each app reads
Article 30 records of processing
Document what you process and why
Provenance on every write: author, organisation, source system
Article 33 breach notification
Detect and report within 72 hours
Your incident process; the platform logs every access
Article 35 DPIA
Assess high-risk processing before you start
Yours to write; the platform documents its own measures
Consent is not the only legal basis
Explicit consent (Article 9(2)(a)) is common for patient apps, but clinics usually rely on the provision of health care (Article 9(2)(h)) and research projects on Article 9(2)(j) with national law. Choose the basis per purpose, record it, and do not ask for consent you will not honour: consent must be as easy to withdraw as to give. In Anpheros, a person revokes an application's access from the consent page and the next request fails.
The European Health Data Space adds to the GDPR
Regulation (EU) 2025/327 (EHDS) keeps the GDPR and adds rights and formats: people get electronic access to their priority data (patient summary, prescriptions, lab results, images, discharge reports) and can share it, and EHR systems must support the European exchange format. See EHDS for developers.
And HIPAA?
The GDPR applies to people in the EU; HIPAA applies to covered entities and their business associates in the US. Anpheros is built for the GDPR and EU data residency, and the same controls serve HIPAA: Anpheros acts as a Business Associate for US clinics, with a business associate agreement (BAA) and a US data region available on request for production customers. The HIPAA safeguards are listed on the security page.
Frequently asked questions
Is health data special category data under the GDPR?
Yes. Article 9 lists data concerning health among the special categories; processing it requires one of the Article 9(2) conditions in addition to an Article 6 legal basis.
Do I need explicit consent to process health data?
Not always. Explicit consent is one condition; others include the provision of health or social care, public health and scientific research under national law. Choose and document the one that fits each purpose.
Must health data be stored in the EU?
The GDPR does not require EU storage, but transfers outside the EEA need a lawful mechanism (an adequacy decision or appropriate safeguards). Keeping the data in the EU avoids that question; some national rules are stricter.
Is Anpheros GDPR compliant?
Anpheros is designed for the GDPR: EU data residency, a data processing agreement for production, consent controlled by the patient, isolation between applications and an access log the patient can read. Compliance of your product also depends on your own legal basis, documentation and processes.
Paste this into Claude, ChatGPT, Cursor or Claude Code. Your assistant reads this guide and adapts it to your code.
Read https://developers.anpheros.com/guides/gdpr-health-data-developers.md and help me apply this guide to my own project. Use the Anpheros sandbox (base URL https://platform.anpheros.com) with my API key from the ANPHEROS_KEY environment variable, never written in the code. Give me complete, runnable code, the response I should expect, and how to fix the errors in https://developers.anpheros.com/guides/troubleshooting.md if a call fails.