Apply the HIPAA Safe Harbor de-identification standard by removing or generalizing the 18 categories of identifiers specified in 45 CFR §164.514(b)(2): names, geographic data smaller than state, dates more specific than year (except age for those over 89), phone, fax, email, SSN, MRN, health plan numbers, account numbers, certificate/license numbers, VINs, device identifiers, URLs, IP addresses, biometric identifiers, full-face photos, and any unique identifying number.
For FHIR Patient resources, remove or null-out: name, identifier[], birthDate (retain year only or convert to age band), address (retain only state/country-level), telecom[], and photo.
For Observation and Condition resources, generalize effective dates to year or year-month; remove any free-text fields that may contain re-identifying information (note, text.div).
For DocumentReference and DiagnosticReport, either remove clinical note attachments entirely or run them through a clinical NLP de-identification service before including them.
Invoke the FHIR server's $de-identify operation if supported, or apply transformations programmatically using a validated de-identification library; record the de-identification method applied.
Validate the de-identified dataset by sampling records and checking that no 18 Safe Harbor identifiers remain; document the process for your organization's privacy officer review.
Known gotchas
Safe Harbor does not guarantee anonymization for rare conditions or small populations; even fully de-identified data can be re-identified via combination attacks; consider adding statistical noise or generalization for high-risk fields.
Free text in FHIR (Narrative text, note fields, attachment content) is the hardest to de-identify; automated NER-based tools miss some identifiers; always manually audit a sample of de-identified notes.
De-identification is a legal and technical process; your organization's legal counsel and privacy officer should approve the de-identification process before data is shared externally.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp