pseudonymizing-for-gdpr
Skill5.4k starsChanged 4 months agoApache-2.0View on GitHub
Apply GDPR-grade pseudonymization to clinical or personal text with OpenMed, keeping a separately-held re-linkage key so the data can be controlled-re-linked later. Use when the user must process EU personal/health data under GDPR, asks for pseudonymization vs anonymization, needs Art. 4(5) / Art. 9 / Recital 26 alignment, wants a reversible mapping/key vault held apart from the data, or needs controlled re-linkage. Covers openmed.deidentify(policy=\"gdpr_pseudonymization\", keep_mapping=True), storing the mapping in a separate key vault, reidentify() for authorized re-linkage, and retention. Pairs after extracting-pii-entities and configuring-privacy-policies.
Trending
Quiet since September.about the whole repository
Who's talking about maziyarpanahi/openmed
- @yug1224.com“医療テキストの解析や個人情報の匿名化を端末内で完結できるヘルスケアAIツールっぽい 機密データを扱う医療関連の開発現場でかなり使えそう yug1224 starred maziyarpanahi/openmed…”Bluesky · Jun 11, 2026 · 3 likes
- @qdrddr.bsky.social“Local #PII #HIPAA data #anonymizer based on #OpenMed and runs on #Nvidia and Apple #MLX - entirely …”Bluesky · Jul 10, 2026 · 2 likes
- @technews4869.bsky.social“github.com/maziyarpanahi/o... GitHub - maziyarpanahi/openmed: Local-first healthcare AI: clinical NER & …”Bluesky · Jun 22, 2026 · 1 likes
- @dailygithubtrends.bsky.social“今日のGitHubトレンド maziyarpanahi/openmed デバイス上で完結して動作するヘルスケアAIの提供を目的としています。 …”Bluesky · Jun 11, 2026 · 1 likes
- sudosubin/agents.nix“agent-skills.github.maziyarpanahi.openmed: init at 2.5.0”GitHub · Sep 29, 2026
The biggest 5 of 33 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 33
Talked about on GitHub and Bluesky (33 times).
On GitHub · 28
- Sep 29, 2026agent-skills.github.maziyarpanahi.openmed: init at 2.5.0 — sudosubin/agents.nix0 reactions
- Sep 22, 2026build(deps): update openmed requirement from >=1.5.2 to >=2.5.0 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Sep 8, 2026build(deps): update openmed requirement from >=1.5.2 to >=2.3.0 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Sep 1, 2026chore(deps): update openmed requirement from <2,>=1.9.1 to >=1.9.1,<3 — seiba-ai/seiba-risk-scanner0 reactions
- Aug 29, 2026[Argus] CVE-2026-47117: OpenMed 1.5.2 미만 버전의 PII 모델 로딩을 통한 원격 코드 실행 — LEEKIYOON-SEC/Argus-DEV0 reactions
23 more on GitHub
- Aug 25, 2026build(deps): update openmed requirement from >=1.5.2 to >=2.2.0 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Aug 18, 2026build(deps): update openmed requirement from >=1.5.2 to >=2.1.0 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Aug 4, 2026build(deps): update openmed requirement from >=1.5.2 to >=2.0.0 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Jul 30, 2026Bump openmed from 0.6.4 to 1.5.2 — Liberate-Labs/openmed_modal_hosting0 reactions
- Jul 21, 2026build(deps): update openmed requirement from >=1.5.2 to >=1.9.1 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Jul 14, 2026build(deps): update openmed requirement from >=1.5.2 to >=1.9.0 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Jul 14, 2026build(deps): update openmed requirement from >=1.5.2 to >=1.8.1 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Jul 11, 2026cron: curadoria 11/07/2026 - DynamiCare, PhysAssistBench, OpenMed, MedAgentGym, AIME 2026 — fabianofilho/awesome-medical-ai0 reactions
- Jul 7, 2026build(deps): update openmed requirement from >=1.5.2 to >=1.7.0 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Jun 23, 2026build(deps): update openmed requirement from >=1.5.2 to >=1.6.0 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Jun 19, 2026Add affected range to GHSA-m3v4-v5gx-7wf5 (openmed) — github/advisory-database0 reactions · 1 comment
- Jun 13, 2026feat: add openmed template — Phala-Network/phala-cloud0 reactions · 1 comment
- Jun 12, 2026Add OpenMed to healthcare AI section — alvinreal/awesome-opensource-ai0 reactions
- Jun 9, 2026build(deps): update openmed requirement from >=1.5.2 to >=1.5.5 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
- Jun 9, 2026Healthcare Vitals Toolkit — OpenMed Integration Proposal — nvdigitalsolutions/mcp-ai-wpoos0 reactions
- Jun 9, 2026[jules] Port OpenMed quality gates: quality_gates.dart (threshold config) — iberi22/OrionHealth0 reactions · 3 comments
- Jun 9, 2026[jules] Port OpenMed locale validators: i18n_validators.dart (CPF, DNI, CURP) — iberi22/OrionHealth0 reactions · 3 comments
- Jun 8, 2026[jules] Expand PromptScrubber with PiiDetector integration — iberi22/OrionHealth0 reactions · 3 comments
- Jun 8, 2026[jules] Port OpenMed text processor to Dart: text_processor.dart — iberi22/OrionHealth0 reactions · 3 comments
- Jun 8, 2026[jules] Port OpenMed PII detector to Dart: pii_detector.dart (30+ patterns) — iberi22/OrionHealth0 reactions · 2 comments
- Jun 8, 2026[jules] Port OpenMed EntitySpan to Dart: pii_entity.dart — iberi22/OrionHealth0 reactions · 2 comments
- Jun 8, 2026[jules] Port OpenMed labels.py to Dart: pii_labels.dart — iberi22/OrionHealth0 reactions · 2 comments
- May 29, 2026build(deps): update openmed requirement from >=1.4.0 to >=1.5.2 in /healthadvocate — simongonzalezdc/healthadvocate0 reactions · 1 comment
On Bluesky · 5
- Jun 11, 2026医療テキストの解析や個人情報の匿名化を端末内で完結できるヘルスケアAIツールっぽい 機密データを扱う医療関連の開発現場でかなり使えそう yug1224 starred maziyarpanahi/openmed… — @yug1224.com3 likes and reposts
- Jul 10, 2026Local #PII #HIPAA data #anonymizer based on #OpenMed and runs on #Nvidia and Apple #MLX - entirely #offline. #OpenSource Apache 2.0… — @qdrddr.bsky.social2 likes and reposts
- Jun 22, 2026github.com/maziyarpanahi/o... GitHub - maziyarpanahi/openmed: Local-first healthcare AI: clinical NER & HIPAA PII de-identific... — @technews4869.bsky.social1 likes and repost
- Jun 11, 2026今日のGitHubトレンド maziyarpanahi/openmed デバイス上で完結して動作するヘルスケアAIの提供を目的としています。 クラウドにデータを送らずに、臨床テキストからのエンティティ抽出や個人情報の匿名化をローカル環境で実現します。… — @dailygithubtrends.bsky.social1 likes and repost
- Jul 16, 2026Did you have a look to OpenMed ? It gives a similar toolkit unified in a python / Swift API specialised in health use cases.… — @aminesaboni.bsky.social0 likes and reposts · 2 replies
In this repository74 other files it gives its agents.
- AGENTS.mdAGENTS.md
- annotating-variantsSkill
- ask-openmedSkill
- assembling-fhir-bundlesSkill
- auditing-deidentification-runsSkill
- auditing-deid-leakageSkill
- auditing-part11-trailsSkill
- auditing-safe-harbor-checklistSkill
- auditing-subgroup-fairnessSkill
- authoring-model-cardsSkill
- batch-processing-clinical-textSkill
- benchmarking-clinical-nerSkill
- benchmark-pii-recallSkill
- bridging-presidio-and-spacySkill
- building-gold-corpusSkill
- building-patient-timelinesSkill
- building-with-openmedSkill
- checking-hipaa-complianceSkill
- choosing-openmed-modelsSkill
- coding-hcc-risk-adjustmentSkill
- coding-icd10Skill
- computing-ecqmsSkill
- configuring-privacy-policiesSkill
- defining-cohort-phenotypesSkill
- deidentify-a-datasetSkill
- deidentifying-clinical-textSkill
- deidentifying-multilingual-textSkill
- deploying-openmed-mcpSkill
- detecting-pv-signalsSkill
- enforcing-nophi-loggingSkill
- etl-to-omop-cdmSkill
- evaluating-with-leakage-gatesSkill
- exporting-bulk-fhirSkill
- exporting-to-fhirSkill
- extract-clinical-entities-to-fhirSkill
- extracting-clinical-entitiesSkill
- extracting-dicom-metadataSkill
- extracting-lab-tablesSkill
- extracting-pii-entitiesSkill
- extracting-sdohSkill
- fetching-fhir-resourcesSkill
- gating-deid-leakageSkill
- generating-synthea-dataSkill
- generating-synthetic-surrogatesSkill
- ingesting-clinical-documentsSkill
- linking-umls-conceptsSkill
- loading-openmed-modelsSkill
- mapping-loincSkill
- mapping-to-snomedSkill
- mining-pubmed-literatureSkill
- normalizing-rxnormSkill
- parsing-ccda-documentsSkill
- parsing-hl7v2-messagesSkill
- parsing-lab-valuesSkill
- parsing-trial-eligibilitySkill
- pick-a-pii-modelSkill
- querying-openfda-labelsSkill
- querying-terminology-serviceSkill
- reconciling-problem-listsSkill
- reidentifying-textSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Do not use this when the goal is irreversible anonymization for open release — there, drop the mapping entirely and gate residual risk with …
- Very specific: line 71
Choose reversible pseudonymization, not masking: Use method="replace" with policy="gdpr_pseudonymization" and keep_mapping=True.
- Very specific: line 83
Process the pseudonymized text freely: Run analyze_text, analytics, model training, or transfer on deidentified_text.
- Very specific: line 86
Re-link only under authorization: When a lawful basis exists (e.g.
- Distinctive: line 129
Local-first: Run entirely on-device. Do not send EU personal data to a cloud de-identification service to satisfy GDPR — that may itself be …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pseudonymizing for GDPR
Pseudonymization under the GDPR (Art. 4(5)) means processing personal data so it "can no longer be attributed to a specific data subject without the use of additional information" — provided that additional information (the re-linkage key) is "kept separately and is subject to technical and organisational measures." Crucially, pseudonymized data is still personal data (Recital 26): re-linkage is possible, so GDPR still applies. This is the opposite of anonymization, where re-identification is irreversibly prevented and the data falls outside the GDPR.
OpenMed implements this with a single reversible de-identification pass plus a mapping you store away from the data. This skill covers producing that mapping, vaulting the key separately, and re-linking under authorization.
When to use
- You process EU residents' personal or special-category health data (Art. 9) and need a lawful, reversible safeguard rather than full anonymization.
- You need to keep a record-linkage capability (e.g. to recontact a patient, reconcile longitudinal records, or honor a Subject Access Request) but must separate the linkage key from the working dataset.
- A reviewer asks for the pseudonymization-vs-anonymization distinction in writing, or for the ENISA-style "additional information kept separately" control to be demonstrable.
Do not use this when the goal is irreversible anonymization for open release
— there, drop the mapping entirely and gate residual risk with
reviewing-reidentification-risk. Pseudonymization keeps a key; anonymization
must not.
Quick start
import openmed
# Synthetic record — never run this skill's examples on real PHI.
note = "Patient Maria Schmidt (ID 4471) seen 2024-03-02; contact maria@example.de."
result = openmed.deidentify(
note,
method="replace", # realistic surrogates, not [LABEL] holes
policy="gdpr_pseudonymization", # bundled GDPR profile
keep_mapping=True, # produce the reversible re-linkage map
consistent=True, # same input -> same surrogate in the doc
seed=20240302, # cross-run reproducibility of surrogates
)
pseudonymized_text = result.deidentified_text # safe to process / analyze
relink_key = result.mapping # surrogate -> original; SECRETresult.deidentified_text is the pseudonymized payload. result.mapping is the
"additional information" GDPR Art. 4(5) requires be kept separately — it is the
key that makes re-linkage possible, and therefore the most sensitive artifact in
the whole flow.
Workflow
- Choose reversible pseudonymization, not masking. Use
method="replace"withpolicy="gdpr_pseudonymization"andkeep_mapping=True. Replacement surrogates keep the text usable for downstream NLP while remaining non-identifying.consistent=True(optionally withseed=) makes repeated mentions resolve to one stable surrogate so intra-document linkage survives. - Split the data from the key immediately. The moment
deidentifyreturns, routeresult.deidentified_textto your working store andresult.mappingto a separate, access-controlled key vault — different system, different credentials, different backups. Never persist them in the same row, file, bucket, or log line. This separation is the technical-and-organisational measure that makes the data pseudonymized rather than just "personal data with PII in it." - Process the pseudonymized text freely. Run
analyze_text, analytics, model training, or transfer ondeidentified_text. The key never leaves the vault during ordinary processing. - Re-link only under authorization. When a lawful basis exists (e.g. an
authorized SAR or recontact), fetch the mapping from the vault and call
openmed.reidentify(deidentified_text, mapping). Log that a re-linkage happened (who, when, why, record id) — but never log the restored plaintext. - Apply retention to the key. The mapping has its own retention clock. When
the lawful basis for re-linkage ends, destroy the mapping. Once the key
is irreversibly gone and no other re-identification path remains, the
remaining text approaches anonymization and GDPR obligations shrink
accordingly. Verify that claim with
reviewing-reidentification-riskbefore relying on it.
Hand-off to / from OpenMed
- From
extracting-pii-entities/configuring-privacy-policies: confirm the detector recall and the active policy profile before pseudonymizing, since any identifier the detector misses leaks intodeidentified_text. - OpenMed call: Python
from openmed import deidentify, reidentify; the same capability is exposed as MCP toolopenmed_deidentifyand REST/deidentify. Passpolicy="gdpr_pseudonymization",keep_mapping=True. - To
auditing-deid-leakage: scanresult.deidentified_textfor residual identifiers before it leaves the boundary — pseudonymization is only as strong as detection. - To
reviewing-reidentification-risk: quasi-identifier (age, ZIP, dates) re-identification still applies to pseudonymized data; score k-anonymity on the output and document residual risk.
Edge cases & gotchas
- Pseudonymized ≠ anonymized. As long as
mappingexists anywhere, the data is personal data under Recital 26. Do not market akeep_mapping=Trueoutput as "anonymous." - The mapping is the crown jewel. A leaked mapping re-identifies everything at once. Treat it as the highest-sensitivity secret: encrypt at rest, restrict access, audit reads.
- Surrogates can still carry quasi-identifiers.
method="replace"swaps the identifier text, but free-text age, rare diagnosis, ZIP, or admission dates remain. Pseudonymization does not address singling-out; pair with QI risk scoring. - Reproducibility cuts both ways. A fixed
seedmakes surrogates stable across runs (good for linkage) but means an attacker who learns the seed and algorithm can reproduce surrogates — keep the seed with the key, not the data. - Special-category data (Art. 9). Health data needs a lawful basis before processing; pseudonymization is a safeguard, not a lawful basis on its own.
- Local-first. Run entirely on-device. Do not send EU personal data to a cloud de-identification service to satisfy GDPR — that may itself be a transfer.
Standards & references
- GDPR Art. 4(5) — definition of pseudonymization: https://gdpr-info.eu/art-4-gdpr/
- GDPR Art. 9 — processing of special categories (health) data: https://gdpr-info.eu/art-9-gdpr/
- GDPR Recital 26 — pseudonymous data is personal data; anonymization test: https://gdpr-info.eu/recitals/no-26/
- ENISA, Pseudonymisation techniques and best practices (2019): https://www.enisa.europa.eu/publications/pseudonymisation-techniques-and-best-practices
- EDPB Guidelines on pseudonymisation (01/2025): https://www.edpb.europa.eu/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

