PHI redaction patterns for FHIR resources following HIPAA Safe Harbor. Use when: (1) Redacting patient health information from FHIR resources before AI agent access, (2) Implementing de-identification for clinical data pipelines, (3) Understanding what fields are stripped, masked, or truncated in FHIR resources, (4) Building read paths that automatically protect patient privacy.
npx claudepluginhub aks129/healthclawguardrails --plugin healthclaw-guardrailsThis skill uses the workspace's default tool permissions.
Standard redaction profile for Protected Health Information (PHI) applied on all
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Standard redaction profile for Protected Health Information (PHI) applied on all read paths in the FHIR MCP guardrail stack. Based on HIPAA Safe Harbor method.
All redaction is applied at read time, not at storage time.
HumanName)[Redacted]<div xmlns="http://www.w3.org/1999/xhtml">[Redacted]</div>empty[Redacted]import json
def apply_redaction(resource):
"""Deep-copy the resource and redact PHI fields."""
redacted = json.loads(json.dumps(resource))
_redact_fields(redacted)
for contained in redacted.get('contained', []):
if isinstance(contained, dict):
_redact_fields(contained)
return redacted
Key implementation notes:
This redaction profile covers these Safe Harbor identifiers:
Not covered by this profile (would need additional implementation):
photo field, not scanned in attachments)The redaction is applied automatically by the guardrail stack. MCP tools like
fhir.read, fhir.search, fhir.lastn, and context.get all return
redacted data. No additional action is needed by the agent.
The $deidentify operation provides explicit HIPAA Safe Harbor de-identification
on demand, useful for export or analysis workflows.