annotating-variants
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST,…
Select and customize OpenMed's seven bundled privacy policy profiles for de-identification, and build custom surrogate generators. Use when the user asks which policy fits HIPAA Safe Harbor vs Expert Determination vs GDPR vs PIPEDA vs a research limited dataset vs strict
Claude Code
$ npx -y skills add maziyarpanahi/openmed --skill configuring-privacy-policies --agent claude-code
Codex
$ npx skills add maziyarpanahi/openmed --skill configuring-privacy-policies -a codex -y
Cursor
$ npx skills add maziyarpanahi/openmed --skill configuring-privacy-policies -a cursor -y
Gemini CLI
$ npx skills add maziyarpanahi/openmed --skill configuring-privacy-policies -a gemini-cli -y
GitHub Copilot
$ npx skills add maziyarpanahi/openmed --skill configuring-privacy-policies -a github-copilot -y
OpenCode
$ npx skills add maziyarpanahi/openmed --skill configuring-privacy-policies -a opencode -y
Windsurf
$ npx skills add maziyarpanahi/openmed --skill configuring-privacy-policies -a windsurf -y
name: configuring-privacy-policies description: "Select and customize OpenMed's seven bundled privacy policy profiles for de-identification, and build custom surrogate generators. Use when the user asks which policy fits HIPAA Safe Harbor vs Expert Determination vs GDPR vs PIPEDA vs a research limited dataset vs strict no-leak, wants to pass policy= to deidentify(), needs to keep quasi-identifiers for research, or must register a custom MRN/name/address surrogate provider. Covers the profile-to-use-case map, AnonymizerConfig/Anonymizer for fine control, and register_clinical_provider / register_label_generator. Pairs with OpenMed deidentifying-clinical-text and generating-synthetic-surrogates." license: Apache-2.0 metadata: project: OpenMed category: de-identification pairs: adjacent version: "1.0"
A **policy profile** is a named bundle of de-identification decisions: which action (mask/redact/replace/keep) applies to each label, how aggressively detectors arbitrate, whether the mandatory safety sweep runs, and whether a reversible mapping is produced. OpenMed ships seven profiles. Pass one by name to `deidentify(policy=...)` and you get a compliance-aligned default without hand-wiring 50+ per-label actions. Everything runs **on-device**.
Use it to pick the right `policy=` for a regulatory context, to understand what a profile actually changes, or to go beyond the bundle — keeping quasi- identifiers for research, or registering a custom surrogate generator (e.g. your own MRN format).
import openmed note = "Jane Roe, DOB 1979-04-11, lives in Cambridge MA 02139. SSN 123-45-6789." # HIPAA Safe Harbor: mask every identifier class. safe = openmed.deidentify(note, policy="hipaa_safe_harbor") # GDPR pseudonymization: replace with fakes AND keep a reversible mapping. gdpr = openmed.deidentify(note, policy="gdpr_pseudonymization") mapping = gdpr.mapping # present because the profile sets keep_mapping=True # Research limited dataset: mask direct identifiers, KEEP quasi-identifiers # (dates, age, ZIP, geography) so the data stays analytically useful. lds = openmed.deidentify(note, policy="research_limited_dataset")
Each profile lives in `openmed/core/policies/<name>.json`. Summary of what each actually configures:
| Profile | Default action | Quasi-identifiers | Mapping | Safety sweep | Use case | | --- | --- | --- | --- | --- | --- | | `hipaa_safe_harbor` | **mask** all | masked | none | **mandatory** | HIPAA §164.514(b)(2) Safe Harbor — strip all 18 identifier classes | | `hipaa_expert_review_assist` | **redact** | redacted; clinical concepts **kept** | none | optional | Assist Expert Determination (§164.514(b)(1)); keeps microbiology/clinical terms for a statistician to assess residual risk | | `gdpr_pseudonymization` | **replace** | replaced; clinical kept | **kept + reversible** | mandatory | GDPR Art. 4(5) pseudonymization — reversible under controlled key | | `canada_pipeda` | **replace** (IDs **masked**) | replaced | **kept + reversible** | mandatory | PIPEDA-aligned; like GDPR but masks ID_NUM/SSN outright | | `research_limited_dataset` | mask direct ids | **keeps** dates, age, ZIP, geography, org, job | none | mandatory | HIPAA Limited Data Set (§164.514(e)) — usable for research with a DUA | | `clinical_minimal_redaction` | mask direct ids | **keeps** quasi-identifiers | none | **optional** | Internal clinical use where readability matters; lighter cascade | | `strict_no_leak` | **mask everything** | masked; even clinical concepts masked | none | mandatory | Maximum-recall, union arbitration, all cascade tiers — zero-leakage posture |
Key dimensions to reason about:
`keep`. Set per label in the profile's `actions` map.
`DIRECT_IDENTIFIER` / `QUASI_IDENTIFIER` / `CLINICAL_CONCEPT`. Research and minimal-redaction profiles **keep** quasi-identifiers; strict-no-leak masks even clinical concepts.
reversible mapping. Treat that mapping as PHI.
like, emails) that runs regardless of model confidence. Off only for the two "minimal/assist" profiles.
`high_recall_union` across tiers R0–R3 (most aggressive); minimal redaction uses only R0–R1.
`hipaa_expert_review_assist`, then human Expert Determination.
(requires a Data Use Agreement).
When a profile is close but not exact, drive the engine directly with `Anonymizer` / `AnonymizerConfig`, or register custom generators.
from openmed import (
Anonymizer, AnonymizerConfig,
register_label_generator, register_clinical_provider,
)
# 1) Per-instance config (language, locale, deterministic surrogates):
anon = Anonymizer(AnonymizerConfig(lang="en", consistent=True, seed=7))
fake_name = anon.surrogate("John Doe", "PERSON") # type-matched surrogate
# 2) Override the surrogate for one canonical label (e.g. your MRN format).
# Generators take (faker, original, *, locale) and return a string.
def hospital_mrn(faker, original, *, locale):
return f"H{faker.numerLocal-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android and browser runtimes. Apache-2.0 SDK.
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST,…
Choose the first OpenMed workflow skill for an intake, privacy, extraction, exchange, or verification request using deterministic…
Package multiple FHIR R4 resources produced from OpenMed output into a single valid transaction Bundle ready to POST to an EHR,…
Adversarially scan already-de-identified clinical text for residual identifiers and emit a leakage report that blocks release on…
Produce a signed, reproducible, no-PHI audit trail for an OpenMed de-identification run via deidentify(audit=True). Use when the…
Generates and verifies 21 CFR Part 11-style audit trails — who/what/when, electronic signatures, and tamper-evidence — for…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…