reidentifying-text
Reversibly de-identify clinical text with OpenMed and later restore the original PHI from a saved mapping. Use when the user needs pseudonymization rather than permanent anonymization, wants to mask PHI now and re-link it later under authorization (e.g. recontact, adjudication, GDPR pseudonymization), asks about deidentify keep_mapping, reidentify, or how to store and protect the re-identification mapping. Covers when reversibility is and is not appropriate (pseudonymization vs HIPAA Safe Harbor anonymization). Pairs after extracting-pii-entities and deidentifying-clinical-text.
npx skills add maziyarpanahi/openmed --skill reidentifying-text --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Reidentifying Text Some workflows need to remove PHI **for processing** but keep the ability to restore it later under authorization — adjudication, patient recontact, linking results back to a record. That is **pseudonymization** (reversible), not **anonymization** (irreversible). OpenMed supports it with `deidentify(..., keep_mapping=True)` to capture a mapping, and `reidentify` to restore. Everything runs on-device. ## When to use - You need to **re-link** redacted output to the original record later. - You are doing **GDPR pseudonymization** (Art. 4(5)): identifiers held separately, reversible under controlled conditions. - A reviewer must **spot-check** redactions against originals. **Do NOT use reversibility when:** - The goal is **HIPAA Safe Harbor anonymization** or a true **anonymous** release — a re-identification mapping defeats anonymization. Use `method="remove"` and keep **no** mapping. - The redacted text leaves your trust boundary and the mapping might travel with it. The mapping is the secret; never co-locate it with the de-identified output. ## Install ```bash pip install "openmed[hf]" ``` ## Quick start: reversible round-trip ```python import openmed note = "Pa
- When to use
- Install
- Quick start: reversible round-trip
- Use consistent surrogates for stable pseudonyms
- Store the mapping securely — separate from the text
- Reversible vs irreversible: pick deliberately
- Hand-off to / from OpenMed
- Edge cases & gotchas
- Standards & references
pip install "openmed[hf]"
What does the reidentifying-text skill do?
Reversibly de-identify clinical text with OpenMed and later restore the original PHI from a saved mapping. Use when the user needs pseudonymization rather than permanent anonymization, wants to mask PHI now and re-link it later under authorization (e.g. recontact, adjudication, GDPR pseudonymization), asks about deidentify keep_mapping, reidentify, or how to store and protect the re-identification mapping. Covers when reversibility is and is not appropriate (pseudonymization vs HIPAA Safe Harbor anonymization). Pairs after extracting-pii-entities and deidentifying-clinical-text.
How do I install it?
Run `npx skills add maziyarpanahi/openmed --skill reidentifying-text --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From maziyarpanahi/openmed, a repository with 4,851 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.