De-identification: assist, never certification
Scope
Detection targets the 18 identifier categories of the HIPAA Safe Harbor method
(45 CFR 164.514(b)(2)), per HHS OCR guidance.
Dates default to year-only handling (the year is permitted; other elements removed);
redact mode removes years too. Known names supplied by the caller
are always redacted at high confidence.
Uncertainty is surfaced, not hidden
- Every detection carries a confidence level. High-confidence spans replace with typed numbered placeholders (
[NAME-1],[MRN-1], ...). - Low-confidence spans (heuristic names, biometric wording) are listed for human review with surrounding context.
- A residual-risk statement ships inside every result.
Numbers, scoped honestly
On our fully synthetic annotated corpus (9 notes, 49 gold spans across 18 categories): micro recall 95.9%, precision 100%. Known hard misses are kept deliberately in the corpus - bare names after section headings, letter-prefixed reference codes - because they are why the residual-risk statement exists. These numbers describe that corpus, not your charts.
A second layer behind the first
The PHI egress guard independently screens network-tool arguments for high-confidence identifier patterns and denies the call in default mode, regardless of what any scrubber produced. Local tools make zero network calls; lookups send terms and codes only to nine allowlisted hosts.
Honest limits
- Regex detection fails silently in the dangerous direction - hence review flows, not trust claims.
- No images, audio, waveforms, or free-text addresses beyond street-pattern detection.
- Not an Expert Determination substitute; organizations needing certified de-identification need that process.
Corpus, scoring functions, and CI floors:
eval/corpus, src/lib/evaluate.ts,
tests/eval.spec.ts. Regenerate:
pnpm eval.