Example: Healthcare Data Access Guard
Guard AI agent access to patient records using HIPAA-aligned consensus with clinical and privacy personas.
Scenario
An AI clinical decision support (CDS) system requests access to a patient's electronic health records to generate a treatment recommendation. The patient, a 58-year-old with a complex cardiac history, was admitted through the ED two hours ago. The CDS agent needs lab results, medication history, and prior imaging reports.
Before any Protected Health Information (PHI) is returned to the agent, a healthcare data access guard evaluates the request. Four specialist personas assess whether the access meets HIPAA requirements: Is there an active treatment relationship? Does the request satisfy the Minimum Necessary Standard? Is the access properly logged for the designated record set? Can the data be de-identified where full PHI is not required?
What happens without the guard
The CDS agent receives unrestricted access to the patient's entire medical record -- including behavioral health notes, HIV status, substance abuse treatment records, and psychotherapy notes that have stricter protections under 42 CFR Part 2 and 45 CFR 164.508. The organization has now committed a HIPAA Privacy Rule violation. Under the HITECH Act tiered penalty structure, this falls under "reasonable cause" (Tier B): $1,000 to $50,000 per violation, with an annual maximum of $1.5M per violation category. An OCR (Office for Civil Rights) investigation follows, requiring costly remediation, breach notification, and potential corrective action plan.
The four guard personas
| Persona ID | Role | Evaluates |
|---|---|---|
hipaa-privacy-officer | HIPAA Privacy Officer | Treatment/Payment/Operations (TPO) basis, authorization requirements, special category protections |
clinical-data-steward | Clinical Data Steward | Minimum Necessary Standard compliance, data scope appropriateness for clinical use case |
access-control-reviewer | Access Control Reviewer | Agent authorization, role-based access, treatment relationship verification |
audit-compliance | Audit & Compliance Analyst | Access logging, designated record set tracking, breach risk assessment |
Full working example
Initialize the board
Post the data access review job
The CDS agent posts an access request. The input includes the requesting system's identity, the patient context, and the specific data categories requested.
Time sensitivity matters
The 60-second expiry reflects the clinical reality: a patient in the ED with possible STEMI cannot wait for a multi-hour review. The guard must be fast without sacrificing rigor.
Persona evaluations — ACCESS ALLOWED path
In this scenario, all four personas approve the request. The data categories are clinically appropriate, the treatment relationship is active, and the request excludes protected special categories.
Resolve — ALLOW decision
All four personas approved. The board resolves and the CDS agent receives the scoped data.
Alternative outcomes: BLOCK and REQUIRE_HUMAN
The scenario above results in ALLOW because the request is well-formed. Here is what triggers the other outcomes.
The access is blocked automatically when any of these conditions are detected:
BLOCK triggers include:
- Requesting special category data (psychotherapy notes, substance abuse records under 42 CFR Part 2, HIV status) without explicit authorization
- No active treatment relationship or encounter
- Agent not registered or requesting data outside authorized scopes
- Patient has opted out of AI-assisted care (where applicable under state law)
Reputation settlement
After a human reviewer confirms the decision was correct, reputation is settled.
Why reputation matters in healthcare
A hipaa-privacy-officer persona that consistently makes correct access decisions accumulates reputation, increasing its weight in future evaluations. A persona that generates false blocks on legitimate treatment access (delaying patient care) or false allows on unauthorized access (causing HIPAA violations) gets slashed. This creates a natural selection pressure toward accurate, well-calibrated privacy decisions.
The audit trail
Every access decision produces a complete, immutable audit record:
| Artifact | Contents | Regulatory Purpose |
|---|---|---|
| Job record | Full access request: agent ID, patient MRN, data categories, clinical context | 45 CFR 164.530(j) — documentation requirement |
| 4 submissions | Each persona's independent evaluation with regulatory citations | Evidence of reasonable safeguards under 164.530(c) |
| Resolution record | Final ALLOW/BLOCK/REQUIRE_HUMAN decision with conditions | Accountability documentation for OCR investigations |
| Ledger entries | Stake locks, payouts, slashing events | Governance audit trail |
| Access log entry | Timestamp, agent, patient, data accessed, purpose | 45 CFR 164.528 — accounting of disclosures |
OCR investigation readiness
When the Office for Civil Rights investigates a potential HIPAA violation, they request documentation of the organization's safeguards, access controls, and decision rationale. This guard produces exactly that documentation automatically. Organizations without this level of audit granularity typically spend 6-18 months in costly remediation under an OCR corrective action plan.
Key regulatory references
- 45 CFR 164.502 -- General rules for uses and disclosures of PHI, including the Minimum Necessary Standard at 164.502(b)
- 45 CFR 164.506 -- Uses and disclosures for Treatment, Payment, and Health Care Operations (TPO) without patient authorization
- 45 CFR 164.508 -- Uses and disclosures requiring patient authorization, including psychotherapy notes at 164.508(a)(2)
- 45 CFR 164.524 -- Individual's right of access to their designated record set
- 45 CFR 164.528 -- Accounting of disclosures requirement
- 42 CFR Part 2 -- Confidentiality of substance use disorder patient records (stricter than HIPAA)
- HITECH Act -- Tiered penalty structure: Tier A (unknowing) $100-$50K; Tier B (reasonable cause) $1K-$50K; Tier C (willful neglect, corrected) $10K-$50K; Tier D (willful neglect, not corrected) $50K+; annual cap $1.5M per category