Agent skill

shifting-clinical-dates

Apply consistent per-patient date shifting in OpenMed that preserves intervals between events while satisfying HIPAA Safe Harbor's date rule. Use when the user needs to de-identify dates but keep temporal structure for research, shift all dates by the same offset per patient, preserve days-between-events for survival or longitudinal analysis, cap ages over 89, or strip everything but the year. Covers deidentify(method=\"shift_dates\", date_shift_days=..., keep_year=...) and per-patient reproducible offsets via consistent=True, seed=.... Pairs with OpenMed deidentifying-clinical-text and auditi

maziyarpanahigithub.com/maziyarpanahiGitHub ↗
claude-codeApache-2.0
Install
npx skills add maziyarpanahi/openmed --skill shifting-clinical-dates --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 6 KB
Bundled scripts: none
Version: 1.0
Path: skills/shifting-clinical-dates/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,851
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Shifting clinical dates HIPAA Safe Harbor forbids keeping dates more specific than the year. But naively deleting dates destroys the temporal structure research depends on — time to event, length of stay, intervals between visits. **Date shifting** is the compromise: move every date by a single random offset so the *absolute* dates become meaningless while the *intervals* between them are preserved exactly. OpenMed does this on-device with `deidentify(method="shift_dates", ...)`. ## When to use this skill Use it when downstream analysis needs temporal relationships (survival curves, sepsis-to-antibiotic time, readmission gaps) but the calendar dates must be de-identified. If you can throw dates away entirely, plain `method="mask"` is simpler — reach for shifting only when intervals matter. ## Quick start ```python import openmed note = ( "Admitted 2024-03-02, started antibiotics 2024-03-04, discharged 2024-03-09. " "Follow-up scheduled 2024-04-02." ) # Shift every date by the SAME offset -> intervals preserved, dates obscured. result = openmed.deidentify( note, method="shift_dates", consistent=True, # one stable offset for this run seed=20240519, # reproducible per-patient offset

What's inside
Steps it walks through
  1. When to use this skill
  2. Quick start
  3. How interval preservation works
  4. Per-patient consistent offsets
  5. Workflow
  6. Hand-off to / from OpenMed
  7. Edge cases & gotchas
  8. Standards & references
More from openmed
All skills →
About this skill
What does the shifting-clinical-dates skill do?

Apply consistent per-patient date shifting in OpenMed that preserves intervals between events while satisfying HIPAA Safe Harbor's date rule. Use when the user needs to de-identify dates but keep temporal structure for research, shift all dates by the same offset per patient, preserve days-between-events for survival or longitudinal analysis, cap ages over 89, or strip everything but the year. Covers deidentify(method=\"shift_dates\", date_shift_days=..., keep_year=...) and per-patient reproducible offsets via consistent=True, seed=.... Pairs with OpenMed deidentifying-clinical-text and auditi

How do I install it?

Run `npx skills add maziyarpanahi/openmed --skill shifting-clinical-dates --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.

Keep going