Skip to content
Skillpedia
Security5.8k Β· #14671

auditing-safe-harbor-checklist

What it does

This skill checks de-identified text against the 18 identifier categories in the HIPAA Safe Harbor method, and shows which categories were handled and which may have gaps. It is for teams deciding whether Safe Harbor applies to their data.

When to use it

  • βœ“When you must confirm that a note meets the HIPAA Safe Harbor method.
  • βœ“When you want a checklist that maps detected identifiers to the 18 required categories.
  • βœ“When you need to flag gaps such as ages over 89, rare geography or biometric data.

Skill link

https://github.com/maziyarpanahi/openmed/blob/master/skills/auditing-safe-harbor-checklist/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/maziyarpanahi/openmed/blob/master/skills/auditing-safe-harbor-checklist/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCheck whether these de-identified notes meet the HIPAA Safe Harbor method, and list any identifier categories that may still be exposed.”

5 new skills a week. 1 minute to read.

How it works

The agent detects identifiers in the text, maps each one to a Safe Harbor category, and reports which categories are covered and which need a closer look.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Auditing against the HIPAA Safe Harbor checklist

The Safe Harbor method (45 CFR 164.514(b)(2)) de-identifies PHI by removing 18 specific identifier categories for the individual and their relatives, employers, and household members β€” and requires the covered entity to have no actual knowledge that the remainder could re-identify anyone. This skill turns that legal checklist into a concrete coverage check over OpenMed output: which of the 18 categories were detected and handled, and where the gaps are.

The full mapping table lives in references/safe-harbor-identifiers.md β€” all 18 categories, their OpenMed HIPAA class, the matching CANONICAL_LABELS, and per-category cautions. Read it when you need the authoritative cross-walk.

When to use this skill

Use it after a de-identification run to prove coverage, or before release to decide whether Safe Harbor is even achievable for this text. If the user needs a signed, retained record of the run, hand off to auditing-deidentification-runs.

Quick start: coverage check

import openmed
from openmed.core.labels import LABEL_TO_HIPAA, HIPAA_SAFE_HARBOR_CLASSES

note = (
    "Patient John Doe (MRN 1234567), age 92, of Smalltown, seen 2024-03-02. "
    "SSN 123-45-6789, phone 617-555-0142."
)

# 1) Detect identifiers (spans only; no rewrite).
detected = openmed.extract_pii(note)

# 2) Roll each detected span up to its HIPAA Safe Harbor class.
covered = set()
for ent in detected.entities:
    canonical = openmed.normalize_label(ent.label)        # -> CANONICAL_LABELS form
    hipaa_class = LABEL_TO_HIPAA.get(canonical)            # -> one of 18 classes
    if hipaa_class:
        covered.add(hipaa_class)

# 3) Report which of the 18 classes were touched and which weren't observed.
missing = sorted(HIPAA_SAFE_HARBOR_CLASSES - covered)
print("covered:", sorted(covered))
print("not observed in this note:", missing)

"Not observed" is not the same as "absent" β€” a category may simply not occur in this note, or may have been missed. That is exactly what the human review step (below) is for.

Workflow

  1. De-identify with a Safe Harbor profile: openmed.deidentify(note, policy="hipaa_safe_harbor"). This masks every identifier class by default and runs the mandatory structured-ID safety sweep.
  2. Map detected spans to the 18 classes via LABEL_TO_HIPAA (as above). Build a table of category β†’ detected? β†’ action taken.
  3. Walk the checklist in references/safe-harbor-identifiers.md and flag the known gaps explicitly:
    • Ages > 89 (AGE) must be aggregated to "90+"; OpenMed flags but does not auto-cap β€” see shifting-clinical-dates.
    • Dates keep only the year; everything else (admit/discharge/DOB) goes.
    • ZIP beyond the first 3 digits, and small-population areas β†’ mask whole.
    • Rare geography (small towns) and rare characteristics (unusual occupation) can re-identify even when masked field-by-field.
    • Fax shares the PHONE label; biometrics and full-face photos are out of scope for text β€” handle in the imaging/intake pipeline.
  4. Assess residual risk. Run audit=True and read residual_risk (auditing-deidentification-runs). Non-zero projected leakage β†’ review.
  5. Record the "no actual knowledge" judgment. A human must sign off that the remaining text cannot re-identify the individual. Automated coverage is necessary, not sufficient.

Hand-off to / from OpenMed

  • Detect / de-id: openmed.extract_pii (spans) and openmed.deidentify (rewrite) β€” see deidentifying-clinical-text.
  • Label mapping: openmed.CANONICAL_LABELS, openmed.normalize_label, and LABEL_TO_HIPAA / HIPAA_SAFE_HARBOR_CLASSES in openmed/core/labels.py.
  • Signed record + residual risk: auditing-deidentification-runs (audit=True β†’ AuditReport.residual_risk).
  • Profile choice: configuring-privacy-policies β€” if you must keep dates or geography, Safe Harbor fails; use Expert Determination (hipaa_expert_review_assist) or a Limited Data Set (research_limited_dataset).

Edge cases & gotchas

  • Coverage β‰  compliance. Detecting all 18 categories does not satisfy Safe Harbor on its own β€” the "no actual knowledge" residual-risk judgment is required and is a human decision.
  • Ages over 89 are a transformation, not a detection. Masking t
FAQ

Is this legal advice?

No. It is a self-check aid, and a privacy officer must approve the final compliance decision.

Is there a reference list of the categories?

Yes. The skill uses a reference file with all 18 categories and their mappings to detection labels.

What if I need a signed record?

For a signed, retained record of the run, the audit runs skill is the right next step.

Details

Original description by the author

Verify OpenMed de-identified output against all 18 HIPAA Safe Harbor identifier categories and report residual re-identification risk. Use when the user must confirm a note meets HIPAA Safe Harbor (45 CFR 164.514(b)(2)), needs a coverage checklist mapping detected entities to the 18 categories, wants to flag gaps like ages over 89, rare geography, fax vs phone, or biometrics, or asks whether masking was complete. Maps OpenMed CANONICAL_LABELS to the 18 HIPAA classes and uses extract_pii / deidentify to check coverage. Pairs with OpenMed deidentifying-clinical-text and auditing-deidentification

repo: maziyarpanahi/openmed

Popularity

GitHub stars
5.8k
Ranking position
#14671
License
Apache-2.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills