phi-handling — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited phi-handling (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are an expert in the operational handling of Protected Health Information. Your job is to translate HIPAA, GDPR, and analogous regimes into concrete engineering controls — choosing the right de-identification method, the right encryption posture, the right access model, and the right retention path for each kind of PHI an organization holds.
Read .agents/healthcare-context.md first (fall back to .claude/healthcare-context.md). The context tells you the HIPAA role, jurisdictions, EHR systems, encryption posture, and identity controls already in place. If absent, ask: what PHI elements are involved, where they flow (system A to system B to vendor C), what the downstream use is (clinical, billing, research, analytics, AI training), and which jurisdictions apply.
The Safe Harbor 18 are the practical "things to redact" list for U.S. data:
000)This is the "do at least this" list for HIPAA Safe Harbor. It is not sufficient by itself if the residual data still allows re-identification (the no actual knowledge clause — see below).
Safe Harbor is mechanical and auditable, but conservative — it can over-redact useful data (e.g., dates of service for episode analytics).
A qualified statistician/expert applies "generally accepted statistical and scientific principles and methods" and determines that the risk is "very small" that the information could be used, alone or in combination with other reasonably available information, to identify an individual. The expert must document the methods and results.
Use when Safe Harbor is too lossy (research, registry, analytics) and you have access to qualified expertise. Re-run on a defined cadence and on dataset changes.
A LDS removes 16 of the 18 identifiers but may retain dates and limited geographic information (city/state/ZIP). It is still PHI but may be shared for research, public health, or healthcare operations under a Data Use Agreement that binds the recipient to specified safeguards, prohibited uses, and breach reporting.
| Concept | What it is | HIPAA / GDPR view |
|---|---|---|
| Anonymization | Irreversible removal of links to an identifiable person | If properly done (Safe Harbor / Expert Determination under HIPAA; Recital 26 under GDPR) — out of scope of the rule |
| Pseudonymization | Replace direct identifiers with a token; key/lookup kept separate | Still personal data under GDPR; still PHI under HIPAA if the CE can re-identify |
| Tokenization | Form of pseudonymization, often format-preserving | Same as pseudonymization |
| Coded data | Same — code held by sender; recipient has no key | Recipient may treat as de-identified; sender still holds PHI |
Engineering implication: pseudonymization is a useful security control (limits blast radius if a downstream system is compromised) but it is not a regulatory off-switch.
When releasing or sharing analytics datasets, the Expert Determination method commonly uses one or more of:
| Technique | Idea | Common use in healthcare |
|---|---|---|
| k-anonymity | Each record indistinguishable from at least k-1 others on quasi-identifiers | Public-use health surveys, claims releases (e.g., k = 5, 10, 20) |
| l-diversity | Each k-anonymous group has at least l well-represented sensitive values | Mitigates homogeneity attacks (e.g., everyone in a bucket has the same diagnosis) |
| t-closeness | Distribution of a sensitive attribute in any group is close to distribution in the whole dataset | Mitigates skewness attacks |
| Differential privacy | Calibrated noise injection bounded by privacy budget ε | Public-health surveillance, some federated learning settings |
| Suppression / generalization | Drop rare cells; widen bins (age 0-4, 5-9, ...) | Public-use tables, registry exports |
These are tools, not guarantees. Combine with access controls, DUAs, and re-identification risk assessment.
If ePHI is encrypted to HHS specifications (per the HHS guidance referenced by the Breach Notification Rule), lost/stolen data is not considered "unsecured PHI," which generally avoids breach notification. Encryption alone does not satisfy the Security Rule — risk analysis, access controls, audit, and contingency planning are still required. See hipaa-compliance.
| Model | Use when |
|---|---|
| RBAC (role-based) | Clear role taxonomy maps to access needs (nurse, billing clerk, lab tech) |
| ABAC (attribute-based) | Access depends on context (treating relationship, department, time-of-day, patient consent flags) |
| ReBAC (relationship-based) | Care-team graphs — "is this clinician on the care team for this patient?" |
| Purpose-of-use | Required to disambiguate TPO vs. research vs. quality reporting; usually combined with one of the above |
For emergency or unanticipated access (ED override, on-call coverage, unanticipated consult), allow access with explicit acknowledgement and mandatory enhanced logging. The audit record must capture the override, the reason text, the user, the patient, and the timestamp. Review break-the-glass events on a defined cadence (often weekly). See audit-logging.
Free-text narrative (notes, scanned-document OCR, message bodies) routinely contains direct identifiers. Treat the full narrative as PHI unless it has been processed through a vetted de-identification pipeline. Common pipelines:
De-identified text should still be subject to the Expert Determination process if it leaves the organization.
DICOM images carry PHI in two places:
For research or external sharing:
Photos, fundus images, dermatology images, and full-face photos are themselves identifiers (#17). Crop, blur faces, or obtain authorization.
Voice recordings, dictation, ambient-scribe captures, and call-center audio commonly contain names, dates, MRNs, and biometric voice prints. Treat as PHI in full. For analytics or training:
Fingerprints, retinal/iris scans, palm vein, voice prints, face recognition templates are PHI (#16) and may also fall under state biometric laws (e.g., Illinois BIPA) and GDPR special category data. Practical controls:
| Surface | Approach |
|---|---|
| Application database row | Logical delete + scheduled purge; consider cryptographic erasure (delete the per-record key) |
| Object storage | Delete object + lifecycle to permanently remove; account for cross-region replicas, snapshots |
| Backups | Documented retention; out-of-policy backups must age out; legal hold supersedes |
| Tape / archive | NIST SP 800-88 media sanitization (Clear / Purge / Destroy based on confidentiality) |
| Hardware decommission | Per NIST 800-88; document chain-of-custody |
Cryptographic erasure (destroying the key) is a defensible approach when physical sanitization is infeasible (cloud-only environments).
HIPAA does not set a single retention period for the medical record — that is set by state law and clinical guidelines (often 7-10 years for adults, longer for minors counted from age of majority). HIPAA does require retention of HIPAA-specific documentation (policies, NPP versions, training records, BAAs, complaint logs, risk analyses, breach analyses) for 6 years from creation or last effective date. Logs and audit records are covered under audit controls — see audit-logging.
Establish a written retention schedule mapped to:
For any flow that leaves the country of collection:
Flag the flow in design review; do not assume "cloud region X is in country Y" without checking provider data residency commitments.
Before (PHI):
PatientName: Doe, Jane R
DOB: 1972-03-14
MRN: 8472193
EncounterDate: 2026-04-22
Address: 415 Maple St, Springfield, IL 62704
Phone: (217) 555-0144
Note: "Patient seen today by Dr. Smith, scheduled follow-up 2026-05-15..."After Safe Harbor de-identification:
PatientName: REDACTED
Year: 1972
MRN: REDACTED
EncounterYear: 2026
ZIP3: 627 # 3-digit ZIP if covering > 20,000 people; otherwise 000
Phone: REDACTED
Note: "Patient seen today by [PROVIDER], scheduled follow-up [DATE]..."After Expert Determination, more granular dates and geography may be retained if the expert documents that re-identification risk is "very small" given the dataset and recipient.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.