HATS
HIPAA Authenticated Transfer Space Specification
A patient-sovereign health records protocol built on atproto spaces, for users and institutions.
"We're building on HATS." — "Don't you wear them?"
1.1 What is HATS?
HATS is a proposed protocol layer on atproto spaces, the permissioned-data layer of the AT Protocol, that maps HIPAA's patient-data-sovereignty philosophy onto spaces. Instead of health records living in hospital-owned silos, they live in spaces the patient controls: the patient is the space authority, every author writes only to their own space repo, and providers read with short-lived, scoped credentials.
The name is doubly nested by design: HIPAA (Health Insurance Portability and Accountability Act) Authenticated Transfer Space Specification = HATS. "Authenticated Transfer" is the AT in atproto (Authenticated Transfer Protocol); "Space" is the atproto spaces primitive HATS is built on.
1.2 Origin
Started as a brainstorm from a real problem: modern hospitals go fully analog during cyberattacks because their systems (Epic, Cerner, etc.) are cloud-hosted with no meaningful LAN fallback. HIPAA compliance paradoxically centralizes data rather than distributing it safely. The fix: patient-sovereign records on an open protocol.
Daniel Holmgren (Bluesky protocol engineer) designed atproto's permissioned-data layer in a public design diary, which is essentially the infrastructure HATS needs. Most of this spec was drafted in July 2026 against those posts. The atproto spaces alpha shipped on August 20, 2026 (proposal 0016), and the spec is built on it. Upstream: atproto Spaces Alpha lists the upstream facts HATS depends on and where HATS needs something upstream doesn't provide.
1.3 Structure
One app, three modes. HATS is a standalone app — institution and coordinator modes run as servers, personal mode as a phone app (one web build, shipped native through Capacitor and as a PWA) — that other software reaches through standard FHIR APIs. An EHR is just another client of the institution node. See Architecture.
Records are FHIR resources in spaces typed by IPS section and keyed by HL7 confidentiality code, under the hats.health domain (health.hats.* NSIDs). See Lexicon Namespaces.
HATS splits into two layers:
HATS.user — the patient-sovereign layer. The patient is the authority over their spaces; providers read with short-lived scoped credentials and write into their own repos. The Roles, Lexicon Namespaces, Access Flows, ATProto Mapping, and Open Questions docs below all describe this layer.
HATS.institution — the institutional layer. Sharing between institutions (.public) and internal operational messaging (.pneumatic), both institution-to-institution. HIPAA permits these treatment, payment, and operations (TPO) disclosures without patient authorization (45 CFR 164.506(c)); HATS stops none of it, and a coordinator facilitates. Reading the patient's own spaces still takes their sharing grant, because the patient is the space authority.
Foundational primitives — metamorphic bilateral records, the accountability thesis, the binary audit ceiling — live one level up in the parent ATS umbrella and are inherited here rather than restated. See ATS Foundations.
1.4 Docs
The site renders these as five pages: for everyone, for builders, data security, getting started, and the roadmap.
For everyone
- User Stories — patient, institution, legal, and builders: what each needs, what's covered, what's a gap
- Glossary — HATS's words beside FHIR's and HIPAA's: patient, clinician, provider, institution, circle member, grant
- Roles — Patient, Provider, Backup Provider, Guardian, Validator, Quorum Shareholder
- Identity & Circles — one person, many DIDs; trusted circles, guardians included
- Access Flows — routine care, admission/backup, notarized consent, break-glass
- ER: Unresponsive Patient — tiered, reason-required break-glass
- Legal Process — custodians decide; HATS records who, on whose behalf, and why
- Share Link — a revocable, tracked link or QR code, built on SMART Health Links
- Regulatory Model — who is regulated, retention, responsible entity on every record
- Autonomy Spectrum
- Progressive Onboarding
- HATS.institution
- HATS.institution.public
- HATS.institution.pneumatic
- HATS.institution.joining — how an institution joins: evidence read from the authorities that already vouch for it, signed by a named reviewer; endorsements support, never block
- HATS.institution.people — clinicians, administrators, and privacy officers: how they're vetted, privileged, and ended, with a chain of evidence naming each person
For builders
- Repository — workspace layout, packages, and commands
- Architecture — standalone app in three modes, standard APIs, offline-first sync
- Lexicon Namespaces — IPS-section spaces, confidentiality keys, FHIR records
- Lexicon Reference — every method, space type, and record, generated from the schemas
- Record Integrity — pluggable signatures, amendment chains, the Mina-style ZTK
- Threshold Authority & Notarized Consent
- ATProto Spaces Mapping
- Upstream: atproto Spaces Alpha — the proposal 0016 facts HATS depends on, feedback for the spaces team
- ATS Foundations — shared primitives inherited from the parent ATS umbrella
- Prototype — a working slice on a home server, Cloudflare Workers, and a phone, with an inclusive synthetic roster
Data security
- Data Security — who's trusted and who only runs storage, who can read a record, how every access is audited without exposing it, and the working theory for encrypting records end to end
- Provider-to-Provider Exchange — no gates between institutions, only accountability: every move logged on both ends and shown to the patient, so no copy goes unaccounted for
Getting started
- The Demo — try the HATS app in your browser, signed in as a synthetic patient
- Getting Started — run what exists today, with synthetic data only
Roadmap
- Roadmap — status, what's next, and who can close each open question: settled by law, a clinical call, or a legal one
- Open Questions
User Stories
HATS is a triangle with a binary star at its center. The patient is at the top and wants control without understanding any infrastructure. The institution is at the bottom left and wants the right data now, without a new tool. Legal is at the bottom right and needs every disclosure on the record. At the center, equally close to every corner, two bodies orbit each other: builders — engineers, app developers, operators — and the coordinator, the deterministic code they write, which knows the rules and never the records. Builders work for every corner, the patient's apps as much as the hospital's nodes.
Stories use the Connextra form ("As a…, I want…, so that…"). Acceptance criteria use Gherkin. Each story is marked Covered (a doc specs it), Designed (specced for the prototype, not built), or Gap (nothing does yet). Story IDs are stable handles, not section codes.
2.1 Personas
Sub-personas worth keeping in mind: the caregiver (a circle member acting for a parent or child), the privacy officer (reviews break-glass), and the high-infra patient (self-hosts). The person who stands in several corners at once has their own section below.
2.2 Patient
- P1 — As a patient, I want an account created for me at my first visit, so that I never have to "sign up" for anything. Covered: Progressive Onboarding
- P2 — As a patient, I want to give a new doctor access with one tap of my card, so that check-in is no slower than today. Covered: Access Flows
- P3 — As a patient, I want to see every time anyone read my records and the coded reason why, so that access is never invisible. Covered: ER flow
- P4 — As a patient, I want to be told immediately when someone breaks the glass on my records, so that I can contest it while it's fresh. Covered: ER flow
- P5 — As a patient, I want my therapy notes kept out of routine access, so that seeing a new doctor doesn't expose my whole history. Covered: ER flow
- P6 — As a patient, I want to lose my card or phone without losing my records, so that a lost wallet isn't a medical event. Covered: Threshold Authority
- P7 — As a patient, I want to name my spouse as guardian, so that someone I trust decides when I can't. Covered: Identity & Circles
- P8 — As a patient, I want to read the note the ER wrote about me, so that I know what happened while I was out. Covered: ER flow
- P9 — As a patient, I want my records to follow me when I switch hosting providers, so that I'm never locked in. Gap: migration of space repos is upstream (
listSpaces), but HATS doesn't spec what a patient sees - P10 — As a patient, I want to let my sister see my medications and my partner act for me, without the system assuming what my family looks like, so that the people I actually trust are the ones involved. Covered: Identity & Circles
- P11 — As a patient with no phone and no home, I want my card alone to give me full control, so that sovereignty doesn't depend on owning anything. Covered: Autonomy Spectrum
- P12 — As a patient, I want to move an existing record out of routine access, so that an old diagnosis stops following me to every visit. Covered: Lexicon Namespaces
- P13 — As a patient, I want to start by loading my own records, so that I don't have to wait for a provider to sign me up. Covered: Progressive Onboarding
- P14 — As a patient, I want to show a specialist's front desk a QR code for my medications and allergies that expires and that I can take back, so that I skip the clipboard without losing track of who looked. Covered: Share Link
- P15 — As a patient, I want to use the atproto account I already have, so that I have one account, without my health showing on my social profile. Covered: Identity & Circles
2.3 Institution
- C1 — As an ER physician, I want allergies, medications, and advance directives for an unconscious patient within a minute, so that I don't treat blind. Covered: ER flow; latency target is a Gap
- C2 — As an ER physician, I want to break the glass when routine access isn't enough, so that I can act on my judgment and answer for it afterwards. Covered: ER flow
- C3 — As a clinician, I want HATS data to appear inside my existing EHR, so that I don't learn a new tool mid-shift. Covered: Architecture — not embedded; the EHR is a client of the institution node over FHIR R4
- C4 — As a clinician, I want to know who wrote a record and that it hasn't been altered, so that I can trust it clinically. Covered: Record Integrity (space commits are deniable, so integrity lives in the record)
- C5 — As a clinician, I want my notes to stay in my institution's custody for the retention period, so that I meet my legal obligations even if the patient revokes access. Covered: Regulatory Model; upstream acknowledgment of the regulated-syncer exception is open
- C6 — As an imaging technologist, I want exactly allergies and prior results, so that I can check contrast safety without seeing anything else. Covered: ER flow
- C7 — As a clinician, I want to sign in once through my hospital, so that HATS doesn't add another password. Covered: ER flow (hospital-hosted staff accounts)
- C8 — As a referring clinician, I want to transfer a patient to another hospital and have access follow them, so that the receiving team doesn't start blind. Covered: HATS.institution.public
- C9 — As an EMT at a street call, I want to identify an unresponsive person and see their POLST, allergies, and medications on my phone, then hand them and my report to the transport crew, so that care doesn't restart at each handoff. Gap: the ER flow starts at the hospital; EMS is open; acceptance below
- E1 — As a hospital integrator, I want HATS exposed as standard FHIR R4 resources, so that our EHR consumes it like any other source. Covered: Architecture
- E7 — As a hospital integrator, I want every policy label to be a published code (HL7, NUCC, LOINC), so that I can map HATS onto systems we already have. Covered: ER flow
2.4 Legal
People who reach records because the law permits or compels it, not because they treat the patient or build the software. The custodian decides and produces; HATS records it. See Legal Process.
- L1 — As a judge, I want production under my order recorded — who produced what, who acted on my behalf, under which order — so that compliance is beyond dispute. Covered: Legal Process
- L2 — As an attorney for a party in litigation, I want what a custodian produced to me recorded against the subpoena it answered, so that production is verifiable. Covered: Legal Process
- L3 — As a law-enforcement officer with a warrant, I want notice to the patient delayed when the warrant requires it, so that an investigation isn't compromised. Covered: Legal Process
- L4 — As a medical examiner, I want the records my statutory duty requires, recorded under the right purpose code, so that the disclosure is accounted for. Covered: Legal Process
- L5 — As a patient, I want to see every record produced for legal process, even if notice was delayed, so that legal access is never invisible. Covered: Legal Process
2.5 Coordinator
Half of the center: the spec, not a service or an organization. Every corner works out its requests from the same published policy, so nothing passes through it; it stores no records and decides nothing about any patient. See Why a coordinator.
- E8 — As a spec maintainer, I want the policy to know the rules and never the records — menus built only from policy, identical for every patient, and no part in any read — so that maintaining it never makes me a store of anyone's health data. Covered: Asking for access
- E9 — As a spec maintainer, I want any standard PDS to work with HATS, so that every patient gets the same rules without a HATS-specific host. Covered: Why a coordinator
- E4 — As an emergency physician, I want no shared service in the path of a read, so that one being down never blocks an ER. Covered: only the patient's own managing app is asked (Asking for access)
- E3 — As an app developer, I want a documented path to get my app onto the accredited allowlist, so that I know what passing looks like before I build. Gap: client attestation exists upstream; the HATS accreditation process does not. Direction: Trusting coordinators
- E10 — As a builder, I want to run HATS without depending on any one operator, so that no single operator is the only way to run it. Covered: the coordinator is the spec, and anyone can build a managing app (Why a coordinator)
2.6 Builders
The other half of the center: the people who write the spec, the apps, and the hosts, and build on the published pieces. They work for every corner equally — the patient's apps as much as the hospital's nodes.
- E2 — As an app developer, I want standard atproto OAuth with
space:scopes and a published permission set, so that my consent screen is legible without custom work. Covered: ATProto Mapping - E6 — As an engineer, I want realistic test patients with no real PHI, so that I can develop against HATS without a BAA. Designed: Prototype (synthetic Synthea patients)
- E5 — As a self-hoster, I want my own PDS to work with any hospital, so that self-hosting is never a second-class choice. Covered: Autonomy Spectrum
- E11 — As an app developer, I want HATS's record types published as lexicons under one authority, built from existing standards (IPS sections, HL7 confidentiality, FHIR), so that I can build on HATS without a bespoke vocabulary. Covered: Lexicon Namespaces, published from
@hats.health(Publication) - E12 — As an engineer, I want a thin end-to-end slice running on modest hardware, so that I can see the ER flow work before building a product around it. Designed: Prototype
2.7 One person, several roles
Identity spans corners. One human can be a patient, a clinician at an institution, and a builder at once — often at the hospital they work for. A person is a set of DIDs, and the system has to know which one is acting. Clinical informatics is a board-certified subspecialty, and many hospitals have a CMIO: the physician-informaticist is HATS's most likely early adopter and its classic insider risk. See Identity & Circles.
- X1 — As a physician-informaticist, I want to wire HATS into my own department's EHR, so that I can show it working before asking anyone to fund it. Covered by design: Architecture — run an institution node and point the EHR at it
- X2 — As a physician-informaticist, I want synthetic patients to test against, never my own chart or a colleague's, so that piloting never touches real PHI. Designed: Prototype (synthetic Synthea patients)
- X3 — As a clinician who is also a patient, I want to choose which identity I'm using in each system, and have the system offer to switch when I'm clearly in the other role, so that I'm never locked out of either. Covered: Identity & Circles
- X5 — As a clinician who keeps work and personal accounts apart, I want the two DIDs linked privately by mutual signature, so that the system can tell when I'm reading my own chart without the link ever being public. Covered: Identity & Circles; where the link lives is open
- X4 — As a clinician treating my own family in an emergency, I want access to work and be reviewed afterwards, not blocked, so that the rules never cost a life. Covered: Identity & Circles
2.8 Edges and center
Each pair of corners meets at one main interaction, and each needs to work for both sides at once.
The center ties to every corner equally:
2.9 Acceptance: the ER visit
One scenario that runs from institution to patient under the published policy, on an app the builders shipped.
2.10 Acceptance: the street call
The EMS scene: a fire department crew, then a private transport crew, then the ER. Only identifying the person from the card is specced (Threshold Authority); every other step is a Gap.
2.11 Gaps
- Build the institution node (C3, E1, X1) — designed in Architecture; nothing exists yet, and it's what clinicians and integrators actually touch
- Record integrity minimums (C4) — the socket is designed in Record Integrity; which providers each collection requires is still open
- Upstream retention acknowledgment (C5) — HATS's answer is in Regulatory Model; upstream still expects syncers to delete on space deletion
- ER latency target (C1) — define "within a minute" end to end, card tap to rendered allergies
- Accreditation process (E3) — who accredits institutions and managing apps. Direction: a HATS Inferno test kit for conformance, TEFCA's designation model for accreditation (Trusting coordinators)
- Synthetic-data sandbox (E6, E12, X2) — live in the demo
- Lexicon publisher (E11) — published from
@hats.health(Publication) - Patient-facing migration (P9)
Glossary
HATS's everyday words beside FHIR's and HIPAA's. The data uses FHIR's resources; the prose uses plain words; this table keeps the two from drifting apart. A new term should land here before it lands anywhere else.
3.1 Notes
- 45 CFR 160.103, Definitions: “Individual means the person who is the subject of protected health information.”
- 45 CFR 160.103, Definitions: “Workforce means employees, volunteers, trainees, and other persons whose conduct, in the performance of work for a covered entity or business associate, is under the direct control of such covered entity or business associate”
- 45 CFR 160.103, Definitions: “Health care provider means a provider of services … and any other person or organization who furnishes, bills, or is paid for health care in the normal course of business.”
- 45 CFR 164.502(g)(1), Uses and disclosures of protected health information: General rules: “Standard: Personal representatives. As specified in this paragraph, a covered entity must, except as provided in paragraphs (g)(3) and (g)(5) of this section, treat a personal representative as the individual for purposes of this subchapter.”
- 45 CFR 164.508(a)(1), Uses and disclosures for which an authorization is required: “Except as otherwise permitted or required by this subchapter, a covered entity may not use or disclose protected health information without an authorization that is valid under this section.”
Roles
HATS.user defines six roles with distinct trust levels and data access scopes.
4.1 Patient
The space authority: every health.hats.records.* space and the health.hats.audit.log space sit under the patient's DID. The patient controls access — by card + PIN, or through an act circle member — and every grant lands in their audit log.
Controlling a space is not hosting everything in it. Records a provider authors live in that provider's own repo inside the patient's space; the patient's repo holds only what the patient authored.
No one reads the patient's spaces or writes into them without a grant from the patient or an act member, or an audited emergency grant (ER flow).
4.2 Provider (Consumer)
A clinician, at a hospital or clinic or in their own practice, granted read access to named IPS-section spaces during an active care relationship.
- Reads the granted spaces with short-lived space credentials (10 minutes by default), renewed while the grant is active —
Nconfidentiality only unless the patient grantsR - Writes encounter notes into their own repo inside the patient's
health.hats.records.encountersspace, signed by them, never into the patient's repo. The patient controls the space; the author holds custody of what they wrote, and their institution keeps its copy - Loses live access when the patient revokes the yes or its credential changes: the host stops minting, and outstanding credentials lapse within their lifetime (10 minutes by default, at most 60), or sooner via
notifyCredentialRevoked - Does not keep syncing after discharge
4.3 Backup Provider
A provider whose institution node keeps syncing the patient's spaces while authorized. Space credentials are always read-only and last at most 60 minutes, so a backup provider is simply a syncer that keeps renewing. Institution nodes in one hospital also serve each other by LAN peer fetch.
- Authorized by an ordinary
health.hats.provider.grantwhose window outlasts the visit - Its local copy serves the institution's LAN through outages (Offline operation)
- When the grant ends, renewals stop and nothing new syncs
- Keeps its copy of what its people authored
- Post-care retention — it keeps what it authored and what it relied on for the state retention period; retention law governs everything else synced (Regulatory Model). Open only: upstream acknowledging that exception (Upstream)
- The patient sees the grant and its window in
health.hats.audit.log
4.4 Guardian
A circle member with an act delegation — see Identity & Circles.
4.5 Validator
A licensed, accredited healthcare institution that countersigns notarized-consent attestations — vouching for the existence and timing of a provider's consent assertion, not its truth. Eligibility piggybacks on institutional accreditation (NPI, Joint Commission); selection must be non-collusive (open problem). See Threshold Authority & Notarized Consent.
Identity & Circles
Two questions every access decision depends on: who is acting — one person, who may hold more than one DID — and who acts with or for a patient — their circle.
A guardian is one kind of circle member (below).
5.1 People act, institutions don't
Every grant names a person, and every access is one person's. An institution gives its clinicians a home: it credentials them, grants them privileges, provides the place and the equipment, and answers for its staff. That's real authority, and it's why the published policy names the institutions HATS accredits and who may issue credentials for each. But an institution never cuts, hands over pills, or pushes the button on a machine, and in HATS it never reads, writes, or breaks the glass either: people don't get to hide behind a company. It doesn't own them: a clinician's account is as much theirs as a patient's is. A hospital may host it on its PDS or it may live elsewhere, it's credentialed the same either way, and it moves with them when they leave. An institution is only ever someone acting for it: an automated job acts for the person who set it up and answers for it, and the key on its account signs repo commits as plumbing, never as anyone's word. At most an institution holds a grant on a patient's behalf to pass on to its own clinicians, and each access under it is still a named clinician's, under their own DID, in the patient's audit log.
So an institution node is software working for its clinicians: the space credentials it holds are each a clinician's, from that clinician's delegation, and a privacy officer reviewing access sees people, not a hospital.
5.2 A person is a set of DIDs
Identity stays the DID. A person may use one DID for everything, or keep separate DIDs for personal and work life. HATS supports both, and runs policy over the set, so the two models behave the same.
One DID is just a set of size one.
5.3 One DID across apps
A patient's DID can be the one they already use on Bluesky or any other atproto app. One account is the point of atproto, and spaces exist so private data can sit under the same identity as public posts. HATS shares the DID, never the social layer: nothing about a person's health shows in their DID document, their public repo, or the PLC log.
The catch is hosting. A patient's own records, the ones they import and the grants they sign, sit in their space repos on their account's PDS: the same PDS that hosts their posts (Upstream). So a shared DID needs a PDS that has taken on health data: the patient's own, a first-contact custodian, or a public-benefit host. Social apps don't care where an account's PDS is, so the patient moves there and keeps posting under the same handle. Someone who'd rather stay on a social provider's PDS keeps a separate DID for health.
The limit: a DID document names its PDS. If that host serves mostly health data, the name alone hints at it, and it says less the more general-purpose hosts take health data on.
5.4 Linking DIDs
- Mutual — each DID signs a statement naming the other, using the same attestation mechanism as Record Integrity. Neither side can link or unlink alone
- Private — the link is never in a DID document or a public repo: each DID's signed statement naming the other sits in a space of its own. A public work ↔ personal link is a harassment risk for some clinicians (abortion providers are the obvious case)
- Declared — for clinicians, declaring a linked personal DID is a credentialing obligation, like a conflict-of-interest disclosure
- Audited — unlinking is recorded and reviewed. Quietly dropping a link is exactly what someone planning to snoop would do
5.5 Choosing which identity to act as
The person chooses; the system helps; nobody gets locked out.
- The person picks which identity to use with any given system, and the system honors it
- The system suggests — if a patient DID linked to a clinician who works here starts doing clinician things, the system asks "Continue as Dr. X?" and switches to the clinician DID on confirmation. The same works in reverse
- Attribution follows the identity actually used. This is the one hard invariant: every action is recorded against the DID that performed it, which is what keeps access accountable
5.6 Self and circle access
A clinician acting on their own record, or on someone in their own circle, is allowed and flagged — never blocked. Clinicians do treat family in emergencies.
Reading one's own chart is harmless through either identity; the risk is in writes and orders.
5.7 Circles
A circle is a set of DIDs around a patient, each with its own delegation. No family structure is assumed: circles can overlap, and chosen family is as valid as any other.
Delegations, from least to most authority:
In the first version, the only delegates are parents for their children: a parent says yes and no for their child, signing with their own key, and the patient's managing app honors it at n and r while the delegation is in force: the parent is the responsible party, so every request reaches them. Care the law leaves to the minor alone stays under the minor's own account, and v and 42cfrpart2 stay the patient's own until their modules. The delegation is a FHIR Consent in the child's ledger. Every other delegation, representatives by law such as a spouse under state surrogate law or a court-appointed guardian, minors' confidential care and coming of age, and how a patient's and a delegate's answers rank, comes later.
A guardian is a circle member with an act delegation. Precedence for an incapacitated patient is unchanged: Guardian → Threshold → Break-glass, with the ER exception that guardians are notified rather than waited on (see ER flow).
Everything here is an existing part:
5.8 Circles as conflict detection
A clinician's own declared circle doubles as their close relations for conflict checks. Clinical access to a circle member through the clinician role follows the self-access table above.
The honest limit: circles are self-declared, so a clinician can leave out an ex — the classic snooping target. HATS can't prevent that. It catches it afterwards: every access is attributed and reasoned, so review can find it. This is access is accountability doing its job.
5.9 Open Questions
- An institution's grant, passed on — "at most hold a grant to pass on to its own clinicians" isn't designed: how a place's clinicians take up a grant made to it, and how each access stays a named person's
- Re-delegation — can a
viewmember pass access on? Probably not;actonly - Circle visibility — does a member see who else is in the circle?
- Undeclared relations — inferring relations beyond declarations (shared address, shared insurance) would catch more but is invasive. Leaning no
- Who reads a link — each statement sits in its DID's own space, so conflict detection needs someone holding a yes to read it. Who, and on what yes, is open
- Groups spec — track the atmosphere groups working group and adopt rather than define
- Staying on a social PDS — a patient's space repos live on their account's PDS, so keeping a social provider's PDS means a separate health DID. Accept that, or press upstream for a separate space-repo host?
5.10 Notes
- 45 CFR 164.502(g), Uses and disclosures of protected health information: General rules: “Standard: Personal representatives. As specified in this paragraph, a covered entity must, except as provided in paragraphs (g)(3) and (g)(5) of this section, treat a personal representative as the individual…”
Access Flows
These flows come down to what the patient said: at each pass the patient's PDS asks the patient's managing app, which answers from their records, and mints a credential only while a yes holds. Nothing else is in these reads: the asker works out how to ask from the published policy (Asking for access). Patient signing happens on the HATS card — one PIN-gated chip card, contact + contactless. Everyday approvals use its FIDO2 side via WebAuthn in any browser, or a registered passkey; rare master-key operations use its PIV side, tapped on the native HATS app or at a health-facility kiosk or laptop tool with a USB reader. The card is the control plane; any device is just a reader. Full situational table — including notarized consent for the conscious-but-can't-sign case — lives in Threshold Authority & Notarized Consent.
6.1 Routine Care
- Patient arrives at clinic; the card's DID (readable without the PIN) says whose spaces to ask about
- The clinic's institution node works out what it may request for this visit from the published policy (Asking for access), reason
TREAT, then asks for the sections it needs — e.g. problems, medications, allergies — plus write tohealth.hats.records.encounters: aproposedConsentin its own repo in the patient's ledger, naming the role it asks with, and a notice in the patient's inbox - Patient (or an
actcircle member) answers via card + PIN: aConsentin their own repo in their ledger,activeorrejected, citing the request, with a notice in the clinic's inbox - At each pass, the patient's managing app checks the yes and the clinician's current role: active, at an institution the policy accredits, and the one the yes names
- The clinic's institution node gets short-lived credentials (10 minutes by default) per granted space, as in the ER flow —
Nconfidentiality only unless the yes namesR - The institution node syncs those spaces, renewing credentials while the yes holds, and serves them to the clinic's EHR
- Visit notes go into the clinician's own repo inside the patient's
health.hats.records.encountersspace - The yes ends at discharge, for this stay, at its end date if it has one, or when the patient revokes it, with its
inactiveversion. A no refuses every new pass at once; a pass already issued reads until it expires, 10 minutes by default, so a no is best effort for those minutes. A clinician who leaves or changes role voids the yes, with no one revoking. What the clinic already read stays theirs; updates stop
6.2 Admission + Backup
- The hospital asks as above, for this stay. Asking once for a whole care team, and again at each handoff, comes later. To stay a Backup Provider, it asks for a yes until revoked
- Patient (or an
actcircle member) answers each ask - The hospital's institution node syncs the granted spaces and keeps renewing; its local copy serves the ward through outages (Offline operation)
- Inpatient notes and the discharge summary go into each clinician's own repo in
health.hats.records.encounters - Discharge ends the admission's yes, which lasts the stay: whoever discharges the patient writes the finished
Encounterinto the patient's ledger. A hospital the patient keeps as a Backup Provider holds a separate yes, until revoked. Credentials were always read-only, so there's nothing to downgrade; renewals stop and syncing ends - The hospital keeps its copy of what its people authored, plus what it relied on; retention law governs the rest of its synced copy (Regulatory Model). Open only: upstream acknowledging that exception (Upstream)
6.3 Notarized Consent (conscious, can't sign)
For a patient who can verbally consent but cannot digitally sign (card lost, PIN forgotten, card in a property bag). It comes after the first version, with the rest of representation; until then, only a yes they already gave or break-glass opens their record:
- Treating provider asserts patient consent
- A Validator (a named person at a licensed institution, non-collusively selected) countersigns the existence and timing of the assertion — not its truth
- The provider who acted records a temporary yes, carrying both attestations, in their own repo in
health.hats.audit.log. How the patient's managing app would admit a yes the patient didn't sign comes with it - Patient reissues card later via quorum; attested grant surfaces for review on reclaim
6.4 Break-Glass (Emergency Access)
Emergency access — required reasons, role-based tiers, break the glass — is the ER flow.
ER: Unresponsive Patient, No Prior Record
The baseline hard case HATS has to handle. A patient arrives at an emergency department unresponsive. This hospital has never seen them. They have a HATS account. No guardian is on hand.
This is HATS's emergency-access flow, built on the atproto spaces alpha (proposal 0016).
7.1 Shape
Three separate problems, solved by three separate pieces:
The coordinator is the spec (Why a coordinator): the published policy says how to ask and what each role may open, and every app works it out the same way. Nothing runs in any read but the patient's managing app.
7.2 Identify
The patient's HATS card (a chip card, contact + contactless; see Threshold Authority) carries their DID in a field readable without the PIN, plus a printed QR fallback. Reading the DID grants nothing; it only says whose spaces to ask about.
DID → PDS resolution is ordinary atproto identity resolution. No HATS directory is involved.
No card on them: register as a Doe patient, exactly as today. Link the Doe chart to the DID once the patient is identified. HATS does not maintain a central demographic or biometric index — that index would be the highest-value breach target in the system and recreates the silo HATS exists to remove.
7.3 Request emergency access
Every emergency request carries a reason. Routine emergency access is scoped by tiers; break the glass is a recorded override of them. There is no reasonless path.
Reason
A required code from HL7 v3 PurposeOfUse. There is no free-text reason.
code— one ofERTREAT(emergency room treatment),ETREAT(emergency treatment, e.g. EMS in the field), orBTG(break the glass)description— clinical context, in the doctor's words: their own record atr, written after the claims and citing each of them, since how sensitive it is follows the underlying issue, not the fact of an emergency. Optional forERTREAT/ETREAT; required forBTG, because it is what an after-the-fact review weighs. Access doesn't wait on it: break the glass skips only the patient's yes, and everything after the claim runs as any access does. Never a substitute forcode
The reason's codes are committed to each claim before any credential is issued.
There are two levels of emergency access:
Two spaces sit outside the IPS sections and follow their own rule:
health.hats.records.patientopens with any emergency access —Patient/$summaryneeds its subject- Prior
health.hats.records.encountersandhealth.hats.records.consentopen only withBTG
ERTREAT covers most ER visits without anyone having to break anything. BTG is for when the clinician judges they need more.
Label convention
HATS invents no vocabulary for policy. Every label is a code from an external, battle-tested standard; HATS only packages them.
Case depends on where the code lives:
- Inside FHIR resource bodies —
meta.security,Consent.provision.*,AuditEvent.purposeOfEvent, and any HATS field whose value lands in one, such as a claim's reason — a code keeps its code system's exact case:ERTREAT,207P00000X,R. HL7 code systems are case-sensitive, soertreatis not a valid PurposeOfUse code - HATS-owned identifiers and storage — skeys, indexes, and HATS's own fields that never enter a FHIR body — are stored lowercase:
ertreat,207p00000x,r. Comparison happens on the stored form, so case can never split one code into two. They are rendered in the standard's own case
Record categories: IPS sections
The HL7 FHIR International Patient Summary (IPS) already defines "what a clinician needs about an unknown patient," as LOINC-coded sections. HATS uses one space type per IPS section, so space boundaries — the unit of read access — line up with the standard.
Tiers
For ERTREAT / ETREAT, access is decided from two inputs:
- Clinician role — the NUCC taxonomy code on the
PractitionerRoletheir institution publishes (People) - Institution — the role counts only at an institution the published policy accredits, while it's active and inside its period, and only for a role code the emergency tiers list, which leaves out students and scribes
The role table is HATS policy; every entry in it is a standard code.
The radiologic technologist row is the RBAC point in miniature: allergies (contrast reactions) and prior results, nothing else. Inpatient, critical care, neurology, and psychiatry tiers come later.
Renewal past the window requires a new claim with a new reason.
Sensitivity
Sensitive data is labeled with HL7's own scheme rather than a HATS one, and kept in separate spaces so labels apply at the space boundary:
- Confidentiality —
N(normal),R(restricted),V(very restricted) - Sensitivity — records tagged
ETH,SUD,BH,MH,PSY,HIV,STD,SEX,SDV, orGDISlive in their own spaces labeledR. Psychotherapy notes (PSYTHPN) are labeledV
Break the glass
BTG trusts the clinician's judgment in a life-threatening situation and settles it afterwards. It does not prevent access; it makes access deliberate, attributable, and reviewed. This is the ATS accountability thesis applied directly: lying (or snooping) isn't made impossible, it's made expensive and permanently visible.
- Who — any clinician whose role counts, at an accredited institution, with a role code the emergency tiers list. Role does not cap
BTG; accountability requires a known, accountable party, so a clinician no accredited institution vouches for cannotBTG - Opens — every section at
nandr, prior encounters, and consent records. Part 2 records and psychotherapy notes get their own spaces later. Part 2 permits disclosure in a bona fide medical emergency[1]42 CFR 2.51, Medical emergencies: “patient identifying information may be disclosed to medical personnel to the extent necessary to: (1) Meet a bona fide medical emergency in which the patient's prior written consent cannot be obtained”; psychotherapy notes need the patient's specific authorization under HIPAA[2]45 CFR 164.508(a)(2), Uses and disclosures for which an authorization is required: “Authorization required: Psychotherapy notes. Notwithstanding any provision of this subpart, other than the transition provisions in § 164.532, a covered entity must obtain an authorization for any use or disclosure…” for every use except the few the rule lists, chiefly their author's own treatment, so no HATS emergency override will open them. Disclosures the law itself permits are the custodian's call, recorded per Legal Process - Window — the policy's window from the claim's time; a claim dated in the future counts for nothing. A
110138records that the emergency ended - Notifies — the patient and every circle member with
notifyor higher (Circles), through their inbox. Until hosts push inbox writes, they hear of it when they next open their app - Review — every
BTGlands in the institution's privacy-officer review queue. HIPAA already requires access audits; HATS hands them a signed record instead of a log export
R sensitivity categories line up with existing law: 42 CFR Part 2 permits disclosure of substance-use records in a bona fide medical emergency, which is the BTG case. Documenting that disclosure is the Part 2 program's duty, and the patient's managing app admits without it, so the Part 2 module has to tell those records' authors of each claim that opens them.
The claim
There's no request to make in an emergency: the clinician records a claim, and the patient's managing app admits them on it.
- Find the patient. A clinician with no way to know the patient's DID has nothing to connect to: patients are invisible until met. The card is how an ER usually learns it (Identify); with no card, the patient is a Doe. A clinician who already knows someone's DID can break the glass without meeting them, and their claim and its review answer for it
- Record the claim first, before reading: a FHIR
AuditEvent,typeDCM110113Security Alert,subtypeDCM110127Emergency Override Started, naming their role, the reason code, and the emergency picked at the bedside, as a code from a value set of presenting findings drawn from SNOMED CT (Unresponsive,422768004), signed by the clinician. It goes in the patient's ledger, in the clinician's own repo there, at exactly the highest level of the spaces it names: breaking the glass on sections atnandris two claims from one tap, each signed by the clinician's key. The doctor's details follow as their own record atr, citing both;BTGrequires them. The demo doesn't yet: it writes one claim at the higher level, and keeps the picked reason as words, not a code - The patient's managing app admits them only on a claim it finds there naming them, for what the menu offers their role for the claim's reason, for the menu's window from the claim's time
- The record lives with everyone affected: the claim in the patient's ledger and in the clinician's own ledger, with a notice in the patient's inbox. A copy to the clinician's institution comes later
- It ends with an
AuditEvent,subtypeDCM110138, one per claim at its level, citing it, recording that the emergency ended. The demo doesn't write these yet
Nothing else is in it: the tiers come from the published policy. No HATS flow deletes a claim. A clinician can still delete what they wrote, so the paper trail is what others hold: the pass records the patient's managing app wrote, and the patient's record of the claim.
7.4 Read
Standard atproto spaces credential flow, per space the yes or the claim opens. The institution node holds the credentials and syncs; the EHR is its client and never holds a space credential (Architecture).
- The institution node gets a delegation token from the clinician's PDS (
com.atproto.space.getDelegationToken) - It calls
com.atproto.space.getSpaceCredentialon the patient's PDS with the delegation token and its client attestation - The patient's PDS asks the patient's managing app (
checkUserAccess), which checks the yes or the recorded claim and the clinician's current role, records the pass, and answers. When it's unreachable, the PDS says no, so an emergency fails closed - The patient's PDS mints a short-lived credential (10 minutes by default, at most 60)
- The institution node syncs the space, renews credentials while the yes holds or the claim's window lasts, and serves the EHR over FHIR
When the window closes, no more credentials are minted. Outstanding credentials lapse within their lifetime, 10 minutes by default. The protocol defines notifyCredentialRevoked for cutting one short, but the reference PDS never sends it, so a no is best effort for those minutes.
7.5 Write back
The ER note does not go into the patient's repo — under atproto spaces, every account writes only to its own space repo. The clinician writes the encounter into their own repo inside the patient's health.hats.records.encounters space, signed by them. The patient's space host tracks that write only while the clinician's yes, or their claim, covers writing there. When a write yes ends, later writes go untracked, and earlier ones stay findable.
The patient controls the space; the clinician holds custody of what they wrote, and their hospital keeps its copy. ATS Foundations carries the same custody-vs-authorship model.
7.6 Close out
- The claim's window closes, or a
110138ends it; no further credentials - Patient (on recovery) or an
actcircle member reviews every break-glass claim in their audit space, each delegate as far as their relationship reaches (Data Security) - Asking resumes as usual: the patient, or an
actcircle member, answers yes or no
7.7 Setup prerequisites
Done at onboarding (or by the first provider, per Progressive Onboarding):
- The full set of
health.hats.records.*spaces — every section at every applicable skey — created empty viacom.atproto.space.createSpaceasmanagedspaces naming the patient's managing app, atnandr(Upstream) - A
health.hats.audit.logledger atnandr, also amanagedspacenaming the managing app, which lets anyone write it, and the patient and their delegates in force read it, each delegate as far as their relationship reaches: anyone asking, reading, or breaking the glass records it there, in their own repo - A
health.hats.inbox, the same, read by its owner - DID written to the card
Clinicians need an atproto DID and an OAuth session held by their institution node. A hospital usually hosts its staff's accounts on its own PDS, and they're credentialed the same wherever they live.
7.8 Guardian
A guardian is a circle member with an act delegation (Identity & Circles). Existing precedence is Guardian → Threshold → Break-glass. An unresponsive ER patient cannot wait on a guardian's reply, so this flow notifies the circle in parallel rather than blocking on them. This is a deliberate softening of the precedence rule for the emergency case. Nothing else acts for an unresponsive patient: a yes they already gave goes on working, and nothing new gets in but break-glass or a guardian or act delegate they designated. In the first version, the only delegates are parents for their children. Whether a patient in crisis, delirious or intoxicated, can say no or revoke in the middle of an emergency follows legal precedent.
7.9 Open Questions
- Before the ER: EMS — this flow starts at the hospital door, but emergencies start in the street. A street call in Seattle, for an unhoused person on the side of the street: two Seattle Fire Department units arrive with seven staff between them — what looked like a couple of supervisors, someone in a lab coat, and a couple of EMTs — with portable monitors and a couple of tablets. Then a three-person private ambulance crew arrives and takes the person away on a gurney. That split is how Seattle runs transport: Fire's Medic One units carry life-threatening cases, and the City contracts basic life support (BLS) transport to a private ambulance company (Seattle Fire). What the scene adds:
- Who needs what. Ten people touch the call; only those treating need the field set. The supervisors likely need nothing, and the transport crew needs it only once the person is theirs. The tier table has one EMS row for paramedics and EMTs alike, though NUCC tells them apart (Paramedic
146L00000X, Intermediate EMT146M00000X, Basic EMT146N00000X). Whether they should differ is a clinical call - The field set. The EMS row's sections, with the POLST first. In Washington, POLST is the physician order that tells emergency responders whether to resuscitate, and copies and digital images are valid (WSMA), so one shown from HATS is the order itself
- Field conditions. A phone or tablet on cell coverage, no kiosk, no institution node on a LAN. Offline operation serves only what a node already holds, and a crew holds nothing about a stranger: with no signal, the card's face and chip are all there is
- Records written in the field. The monitors produce vitals and ECGs; the tablets hold the patient care report, in NEMSIS, the national EMS data standard. Each becomes a record authored by the crew member, naming the device, and reaches the ER before the patient does, or queues until there is signal
- Two handoffs. Fire to the private crew at the curb, the private crew to the ER at the door. Each passes access to whoever now has the patient, ends the previous agency's, and carries the report along. The EMS row is a flat 4h; the physician and nurse rows end at handoff, but only inside one hospital, and a transfer moves access only between hospitals. Each agency is also its own institution standing input, with its own accredited client
- Identifying the person matters most here: the card's photo and identity credential, or a bracelet
- Who needs what. Ten people touch the call; only those treating need the field set. The supervisors likely need nothing, and the transport crew needs it only once the person is theirs. The tier table has one EMS row for paramedics and EMTs alike, though NUCC tells them apart (Paramedic
BTGreview outcomes — the record settles what happened; who decides whether it was justified, and what follows, is external (privacy officer, licensing board, courts). Does HATS define a review-outcome record, or stay out of it?- Role granularity — each institution attests its own staff's roles (People), but NUCC taxonomy codes are coarse. Can they tell an attending from a resident?
- Coding the emergency — the bedside codes are a value set of presenting findings drawn from SNOMED CT, never a diagnosis. Open: which codes it holds, and whether the code sits in
purposeOfEventbeside the PurposeOfUse code or in a field of its own - Abuse detection — rate limits and anomaly review (an imaging tech requesting break-glass on many patients). Post-hoc review only, or real-time throttling?
- Patient PDS unreachable — this flow assumes the patient's PDS is up. Without its space host no new credentials are issued, so the floor is whatever an institution node already holds locally (Offline operation, LAN peer fetch).
- LOINC on the space type — the IPS section ↔ NSID mapping is published in Lexicon Namespaces. Open: a machine-readable field for the LOINC code on the space type declaration, if upstream allows extra fields.
7.10 Notes
- 42 CFR 2.51, Medical emergencies: “patient identifying information may be disclosed to medical personnel to the extent necessary to: (1) Meet a bona fide medical emergency in which the patient's prior written consent cannot be obtained”
- 45 CFR 164.508(a)(2), Uses and disclosures for which an authorization is required: “Authorization required: Psychotherapy notes. Notwithstanding any provision of this subpart, other than the transition provisions in § 164.532, a covered entity must obtain an authorization for any use or disclosure…”
Legal Process
Legal requests are not HATS's to decide. Process is served on whoever holds the records — and under atproto spaces each author holds what it wrote — so the custodian is the HIPAA disclosing party. It evaluates the instrument, may object or assert privilege, and produces what it holds. HATS records who did what, on whose behalf, under what authority, and makes it loud. That is the design ceiling: the protocol produces evidence; the legal system decides.
8.1 What HATS does
8.2 The disclosure record
The person who made the disclosure writes the record into their own repo inside the patient's health.hats.audit.log space, signed with their author attestation.
Reason codes
HL7 v3 PurposeOfUse, per the label convention:
8.3 Notifications
8.4 Delayed notice
- Accounting suspension — HIPAA requires a covered entity to temporarily suspend a patient's right to an accounting of disclosures to a health oversight agency or law enforcement official[1]45 CFR 164.528(a)(2), Accounting of disclosures of protected health information: “The covered entity must temporarily suspend an individual's right to receive an accounting of disclosures to a health oversight agency or law enforcement official, as provided in § 164.512(d) or…”. A written statement must give the time period; an oral statement must be documented and lasts at most 30 days
- Other delays — sealing orders and grand-jury secrecy come from the instrument itself, not from HIPAA
- During a delay the custodian keeps the disclosure record in its own non-public storage, not in the patient's audit log. When the delay ends, it writes the record and the notifications go out
8.5 Protected records
Some records carry stricter law than a confidentiality level expresses. They get both protocol enforcement and portable labels:
- Their own sibling space — Part 2 records live in a space keyed
42cfrpart2(the HL7 policy code), next to the section'snandrspaces. It takes its own credential, so opening a section'srspace never exposes them. See Lexicon Namespaces - Atomic labels on every record — in FHIR
meta.security, all HL7 codes. Labels travel with every copy, which Part 2 requires once a record leaves the space:
What Part 2 requires of a custodian producing such records [2]42 CFR Part 2, Subpart E, Court Orders Authorizing Use and Disclosure: “Effect. An order of a court of competent jurisdiction entered under this subpart is a unique kind of court order. Its only purpose is to authorize a use or disclosure…”:
- Two instruments — a court order authorizing disclosure does not compel it; a subpoena or other compulsory process is also required [3]42 CFR 2.61, Legal effect of order: “Effect. An order of a court of competent jurisdiction entered under this subpart is a unique kind of court order. Its only purpose is to authorize a use or disclosure…”
- Noncriminal matters [4]42 CFR 2.64, Procedures and criteria for orders authorizing uses and disclosures for noncriminal purposes: “Application. An order authorizing the use or disclosure of patient records or testimony relaying the information contained in the records for purposes other than criminal investigation or prosecution may be…” — notice to the patient and the holder, with a chance to respond; good-cause findings; the order limited to the essential parts and named persons
- Criminal investigation of the patient [5]42 CFR 2.65, Procedures and criteria for orders authorizing use and disclosure of records to criminally investigate or prosecute patients: “Application. An order authorizing the use or disclosure of patient records, or testimony relaying the information contained in those records, to investigate or prosecute a patient in connection with a…” — stricter findings, and notice to the holder
- The restriction follows the record — it binds every holder, including institution nodes that synced it [6]42 CFR 2.12(d)(1), Applicability: “Applicability to recipients of information— (1) Restriction on use and disclosure of records. The restriction on the use and disclosure of any record subject to the regulations in this part…”
A HIPAA-valid order without a Part 2 order produces everything except records labeled 42CFRPart2. The emergency path is unaffected: Part 2 permits disclosure in a bona fide medical emergency[7]42 CFR 2.51, Medical emergencies: “patient identifying information may be disclosed to medical personnel to the extent necessary to: (1) Meet a bona fide medical emergency in which the patient's prior written consent cannot be obtained”.
8.6 HIPAA reference for custodians
The custodian's evaluation, not HATS's — included so the disclosure record can name its basis.
Also excepted from the psychotherapy-notes authorization rule: the therapist's own disclosure to avert a serious and imminent threat (164.512(j)(1)(i)[17]45 CFR 164.512(j)(1)(i), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Is necessary to prevent or lessen a serious and imminent threat to the health or safety of a person or the public; and (B) Is to a person or persons…”), and a covered entity defending itself in an action brought by the patient (164.508(a)(2)(i)(C)[18]45 CFR 164.508(a)(2)(i)(C), Uses and disclosures for which an authorization is required: “Use or disclosure by the covered entity to defend itself in a legal action or other proceeding brought by the individual; and”).
Scope. Required-by-law disclosures are limited to what the law requires (164.512(a)(1)[19]45 CFR 164.512(a)(1), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Standard: Uses and disclosures required by law. (1) A covered entity may use or disclose protected health information to the extent that such use or disclosure is required by law…”), and minimum-necessary does not apply to them (164.502(b)(2)(v)[20]45 CFR 164.502(b)(2)(v), Uses and disclosures of protected health information: General rules: “Uses or disclosures that are required by law, as described by § 164.512(a); and”). Required-by-law disclosures must still meet 164.512(c)[21]45 CFR 164.512(c), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Standard: Disclosures about victims of abuse, neglect, or domestic violence—(1) Permitted disclosures. Except for reports of child abuse or neglect permitted by paragraph (b)(1)(ii) of this section, a covered entity…”, (e), or (f) where those apply (164.512(a)(2)[22]45 CFR 164.512(a)(2), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “A covered entity must meet the requirements described in paragraph (c), (e), or (f) of this section for uses or disclosures required by law.”). Subpoenas without an order are subject to minimum-necessary (164.502(b)(1)[23]45 CFR 164.502(b)(1), Uses and disclosures of protected health information: General rules: “Standard: Minimum necessary— Minimum necessary applies. When using or disclosing protected health information or when requesting protected health information from another covered entity or business associate, a covered entity or…”).
The unwilling custodian is compelled by the court through contempt, as today. HATS does not route around a custodian's right to move to quash or assert privilege — in many states a therapist must assert psychotherapist–patient privilege for the patient.
8.7 Process served elsewhere
- The patient's PDS host — a consumer host is not HIPAA-covered, and stored-communications law[24]18 U.S.C. 2703, Required disclosure of customer communications or records: “Contents of Wire or Electronic Communications in Electronic Storage.—A governmental entity may require the disclosure by a provider of electronic communication service of the contents of a wire or electronic…” may apply instead. Hosts that join HATS commit to writing the same disclosure record
- The patient directly — the patient holds their own spaces; HIPAA does not reach them
8.8 Open Questions
- Legal identifiers — there is no standard identifier system for judges or courts; settle which
Identifier.systemvalues to expect - PDS host commitments — how a consumer host's commitment to write disclosure records is made and checked
- State law — states may be more stringent than HIPAA[25]45 CFR 160.203(b), General rule and exceptions: “The provision of State law relates to the privacy of individually identifiable health information and is more stringent than a standard, requirement, or implementation specification adopted under subpart E of…”, including shield laws for reproductive and gender-affirming care
8.9 Notes
- 45 CFR 164.528(a)(2), Accounting of disclosures of protected health information: “The covered entity must temporarily suspend an individual's right to receive an accounting of disclosures to a health oversight agency or law enforcement official, as provided in § 164.512(d) or…”
- 42 CFR Part 2, Subpart E, Court Orders Authorizing Use and Disclosure: “Effect. An order of a court of competent jurisdiction entered under this subpart is a unique kind of court order. Its only purpose is to authorize a use or disclosure…”
- 42 CFR 2.61, Legal effect of order: “Effect. An order of a court of competent jurisdiction entered under this subpart is a unique kind of court order. Its only purpose is to authorize a use or disclosure…”
- 42 CFR 2.64, Procedures and criteria for orders authorizing uses and disclosures for noncriminal purposes: “Application. An order authorizing the use or disclosure of patient records or testimony relaying the information contained in the records for purposes other than criminal investigation or prosecution may be…”
- 42 CFR 2.65, Procedures and criteria for orders authorizing use and disclosure of records to criminally investigate or prosecute patients: “Application. An order authorizing the use or disclosure of patient records, or testimony relaying the information contained in those records, to investigate or prosecute a patient in connection with a…”
- 42 CFR 2.12(d)(1), Applicability: “Applicability to recipients of information— (1) Restriction on use and disclosure of records. The restriction on the use and disclosure of any record subject to the regulations in this part…”
- 42 CFR 2.51, Medical emergencies: “patient identifying information may be disclosed to medical personnel to the extent necessary to: (1) Meet a bona fide medical emergency in which the patient's prior written consent cannot be obtained”
- 45 CFR 164.103, Definitions: “Required by law means a mandate contained in law that compels an entity to make a use or disclosure of protected health information and that is enforceable in a court of law…”
- 45 CFR 164.512(a), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Standard: Uses and disclosures required by law. (1) A covered entity may use or disclose protected health information to the extent that such use or disclosure is required by law…”
- 45 CFR 164.512(e)(1)(i), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “In response to an order of a court or administrative tribunal, provided that the covered entity discloses only the protected health information expressly authorized by such order; or”
- 45 CFR 164.508(a)(2)(ii), Uses and disclosures for which an authorization is required: “A use or disclosure that is required by § 164.502(a)(2)(ii) or permitted by § 164.512(a); § 164.512(d) with respect to the oversight of the originator of the psychotherapy notes; §…”
- 45 CFR 164.512(f)(1)(ii), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “In compliance with and as limited by the relevant requirements of: (A) A court order or court-ordered warrant, or a subpoena or summons issued by a judicial officer; (B) A…”
- 45 CFR 164.512(e)(1)(ii), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “In response to a subpoena, discovery request, or other lawful process, that is not accompanied by an order of a court or administrative tribunal, if: (A) The covered entity receives…”
- 45 CFR 164.512(g)(1), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Standard: Uses and disclosures about decedents—(1) Coroners and medical examiners. A covered entity may disclose protected health information to a coroner or medical examiner for the purpose of identifying a…”
- 45 CFR 164.512(d), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Standard: Uses and disclosures for health oversight activities—(1) Permitted disclosures. A covered entity may disclose protected health information to a health oversight agency for oversight activities authorized by law, including…”
- 45 CFR 164.502(a)(2)(ii), Uses and disclosures of protected health information: General rules: “When required by the Secretary under subpart C of part 160 of this subchapter to investigate or determine the covered entity's compliance with this subchapter.”
- 45 CFR 164.512(j)(1)(i), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Is necessary to prevent or lessen a serious and imminent threat to the health or safety of a person or the public; and (B) Is to a person or persons…”
- 45 CFR 164.508(a)(2)(i)(C), Uses and disclosures for which an authorization is required: “Use or disclosure by the covered entity to defend itself in a legal action or other proceeding brought by the individual; and”
- 45 CFR 164.512(a)(1), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Standard: Uses and disclosures required by law. (1) A covered entity may use or disclose protected health information to the extent that such use or disclosure is required by law…”
- 45 CFR 164.502(b)(2)(v), Uses and disclosures of protected health information: General rules: “Uses or disclosures that are required by law, as described by § 164.512(a); and”
- 45 CFR 164.512(c), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “Standard: Disclosures about victims of abuse, neglect, or domestic violence—(1) Permitted disclosures. Except for reports of child abuse or neglect permitted by paragraph (b)(1)(ii) of this section, a covered entity…”
- 45 CFR 164.512(a)(2), Uses and disclosures for which an authorization or opportunity to agree or object is not required: “A covered entity must meet the requirements described in paragraph (c), (e), or (f) of this section for uses or disclosures required by law.”
- 45 CFR 164.502(b)(1), Uses and disclosures of protected health information: General rules: “Standard: Minimum necessary— Minimum necessary applies. When using or disclosing protected health information or when requesting protected health information from another covered entity or business associate, a covered entity or…”
- 18 U.S.C. 2703, Required disclosure of customer communications or records: “Contents of Wire or Electronic Communications in Electronic Storage.—A governmental entity may require the disclosure by a provider of electronic communication service of the contents of a wire or electronic…”
- 45 CFR 160.203(b), General rule and exceptions: “The provision of State law relates to the privacy of individually identifiable health information and is more stringent than a standard, requirement, or implementation specification adopted under subpart E of…”
Regulatory Model
Health law attaches to who is regulated, not to who owns the data. HATS doesn't escape the law; it moves each obligation to whoever actually holds the data.
10.1 Who is regulated
Each host is regulated because it can read what it holds: spaces control access, not encryption (Data Security).
10.2 Retention
- Retention periods come from state law (commonly 5–10 years, longer for minors). HIPAA's own six-year rule covers compliance documentation, not charts
- Authored records stay with their author. A clinician's notes live in their own space repo, so they survive the patient deleting a space — upstream already treats an author's records as the author's own data
- Reliance capture. HIPAA's designated record set[2]45 CFR 164.501, Definitions: “Designated record set means: (1) A group of records maintained by or for a covered entity that is…(iii) Used, in whole or in part, by or for the covered entity to make decisions about individuals” includes records used to make decisions about the patient. When a clinician relies on synced data — the med list the ER read — the encounter cites it with a FHIR
Provenanceand carries the relied-on content, so it is retained with the encounter. This is retention the law requires, not duplication for convenience - Everything else synced follows the law. Retention law decides what a regulated holder must keep, and HATS adds no deletion rule of its own. Where upstream expects a syncer to delete, the law comes first
10.3 Responsible entity
Every record names who is responsible for it, with existing fields:
The custody inversion becomes explicit on every record: the patient controls the space, the custodian agent says who keeps the record.
10.4 Legal process
Disclosures to courts, law enforcement, coroners, and regulators are the custodian's decision as the HIPAA disclosing party[3]45 CFR 164.502(a)(2)(ii), Uses and disclosures of protected health information: General rules: “When required by the Secretary under subpart C of part 160 of this subchapter to investigate or determine the covered entity's compliance with this subchapter.”[4]45 CFR 164.512, Uses and disclosures for which an authorization or opportunity to agree or object is not required: “(a) Standard: Uses and disclosures required by law…(d) Standard: Uses and disclosures for health oversight activities…(e) Standard: Disclosures for judicial and administrative proceedings…(f) Standard: Disclosures for law enforcement purposes…(g) Standard: Uses and disclosures about decedents”. HATS only records them, as standard FHIR disclosure records in the patient's audit log, and notifies. See Legal Process.
10.5 Patient rights HATS builds on
10.6 Open Questions
- A managing app's regime — it reads who asked, who said yes, and who read, never clinical content. Whether whoever runs one for a patient is a business associate, or a consumer service under the FTC's rule
- Reliance capture granularity — the whole relied-on record, or only the cited fields?
- Health-law review — this framing should be checked by a health-law specialist before real patients
10.7 Notes
- 16 CFR Part 318, Health Breach Notification Rule: “This part, which shall be called the "Health Breach Notification Rule," implements section 13407 of the American Recovery and Reinvestment Act of 2009, 42 U.S.C. 17937. This part applies to…”
- 45 CFR 164.501, Definitions: “Designated record set means: (1) A group of records maintained by or for a covered entity that is…(iii) Used, in whole or in part, by or for the covered entity to make decisions about individuals”
- 45 CFR 164.502(a)(2)(ii), Uses and disclosures of protected health information: General rules: “When required by the Secretary under subpart C of part 160 of this subchapter to investigate or determine the covered entity's compliance with this subchapter.”
- 45 CFR 164.512, Uses and disclosures for which an authorization or opportunity to agree or object is not required: “(a) Standard: Uses and disclosures required by law…(d) Standard: Uses and disclosures for health oversight activities…(e) Standard: Disclosures for judicial and administrative proceedings…(f) Standard: Disclosures for law enforcement purposes…(g) Standard: Uses and disclosures about decedents”
- 45 CFR 164.524, Access of individuals to protected health information: “Standard: Access to protected health information—(1) Right of access. Except as otherwise provided in paragraph (a)(2) or (a)(3) of this section, an individual has a right of access to inspect…”
- 45 CFR 164.522, Rights to request privacy protection for protected health information: “Standard: Right of an individual to request restriction of uses and disclosures. (i) A covered entity must permit an individual to request that the covered entity restrict: (A) Uses or…”
- 45 CFR 164.526, Amendment of protected health information: “Standard: Right to amend. (1) Right to amend. An individual has the right to have a covered entity amend protected health information or a record about the individual in a…”
- 45 CFR Part 171, Information Blocking: “Basis. This part implements section 3022 of the Public Health Service Act, 42 U.S.C. 300jj-52. (b) Purpose. The purpose of this part is to establish exceptions for reasonable and necessary…”
Autonomy Spectrum
The core principle for hosting topology: autonomy is a spectrum, not a binary. The protocol is identical across the whole range — only where the data lives changes. Sovereignty is never gated on owning infrastructure.
11.1 Control plane vs. data plane
The split that makes the spectrum work:
- Control plane — seeing who has access, granting, revoking, approving break-glass. This is a signing operation: every yes and revocation is a record in the patient's
health.hats.audit.log, and access follows them. It lives on the patient's HATS card (PIN-gated chip) — any phone, kiosk, or terminal is just a reader — works offline, and propagates when connectivity returns. - Data plane — hosting and serving the actual record bytes. Handled by repo hosts and syncers: the patient's PDS (hosted, or their own node) for what the patient authored, and providers' institution nodes for what they authored and what they're authorized to sync.
The key consequence: revocation and authority don't require hosting. Every patient record space admits only those the patient said yes to, so you're signing yeses — not running a server. So every user — regardless of resources — gets the two things that actually constitute sovereignty: visibility (who can see my data) and veto (cut them off).
11.2 The spectrum
Same UX, same protocol, same ten-second revoke at every tier. A card-only user can revoke a provider just as easily as someone running their own node — they simply don't host the bytes themselves.
11.3 Why this matters
Sovereignty that requires a homelab isn't sovereignty — it's a hobby for the already-resourced. The people a portable health record helps most (unhoused, chronically ill, transient) are the least able to run infrastructure. The autonomy spectrum ensures the protocol degrades gracefully toward zero personal infrastructure without ever collapsing back into "the hospital owns everything."
The card is the floor: control without hosting, and without owning a phone. A phone can be destroyed, and so can a card — losing either is a quorum reissue, not a loss of identity or data. Everything above the floor is optional self-hosting.
Progressive Onboarding
Stub — to be expanded.
The hard problem the Autonomy Spectrum surfaces: a new system is friction, and an ER is the worst possible moment to ask a sick person to set up a DID and understand threshold keys. Onboarding has to be progressive, not a gate.
12.1 Core idea: first contact is invisible
The first provider creates the patient's account as a normal part of intake — they're creating a chart anyway. It registers the patient's DID, hosts their PDS custodially (repo host and space host for the patient's spaces), and its institution node becomes the first authorized syncer. The patient does nothing. At intake the patient is also handed a HATS card, and the provider writes the card's key into the DID as a rotation key that outranks its own (rotation-key order). Later, the patient "claims" the DID with that card — no cooperation from the custodian needed — and authority over the spaces comes with it: the space authority is the DID.
Onboarding becomes a progression, not a wall:
- Intake — provider creates the DID and a custodial hosted PDS, issues the HATS card, and ranks the card's key above its own; its institution node is the first authorized syncer. Custody sits with one provider.
- Claim — in the HATS app by tapping the card, or at a health-facility kiosk, the patient uses the card's PIV side and PIN to remove the custodian's rotation key; gains visibility + veto (control plane). Where the host supports rotation-key recovery, the same card resets the account password too, so claiming needs nothing from the custodian. The PDS can stay where it is or migrate.
- Distribute — second provider seen; authority rotates to a threshold split; single-provider custody dissolves.
12.2 Starting on your own
A patient doesn't have to wait for a provider. Anyone can start by loading their own records:
- Identity — an atproto DID they already have, on a PDS that hosts health data (One DID across apps), or a new one
- Spaces — the full space set, created on that PDS
- Keys — a passkey for everyday approvals, and a security key's PIV key as a rotation key above the PDS's keys, until a HATS card is issued
- Records — pulled from each provider's patient-access API with a SMART on FHIR patient login. Certified EHRs must offer one[1]45 CFR 170.315(g)(10), ONC certification criteria for Health IT: “Standardized API for patient and population services. The following technical outcomes and conditions must be met through the demonstration of application programming interface technology. (i) Data response. (A) Respond to…”; Medicare's is Blue Button 2.0, and many health plans offer one under CMS's Patient Access API rule (CMS-9115-F)
Imported records go into the patient's own repo in each section space, each with a Provenance naming the system it came from. They're signed by the patient, not the provider (Record Integrity), so a reader sees them as patient-supplied.
HIPAA doesn't cover a patient's own copy, since no covered entity holds it. The app and host fall under the FTC Health Breach Notification Rule instead (Regulatory Model).
When a provider appears later, there's no custody window: the patient already holds the top key, and the provider joins as a syncer.
12.3 The open problem: first-contact custody
Between step 1 and step 3 there is a window where a single provider holds the patient's DID rotation keys and runs their space host custodially. This is the one genuinely vulnerable moment — it briefly looks like "square one" (institution controls the record).
Mitigations to explore:
- Rotate to threshold as early as possible (second provider, or a public-benefit "PDS of last resort" as an automatic second shareholder)
- Constrain what a custodial first-provider can do (host, serve, and sync yes; change the spaces' policies or give itself a yes, no)
- Audit trail on the authority itself so any custodial action is visible once the patient claims control — the PLC operation log is public, and every grant is a record in
health.hats.audit.log
12.4 Open Questions
- Who is the "PDS of last resort" / health-data credit union, and who funds it?
- How does a patient with no ID and no device get re-identified across providers to avoid duplicate DIDs?
- Claiming UX when the card is lost before claim: no key outranks the custodian's yet, so how does the patient prove they're the subject of an account created on their behalf?
Related: Autonomy Spectrum (control plane / data plane split), LAN peer fetch, and Threshold Authority.
12.5 Notes
- 45 CFR 170.315(g)(10), ONC certification criteria for Health IT: “Standardized API for patient and population services. The following technical outcomes and conditions must be met through the demonstration of application programming interface technology. (i) Data response. (A) Respond to…”
HATS.institution
The institution namespace covers institutional HATS — data and messaging that operates between and within institutions. Largely outside patient-facing interaction. HIPAA permits it without patient authorization as treatment, payment, and operations (TPO)[1]45 CFR 164.506(c), Uses and disclosures to carry out treatment, payment, or health care operations: “Implementation specifications: Treatment, payment, or health care operations. (1) A covered entity may use or disclose protected health information for its own treatment, payment, or health care operations. (2) A…”. HATS doesn't stop what an institution shares from its own copies (Provider-to-Provider Exchange), and a coordinator facilitates. Reading the patient's own spaces still takes their sharing grant, because the patient is the space authority.
The patient grants to HATS.institution.public. Pneumatic operates under that authorization as an operational byproduct — the patient doesn't sign off on internal routing any more than they sign off on a nurse reading their chart in the hallway.
13.1 Subspaces
HATS.institution.public
The institutional face to the patient and to other institutions. What the patient's grant actually covers. Referrals, transfers, record sharing between institutions, specialist consults. The workflow runs in a space between two institutions; the clinical records stay in the patient's spaces, read under a health.hats.provider.grant.
HATS.institution.joining
How an institution joins: its state license, Medicare certification, and accreditation, read from the authorities that hold them, and its DID matched to them by a named reviewer.
HATS.institution.people
The institution's people: clinicians, administrators, privacy officers. How each is licensed, proofed, credentialed, and ended, every link a signed record naming the person who made it.
HATS.institution.pneumatic
Operational messaging within and between institutions. Bed availability, transfer coordination, lab routing, incident messaging, on-call handoffs. Low-latency and kept out of the patient's spaces, but every message is a signed record in an institution's space repo.
13.2 The institution node
Each institution's own server, on its LAN (Institution node). It holds its clinicians' space credentials, and writes the institution's records as the institution's account, each naming the person who acted.
The demo runs one at institution.hats.health (did:web:institution.hats.health, service #hats_institution) for Haberdasher General, the demo's hospital. It serves health.hats.institution.leaveRole and health.hats.institution.endRole (When someone leaves) and writes to the hospital's repo on its own PDS. It's a Worker rather than a server on a LAN, since role changes need the internet anyway, and it doesn't sync records or serve FHIR yet.
13.3 Spaces
Institutional spaces are authored for institutions, by the people acting for them, not by patients. Each institution writes only to its own space repo; the patient's spaces are touched only through the ordinary grant flow.
- Authority is the institution's DID, not a dedicated space DID. A space anchors on its authority's own DID, and a relationship between two institutions has no reason to outlive either of them
memberspace, notmanagedspace, between institutions — the partner set is small and changes by agreement, not per request- A coordinator facilitates the exchange, wherever they put it — inside either institution, inside both, or between them. Whether it's an internally compliant one of their own is up to them
- Deterministic addresses —
at://did:plc:swedish/space/health.hats.institution.public/did:plc:uwmedicineis the space for Swedish's requests to UW Medicine. UW Medicine's requests to Swedish go in UW Medicine's space for Swedish allowedAppsof accredited institution-node client IDs- No PHI beyond references. Institutional records point into the patient's spaces by strongRef; reading what they point at still takes a grant
13.4 Trust Model
Interactions between institutions are bilateral records — the same double-entry primitive as HATS.user (ATS Foundations), but both sides are institutional DIDs rather than patient + provider. Both sides sit in the same space, each in its author's repo.
Same audit guarantees: both records carry their author's signature (Record Integrity), both name the same strongRef (URI + CID), and alteration is detectable. Space commits are deniable, so the signatures are what make the trail evidence. External arbiter (accreditation bodies, CMS, malpractice law) consumes the trail as needed.
13.5 HIPAA TPO Coverage
HIPAA permits a covered entity to use and disclose PHI for treatment, payment, and health care operations without the patient's authorization[1]45 CFR 164.506(c), Uses and disclosures to carry out treatment, payment, or health care operations: “Implementation specifications: Treatment, payment, or health care operations. (1) A covered entity may use or disclose protected health information for its own treatment, payment, or health care operations. (2) A…”. That is the legal basis for both subspaces, so neither needs per-event patient sign-off.
HATS requires a grant anyway, by design: the patient is the space authority, and nothing reads the patient's spaces without the patient's say. The patient's sharing grant (health.hats.institution.sharingGrant) is HATS's consent layer on top of HIPAA — in HIPAA terms an optional consent[2]45 CFR 164.506(b), Uses and disclosures to carry out treatment, payment, or health care operations: “Standard: Consent for uses and disclosures permitted. (1) A covered entity may obtain consent of the individual to use or disclose protected health information to carry out treatment, payment, or…”, not what makes the disclosure lawful. Pneumatic inherits it.
Disclosure for another institution's operations is narrower than for treatment[3]45 CFR 164.506(c)(4), Uses and disclosures to carry out treatment, payment, or health care operations: “A covered entity may disclose protected health information to another covered entity for health care operations activities of the entity that receives the information, if each entity either has or…”: each institution must have or have had a relationship with the patient, the PHI must pertain to that relationship, and the purpose must be quality assessment and improvement, review of professional competence or qualifications (including training and credentialing), or health care fraud and abuse detection or compliance. Transfers, handoffs, and clinical alerts are treatment[4]45 CFR 164.506(c)(2), Uses and disclosures to carry out treatment, payment, or health care operations: “A covered entity may disclose protected health information for treatment activities of a health care provider.”; inter-institution .pneumatic traffic for a partner's operations must fit the (c)(4) limits.
Pneumatic never widens access. A message that references a lab result is readable by anyone in the space; the result itself is readable only under the recipient institution's own grant.
13.6 Open Questions
- skey convention — patient spaces key on HL7 confidentiality (
n,r,v); institutional spaces key on the partner or unit instead. Does a referral for a restricted category (e.g. 42 CFR Part 2 substance use) need anrsplit as well? - Retention vs. deletion — if an institution deletes a space, upstream expects the partner, as a syncer, to delete its copy. Both are covered entities with retention duties. The partner's own records survive in its repo; the copy of the other side does not
- Space discovery — readers are never enumerated upstream, so a partner learns a space exists out of band. The deterministic address helps; first contact still needs a notice
13.7 Notes
- 45 CFR 164.506(c), Uses and disclosures to carry out treatment, payment, or health care operations: “Implementation specifications: Treatment, payment, or health care operations. (1) A covered entity may use or disclose protected health information for its own treatment, payment, or health care operations. (2) A…”
- 45 CFR 164.506(b), Uses and disclosures to carry out treatment, payment, or health care operations: “Standard: Consent for uses and disclosures permitted. (1) A covered entity may obtain consent of the individual to use or disclose protected health information to carry out treatment, payment, or…”
- 45 CFR 164.506(c)(4), Uses and disclosures to carry out treatment, payment, or health care operations: “A covered entity may disclose protected health information to another covered entity for health care operations activities of the entity that receives the information, if each entity either has or…”
- 45 CFR 164.506(c)(2), Uses and disclosures to carry out treatment, payment, or health care operations: “A covered entity may disclose protected health information for treatment activities of a health care provider.”
HATS.institution.public
The patient-facing institutional layer. Covers everything a patient's sharing grant authorizes — both what the patient interacts with directly and what gets shared inter-institutionally on their behalf.
14.1 Scope
- Patient-facing records: visit notes, labs, imaging metadata, medications, discharge summaries — in the patient's
health.hats.records.*spaces, each clinician writing into their own repo there - Sharing between institutions: referrals, specialist consults, transfer records, imaging handoffs — workflow in an institution-to-institution space (Spaces), records read from the patient's spaces under a grant
- Pre-authorized sharing classes (patient sets policy, not per-event consent)
14.2 Pre-Authorization Model
Rather than signing off on each data share between institutions, the patient pre-authorizes a sharing class at grant time. Each class is a FHIR R4 Consent (scope patient-privacy), built from codes that already exist:
The grant record lives in the patient's own repo in their health.hats.audit.log space, signed by the patient, beside the health.hats.provider.grant records it gives rise to. Institutions honor it without further patient interaction. Every grant issued under it cites it by strongRef, so the patient's audit log shows each institution it was used for.
v (psychotherapy notes) is outside any sharing class: HIPAA requires the patient's specific authorization even for treatment (Lexicon Namespaces).
14.3 Lexicon Namespaces
Inherits all health.hats.records.* namespaces from HATS.user. Adds one space type and the sharing grant. Referrals, transfers, and consults are not HATS records: each is a FHIR ServiceRequest from the requesting institution plus a Task from the receiving one, in the requester's space for that partner.
Task follows the FHIR workflow pattern with one change forced by single-writer repos: the receiver writes its own Task naming the requester's ServiceRequest in focus, rather than updating a Task the requester created. Status changes are amendments (Record Integrity).
Referral
ServiceRequest — requester: referring institution, performer: receiving institution, subject: the patient, reasonCode: SNOMED CT or ICD-10, supportingInfo: strongRefs into the patient's spaces. The receiving institution answers with a Task (accepted, rejected, completed).
Transfer
Transfer record — same structure as referral but marks a care handoff. Triggers a health.hats.provider.grant for the receiving institution.
How a sharing grant becomes access comes later (Open Questions); the person acting at the receiving institution records it in their own repo in the patient's health.hats.audit.log, citing that sharing grant — the same move as the notarized-consent grant in Access Flows. The care handoff itself is recorded in the patient's health.hats.records.encounters space: the sender's Encounter names the receiver in hospitalization.destination, the receiver's names the sender in hospitalization.origin.
Consult
ServiceRequest for a specialist opinion. Access is an ordinary health.hats.provider.grant for the IPS-section spaces the consult needs — credentials are always read-only, whole-space, and short-lived, so "scoped" means which sections, not which records. The consultant's note goes into their own repo in the patient's health.hats.records.encounters space; its Task closes as completed.
health.hats.institution.sharingGrant
Patient-signed pre-authorization of a sharing class. The record body is a FHIR Consent (above). Stored in the patient's health.hats.audit.log space. Referenced by institutions when initiating inter-hospital access.
14.4 Bilateral Record Between Institutions
UW Medicine then reads the patient's health.hats.records.results space like any provider: delegation token, short-lived space credential, renewed while the grant lasts.
14.5 Open Questions
- A transfer's grant names an institution — the transfer above "triggers a
health.hats.provider.grantfor the receiving institution", which conflicts with people act, institutions don't. It should name the receiving clinician, or be an institution's grant passed on to its clinicians - From a sharing grant to access — the coordinator is in no read (Asking for access), so how a sharing grant lets a receiving institution's people in without the patient answering each transfer, and how broad one may be, is open
- One grant collection — merge
health.hats.provider.grantandhealth.hats.institution.sharingGrantinto one collection distinguished byprovision? - Network-wide class — "any HATS-compliant institution" needs an accreditation source the published policy can name, the same question as Validator eligibility
HATS.institution.pneumatic
Operational messaging layer, within and between institutions. Institution-generated; every message is a record in its author's own space repo, inside a space an institution controls. The patient's care is the context but the patient is not a participant.
Named after pneumatic tube systems — the original hospital internal messaging infrastructure. Fast, point-to-point, infrastructure-level.
15.1 Scope
- Bed availability and capacity coordination
- Transfer requests and logistics
- Lab specimen routing and result alerts
- Incident and emergency coordination
- On-call handoffs and staffing
- Internal clinical alerts (not patient-facing)
15.2 Design Principles
Ephemeral but auditable — messages don't live in the patient's spaces, but every exchange leaves a signed record on each side. Fast in transit, permanent in log.
Low-latency — spaces are a sync layer, not a message bus: write notifications are best-effort, and syncers pull. Delivery rides on FHIR Subscriptions between institution nodes (websocket or rest-hook). The record is written before the push, not after — a write to one's own repo is local and instant, so audit precedes delivery, as in the ER flow.
Institution-scoped — spaces are authored by institutions (Spaces). Within one institution, the institution's own node is the managingApp and answers from its staff directory; between two, the partner is on a memberspace list. The HATS coordinator is in neither path. No patient DID is a writer, and nothing is written to the patient's spaces.
TPO-covered — no patient authorization required per-message: HIPAA permits treatment and operations disclosures without it[1]45 CFR 164.506(c), Uses and disclosures to carry out treatment, payment, or health care operations: “Implementation specifications: Treatment, payment, or health care operations. (1) A covered entity may use or disclose protected health information for its own treatment, payment, or health care operations. (2) A…”, and HATS gates them on the patient's sharing grant by design. Disclosure for a partner's operations is limited by 164.506(c)(4)[2]45 CFR 164.506(c)(4), Uses and disclosures to carry out treatment, payment, or health care operations: “A covered entity may disclose protected health information to another covered entity for health care operations activities of the entity that receives the information, if each entity either has or…” (HIPAA TPO Coverage). Pneumatic never widens access: a message carries strongRefs into the patient's spaces, and the recipient reads them only under its institution's own grant.
15.3 Lexicon Namespaces
Each health.hats.institution.pneumatic.* NSID is a space type, separated by audience since read access is all-or-nothing per space. Records are FHIR R4 resources, as everywhere in HATS.
health.hats.institution.pneumatic.alert
Clinical alert routed between departments or institutions. A FHIR Communication: priority (routine, urgent, asap, stat), subject: the patient, about: strongRef to the source record (e.g. a DiagnosticReport in the patient's health.hats.records.results space). Bilateral: sender writes, receiver acknowledges with its own Communication whose inResponseTo names the alert.
health.hats.institution.pneumatic.bedRequest
Capacity/transfer coordination. Institution A asks Institution B for bed availability. No PHI: bed status is FHIR Location.operationalStatus (HL7 v2 table 0116), aggregate capacity a MeasureReport, the ask a Task. Once a specific patient is named, the request becomes a transfer in .public — PHI stays out of the capacity space.
health.hats.institution.pneumatic.handoff
On-call or care handoff. The outgoing clinician writes a Communication naming the incoming clinician as recipient and the patients' Encounters in about; the incoming clinician accepts with a Communication in response. Each signs its own record — there is no co-signed single record in spaces. Clinician DIDs are staff accounts on the institution's PDS.
health.hats.institution.pneumatic.incident
Incident or emergency coordination. Institution-scoped, or bilateral between participating institutions. Existing standards per kind:
15.4 Audit Trail
Each pneumatic message produces a bilateral record — both sides in the same space, each in its author's repo:
Neither party can later claim the alert was not sent or, once acknowledged, not received: both records carry author signatures (Record Integrity), since space commits alone prove nothing to a third party. An alert with no acknowledgment is visible as exactly that. External arbiters (accreditation bodies, incident review boards, malpractice proceedings) can request the bilateral log.
15.5 Relationship to HATS.institution.public
Pneumatic is the internal plumbing. Public is the external face. A lab result flows:
- Lab produces result →
Observation/DiagnosticReportin the lab's own repo in the patient'shealth.hats.records.resultsspace (under the institution's grant) - Alert fired internally →
Communicationin ahealth.hats.institution.pneumatic.alertspace, pushed to the treating physician by FHIR Subscription - Physician acts → encounter note in the physician's own repo in the patient's
health.hats.records.encountersspace
Pneumatic sits in step 2 — invisible to the patient, auditable by institutions.
15.6 Open Questions
- Delivery guarantee — FHIR Subscriptions deliver at most as reliably as their channel. Critical results need a closed loop (read-back, escalation on no acknowledgment); is that HATS's job or the receiving EHR's?
- Internal space granularity — read is all-or-nothing, so one alert space per unit means every member of the unit can read every alert. Per care team is tighter but means many more spaces
- Handoff responsibility — the
Communicationpair records that a handoff happened, not who is responsible now. FHIRCareTeam(participantperiod) models that, but has no IPS space to live in (A care team) - Emergency standards — CAP and EDXL-HAVE are XML-based, not FHIR-native. Carry them as
Communicationpayloads, or map capacity ontoMeasureReportthroughout? - Offline — internal pneumatic survives an internet outage only if the institution hosts its PDS (the space host) on site, not just its node
15.7 Notes
- 45 CFR 164.506(c), Uses and disclosures to carry out treatment, payment, or health care operations: “Implementation specifications: Treatment, payment, or health care operations. (1) A covered entity may use or disclose protected health information for its own treatment, payment, or health care operations. (2) A…”
- 45 CFR 164.506(c)(4), Uses and disclosures to carry out treatment, payment, or health care operations: “A covered entity may disclose protected health information to another covered entity for health care operations activities of the entity that receives the information, if each entity either has or…”
HATS.institution.joining
How an institution joins HATS. Public authorities already vouch for hospitals and clinics: a state licenses them, CMS certifies them for Medicare, and an accrediting organization surveys them. HATS reads those records rather than running a vote of its own, and checks the one thing they can't: that a DID really is that institution. Once it has joined, its administrators privilege its clinicians (HATS.institution.people). This is design; today the coordinator's registry is a list kept by hand.
16.1 Evidence, from the authorities that already hold it
Each link adds evidence; none is a vote. What an institution's clinicians may ask for at each level is the published policy's, as role tiers are now.
16.2 Ingestion, semi-automated
The manual part is running the intake, not judging institutions:
- Lookups run on their own — given a DID, the intake resolves the domain its handle verifies, then finds the NPI, the CMS certification, and the accreditation that match its name and address
- A person signs the match — mismatches and the state license go to a named reviewer, who signs the result with the evidence they saw and the level it reaches. Early on that's the HATS team. The record names who checked, as every link does in HATS.institution.people
- Checks repeat — the sources change: the NPI Registry daily, the Provider of Services file quarterly. A lapsed license or an ended certification lowers the institution's level, and the coordinator follows
16.3 Endorsements support, never block
Someone at an established institution can co-sign for another: a hospital's administrator vouching for the free clinic that refers patients to it. The endorsement is a signed record naming the person who gave it, and anyone can see it. It adds context; it's never required, and its absence never keeps anyone out. A vote of incumbents would hand them a gate over their competitors, and would duplicate checks that already carry legal weight.
16.4 Open Questions
- Who runs intake beyond the HATS team — one designating body on TEFCA's model, or several (Accreditation)?
- What each level permits — which evidence an institution needs before its clinicians can ask for routine care, emergency tiers, or break-glass
- Institutions outside these records — clinics with no Medicare certification or accreditation, and institutions outside the US. How much can endorsements carry them?
- State licenses at scale — fifty lookups with no common format. Which states publish data that can be read automatically?
16.5 Notes
- 42 CFR 488.5(a), Application and re-application procedures for national accrediting organizations: “A national accrediting organization applying to CMS for approval or re-approval of an accreditation program under § 488.4 must furnish CMS with all of the following information and materials”
HATS.institution.people
The institution's corner of the triangle is people. An institution gives them a home: it vets them, grants them privileges, provides the place and the equipment, and answers for its staff. But every act in HATS is one of them, under their own DID (People act, institutions don't). This is how they come and go, and the chain of evidence that follows each one. Roles, leaving, and ending a role run in the demo; proofing, privileging, and role credentials are design.
17.1 Roles
Each role is a FHIR PractitionerRole: one person (practitioner, their DID) at one institution (organization, its DID), with what they do (code), whether it's in force (active), and for how long (period). FHIR's Practitioner already covers people who never treat anyone, from "receptionists handling patient registration" to "IT personnel merging or unmerging patient records".
A person can hold several roles, at several institutions, under one DID (A person is a set of DIDs). An administrator who also treats patients does so as a clinician, under that role's grants.
The roles are an open set; the three above are the first. In the data a role is its PractitionerRole.code, which FHIR binds only by example, so it takes any code system: NUCC taxonomy for clinicians, HL7's practitioner-role codes where they fit. What a role may do is the coordinator's published, versioned policy, as role tiers are for the ER today (Asking for access). A new role, such as medical records or compliance audit, is a new code and a policy entry, not a protocol change, and lexicons list roles as knownValues, which stay open, never as a closed enum.
17.2 The chain of evidence
Each link is a signed record naming the person who made it. Joining, leaving, and everything between can be replayed later: who vouched for whom, on what evidence, and when.
- Licensed — a state board licenses the clinician. Their NPI and taxonomy are public in the CMS NPI Registry, which anyone can check
- Proofed — an administrator confirms the person is who the license names, at an identity assurance level from NIST SP 800-63A-4[3]NIST, SP 800-63A-4, Digital Identity Guidelines: Identity Proofing and Enrollment (final, July 31, 2025): IAL3 requires a trained proofing agent in an on-site attended session, and "SHALL only be delivered as on-site attended". The highest, IAL3, is delivered only as an on-site attended session with a trained proofing agent. HATS records who proofed, at what level, and when, never the documents seen
- Credentialed and privileged — the medical staff examines the candidate's credentials and recommends them to the governing body, which appoints them[4]42 CFR 482.22(a)(2), Condition of participation: Medical staff: “The medical staff must examine the credentials of all eligible candidates for medical staff membership and make recommendations to the governing body on the appointment of these candidates”. The institution publishes the role as a
PractitionerRolein its own repo. A W3C Verifiable Credential for each role, signed by the administrator who issued it, comes later - Recognized — the published policy names each accredited institution. At each pass the patient's managing app reads the clinician's current
PractitionerRole, which counts only at an accredited institution, while it's active and inside its period - Ended — a clinician can always leave: they sign their own leaving, and the institution node closes the role at once, since giving up a role only ever removes access. An administrator can also end a role the clinician didn't choose to end, when they're let go or lose their license, as HIPAA's termination procedures require of the institution[5]45 CFR 164.308(a)(3)(ii)(C), Administrative safeguards: “Termination procedures (Addressable). Implement procedures for terminating access to electronic protected health information when the employment of, or other arrangement with, a workforce member ends”. Either way, the next pass reads the ended role, and every yes naming it is void (When someone leaves). Revoking a credential through a Bitstring Status List comes with credentials, later
17.3 When someone leaves
Leaving ends a role, not a record, whether the clinician chose to go or an administrator ended it. Nothing that person did is moved, reassigned, or hidden.
- The role closes and stays published. The
PractitionerRolekeeps its record withactivefalse andperiodended, which FHIR defines as "the period during which the person is authorized to act as a practitioner in these role(s) for the organization". Anyone looking at a record they wrote sees their name beside the date the role ended - Their records stay where they are. A clinician writes into their own repo in the patient's spaces, so what they wrote stays in the patient's record, signed by them, after they're gone. The account is theirs too: if the hospital hosted it, it moves with them, and the hospital keeps its own copy as the law requires
- Their access ends with the role. Every yes names them and their role, so none of it passes to anyone, and once the role ends, the yes is void, with no one revoking it. The patient's managing app reads the role at every pass, and the yes itself is left as it was. What they already read stays with them, under their duties; updates stop
- Their patients' care moves one patient at a time. A clinician taking over asks each patient like any other clinician, saying who they're taking over from. The patient approves or declines; nobody inherits a patient list
The institution's account publishes all of it in its own repo: its Organization (record key self), one PractitionerRole per person who works there (health.hats.fhir.practitionerRole, keyed by the person's DID), and a Provenance for every change, whose agent.who is the person who acted. Its institution node makes the changes, by two procedures, each authenticated by the caller's own service auth:
health.hats.institution.leaveRole— the clinician leaves. The node closes their role, and theProvenancenames them, as havinglefthealth.hats.institution.endRole— an administrator ends someone's role, or records a leaving, and sets the forward. The node first checks that the caller holdsinstitution.administratorthere; theProvenancenames the administrator, as havingendedit
A request addressed to someone who has left, such as a patient asking for a correction, can't be answered. The access it opened is void with their credential. The patient's app finds where to send it instead, like a forwarding address for mail, and the patient decides whether to. The addresses are FHIR's own: Endpoints, which say where to send things to a role or an institution, as FHIR uses them for referrals, and an institution's contacts:
- Their forward — the ended
PractitionerRolekeeps itsendpoint, which an administrator points at whoever took over from them, or at the institution - The institution's addresses — every way it publishes to be reached, tried in order, not one or another:
Organization.endpointfor its DID, then a Direct address (direct-project, the US standard for secure clinical messaging) or another of FHIR's connection types; thenOrganization.contactfor the office itself, with its phone, email, and postal address. Each is a fallback for the one before it, and the patient can use any of them. They're where the institution's amendment office receives requests: a covered entity must already "document the titles of the persons or offices responsible for receiving and processing requests for amendments"[6]45 CFR 164.526(f), Amendment of protected health information: “A covered entity must document the titles of the persons or offices responsible for receiving and processing requests for amendments by individuals”. The duty doesn't end when the author leaves: the right to amend is against the covered entity[7]45 CFR 164.526(a)(1), Amendment of protected health information: “An individual has the right to have a covered entity amend protected health information or a record about the individual in a designated record set”, and even for a record it didn't create, it can't refuse on that ground once "the originator of protected health information is no longer available to act on the requested amendment"[8]45 CFR 164.526(a)(2)(i), Amendment of protected health information: “Was not created by the covered entity, unless the individual provides a reasonable basis to believe that the originator of protected health information is no longer available to act on the requested amendment” - Nobody — if the institution publishes none of these, the request stays with the patient, marked as having no one to send it to
Past the DID, a request leaves HATS, and the patient sends it themselves; HATS is no mail client. For email or Direct the app opens a mailto: link with the request filled in, for a phone a tel: link and what to say, and for post a letter to print. A letter counts, since an institution may require amendment requests in writing[9]45 CFR 164.526(b)(1), Amendment of protected health information: “The covered entity may require individuals to make requests for amendment in writing and to provide a reason to support a requested amendment, provided that it informs individuals in advance of such requirements.”. The request's Task stays in the patient's repo either way, so their record shows what they asked and where it went.
Sending isn't access. What reaches an address is the request: the patient's words, and which record they're about. Whoever takes it up asks the patient for that section as one named person, and the patient approves them before anything opens. An office may have an inbox, but nobody reads a record through it, and the coordinator never reroutes a request.
An Endpoint's address must be a URL, which a DID isn't, so a HATS endpoint carries the DID as its identifier and the URL that resolves the DID as its address: its PLC directory entry, or its did:web document. The same addresses reach an institution that isn't on HATS yet: its Direct address takes a correction request that would otherwise have nowhere to go.
17.4 Manual on purpose
The step that can't be automated is the one that shouldn't be. At proofing, someone looks at a license and a face. HATS doesn't try to remove that moment. It records it, names who did it, and makes every link after it something anyone can check. A system that moves people in and out smoothly is one whose single physical check is never in doubt afterwards.
17.5 Open Questions
- Who vouches for the administrators — the chain starts with an administrator proofing a clinician. Who proofs and privileges the administrators: the governing body, by the same chain one level up?
- A code for administrators — clinicians carry NUCC taxonomy codes. FHIR's practitioner-role value set is only an example binding and has no administrator, so for now the role is uncoded,
code.textinstitution.administrator. Is there a standard code to use? - How fast a role change lands — the patient's managing app reads the current role at each pass, but a pass already issued reads until it expires, 10 minutes by default. Is that fast enough for someone let go, or does cutting passes short need to come before more than synthetic patients?
- Clinicians who move between institutions — locum and travelling clinicians hold short roles at many places. One credential per placement, or a longer one with a
period? - A connection type for HATS — FHIR's endpoint connection types (R4) name FHIR REST, Direct, secure email, IHE, and DICOM, but nothing for atproto. The binding is extensible, so HATS may add the one code it needs when none applies; which code system holds it is undecided
17.6 Notes
- 45 CFR 164.530(a)(1)(i), Administrative requirements: “A covered entity must designate a privacy official who is responsible for the development and implementation of the policies and procedures of the entity.”
- 45 CFR 164.530(d)(1), Administrative requirements: “Standard: Complaints to the covered entity. A covered entity must provide a process for individuals to make complaints concerning the covered entity's policies and procedures”
- NIST, SP 800-63A-4, Digital Identity Guidelines: Identity Proofing and Enrollment (final, July 31, 2025): IAL3 requires a trained proofing agent in an on-site attended session, and "SHALL only be delivered as on-site attended"
- 42 CFR 482.22(a)(2), Condition of participation: Medical staff: “The medical staff must examine the credentials of all eligible candidates for medical staff membership and make recommendations to the governing body on the appointment of these candidates”
- 45 CFR 164.308(a)(3)(ii)(C), Administrative safeguards: “Termination procedures (Addressable). Implement procedures for terminating access to electronic protected health information when the employment of, or other arrangement with, a workforce member ends”
- 45 CFR 164.526(f), Amendment of protected health information: “A covered entity must document the titles of the persons or offices responsible for receiving and processing requests for amendments by individuals”
- 45 CFR 164.526(a)(1), Amendment of protected health information: “An individual has the right to have a covered entity amend protected health information or a record about the individual in a designated record set”
- 45 CFR 164.526(a)(2)(i), Amendment of protected health information: “Was not created by the covered entity, unless the individual provides a reasonable basis to believe that the originator of protected health information is no longer available to act on the requested amendment”
- 45 CFR 164.526(b)(1), Amendment of protected health information: “The covered entity may require individuals to make requests for amendment in writing and to provide a reason to support a requested amendment, provided that it informs individuals in advance of such requirements.”