Skip to main content
Arif Mughal
Cybersecurity

HIPAA Security Architecture for an AI-Assisted Clinical Documentation Platform

Executive overview

An authored reference security architecture and HIPAA assessment method for an AI-assisted nursing documentation platform — where protected health information actually comes to rest across mobile, cloud, database and generative AI services, how many organizations have to be trusted with it, what transient processing removes that encryption cannot, and why the decisive question is not how to secure the PHI you store but why you are storing it at all.

Assessment artifacts

The full reference in a self-contained interactive page: the PHI exposure chain in eleven forms across four organizations, a twelve-location PHI explorer with default retention and the question that finds each defect, a six-boundary trust ledger, a retention-model switcher that redraws persistence across the same pipeline, the temporary-audio lifecycle with four failure paths and their residues, the model processing boundary and its measured limits, the business-associate chain with flow-down obligations, a dated vendor position table including one provider's self-contradiction, identity, database, logging, encryption, secrets and mobile control sets, deletion reach across eight copies, a filterable twenty-row Security Rule crosswalk, a PHI-based severity model and register schema, a nine-layer target architecture, a production-readiness gate, and a published statement of limits with thirty-four primary sources.

Open the reference architecture

Business challenge

AI-assisted clinical documentation is one of the few applications of generative AI with a clear and measurable benefit: it reduces the documentation burden that consumes a large part of a nurse's shift. An independent 2025 assessment found ambient scribes potentially effective at reducing documentation time and cognitive load, while noting real gaps in the evidence on productivity and financial outcomes. The security problem is a consequence of how the benefit is delivered. A nurse speaks for ninety seconds; between that utterance and a formatted note in a chart, the words pass through a mobile application, an API, a speech model, a language model, a database, a logging pipeline and a backup schedule. The same clinical information exists as raw audio, a temporary file, a transcript, prompt content, a model response, a stored note, a backup row, and — frequently — a line in a log nobody meant to write. In the representative composition this reference is built around, four separate organizations hold some form of it, and one of the eleven forms it takes is the stored note that a conventional security review would actually examine. Early-stage healthcare AI products are almost always built by small teams who made every one of those decisions for a sound engineering reason and never drew the resulting map. The consequence is that nobody in the company can answer the question a hospital's privacy officer asks first, which is not whether the application is encrypted but which organizations receive patient information, in what form, and for how long.

Environment and constraints

  • This is authored research and technical writing. It is not a client engagement, and no client, product, assessment, finding or outcome is described anywhere in it.
  • The technology composition — a React Native mobile client, a Node.js API, cloud hosting, a managed Postgres service, and third-party transcription and language model APIs — is representative of how products in this category are actually built. It describes no specific system.
  • Regulatory statements were verified against the Electronic Code of Federal Regulations, the Federal Register, the Unified Agenda and HHS material on 8 September 2026, and every one carries that date on the page.
  • The January 2025 notice of proposed rulemaking to strengthen the Security Rule is treated throughout as proposed and not law. As of the verification date it had not been finalized and had not been withdrawn, and the Unified Agenda carried it under long-term actions with a projected final action in July 2027. Several widely circulating articles describe a final rule that does not exist.
  • Vendor positions are labelled vendor-stated throughout and are never presented as independent verification. They change without notice, and one of the vendors cited already contradicts itself across two of its own current pages.
  • Claims that could not be settled are not asserted. Where a vendor's HIPAA scope could not be confirmed from a current public page it is recorded as unverified rather than as a yes or a no, and the absence of OCR guidance on AI is stated as an absence-of-evidence finding rather than as a position OCR has taken.
  • The reference is a technical control and architecture reference. It is not legal, regulatory or clinical advice, and it makes no claim of compliance with any regime.
  • The artifact is a single self-contained HTML file with no external scripts, fonts, trackers or network requests.

Objectives and success measures

  • Replace the encryption question with the boundary question: not whether the application is encrypted, but how many organizations have to be trusted with a patient's information and what each of them receives.
  • Make every place protected health information comes to rest visible, including the locations that arrive by default rather than by decision.
  • Show what transient processing removes that encryption cannot, and state the legal framing for it accurately rather than conveniently.
  • Treat deletion as a property of the whole state machine rather than of the success path, and show what four ordinary failures leave behind.
  • Put the AI safety case on deterministic controls, and state the measured limits of speech-to-text and note generation instead of gesturing at them.
  • Map the business-associate chain as an architecture problem, since which vendors receive PHI is decided by the design long before it is decided by procurement.
  • Give a crosswalk that maps architecture to the Security Rule without ever becoming a compliance claim, and that says plainly where the architecture supplies nothing.
  • Produce findings a developer can act on, ordered by consequence, with the regulatory anchor stated where one exists and left blank where none does.
  • Publish the verification record and the limits, so a reader can judge how far to trust the rest.

Role and responsibilities

Author. I wrote the reference architecture, the assessment method, the PHI location model, the trust-boundary analysis, the Security Rule crosswalk and the severity model, and did the verification behind them. Every regulatory statement was checked against the Electronic Code of Federal Regulations, the Federal Register, the Unified Agenda and HHS material rather than written from memory or taken from a secondary summary, and every vendor position was checked against that vendor's own current documentation and is labelled vendor-stated. Where a claim could not be settled it is published with its qualification attached rather than asserted. This is authored research and technical writing. It describes no client, no engagement and no assessment result, and it is not legal, regulatory or clinical advice.

Architecture and design approach

  • The method starts from a data-flow map rather than a control list, and that ordering is the whole argument. A control list tells you whether the controls you have are configured well. It cannot tell you that a transcript is sitting in a temporary directory because a request timed out four hours ago, or that the log aggregator has been capturing request bodies since a debugging session in March. Those are the findings that matter in this class of application, and they are only visible if the first artifact you produce is a map of where the information goes.
  • Twelve PHI locations recur in this architecture, and each is modelled with the same five fields: what the information is in that place, why it is there at all, what the default retention behaviour is when nobody has configured otherwise, what control actually holds if something goes wrong, and the question to put to the engineering team. The last field is the one that produces findings, because the answer is frequently that someone would have to check — which is itself the finding.
  • Trust-boundary analysis replaces the encryption question with a better one. Not 'is it encrypted' but 'how many organizations have to be trusted with this patient's information, what does each of them receive, and could the architecture have avoided sending it to them at all'. Six boundaries appear in the reference composition and two of them are typically discovered rather than designed: the hosting provider, because the temporary file has to land on somebody's disk, and the observability stack, because a logger was configured to serialize request bodies and nobody changed it back.
  • Each boundary is then interrogated in a fixed order: does PHI actually have to cross this to deliver the feature; if so, what is the smallest thing that could cross instead; what happens on the far side by default — not what the marketing page says, what the configuration currently does; and could the organization describe that position accurately to a hospital's privacy officer on a phone call. The first question is the one that changes architectures, because a logging boundary carrying full request bodies is entirely avoidable, and eliminating it removes a vendor from the compliance surface rather than adding a control to it.
  • The reference then contrasts two retention models against the same pipeline, drawn so the components stay fixed and only the persistence changes: seven persistent copies across four organizations under the conventional design, against two provider-side processing boundaries under a transient model where nothing clinical is retained server-side. The legal framing is stated carefully rather than conveniently — the minimum necessary standard is a Privacy Rule standard governing uses, disclosures and requests, with explicit exceptions including treatment, and it is not the authority for a transient-processing design. Transient processing is a risk-reduction decision driven by the required risk analysis, and describing it as anything more than that would be a compliance claim the architecture cannot support.
  • Temporary clinical audio gets its own treatment because it is the most sensitive artifact in the system and the shortest-lived, which is the combination that produces careless handling. The controlling question is what happens to it when processing fails halfway through. Almost every implementation deletes correctly on the success path; the failure paths are written later, under time pressure, by someone getting retry logic to work — and a retry that leaves the source file in place is the right decision for reliability and the wrong one for exposure. The reference draws four ordinary failures and the four different residues they leave.
  • The model layer is reviewed as two things at once: a technical component with failure modes, and a commercial dependency on a third party with its own price list and terms. The safety case is placed only on controls that hold regardless of what the model does — no tool access, no credentials, no cross-tenant reach, structural validation of the response, fail closed on anything unexpected — because a speech-to-text hallucination rate measured at roughly one percent of transcriptions containing entirely invented phrases, with thirty-eight percent of those hallucinations carrying explicit harms, is a transcription-layer property that no amount of prompt engineering downstream removes.
  • Vendors are treated as a business-associate chain rather than as a procurement list. The definition at 45 CFR 160.103 expressly reaches subcontractors, the flow-down duties sit at 164.504(e)(2)(ii)(D) and 164.314(a)(2)(iii), and HHS has been explicit that the conduit exception is narrow — it excludes only mere courier services, and a storage provider with access to PHI is a business associate even if it does not view the information. OCR's cloud guidance adds that lacking the encryption key does not exempt a provider either. Both points are commonly misunderstood in exactly the direction that suits an architecture decision already made.
  • The Security Rule crosswalk is built with column names chosen to keep four activities apart: architecture supplies a mechanism, an organization runs an operational process, evidence demonstrates that the process ran, and an accountable person accepts residual risk. Two rows are deliberately uncomfortable — physical safeguards are almost entirely inherited from providers in this architecture, and four of the highest-value administrative rows have no architectural mechanism at all, which means a technically excellent platform with no training, evaluation, incident procedures or contract management still has a real compliance problem.
  • Findings are classified by PHI risk rather than by a generic scoring system, and every register entry carries evidence, a PHI-exposure reference, an effort estimate, a decision period and — explicitly blank where none applies — the safeguard the finding bears on. That last field is what keeps a report credible, because not every weakness maps to a regulatory requirement and inflating a finding count by presenting good practice as a breach is the fastest way to lose the confidence of the people who will check.

Security and governance considerations

  • Confidentiality is treated as the defining property of the product rather than as one control domain within it. The review follows the clinical material rather than the perimeter: where an uploaded recording rests, in what form, for how long, under whose administrative control, and which boundary it crosses next — including the temporary files and intermediate extractions a document pipeline creates and that retention policies routinely fail to cover.
  • Encryption is described accurately rather than reassuringly. Under the Security Rule as currently in force, encryption is addressable rather than required, both at rest at 164.312(a)(2)(iv) and in transmission at 164.312(e)(2)(ii). Addressable is not optional — it obliges the entity to assess, implement where reasonable and appropriate, and document the alternative otherwise — and for clinical audio crossing the public internet to a third-party model provider, the assessment concluding otherwise is one the reference declines to construct.
  • Tenant separation is framed as a question about whether one healthcare organization can reach another's records, not about whether the schema has a tenant column, and the named failure mode is a privileged service key that bypasses row-level policies while being the credential every query actually runs as.
  • The third-party model provider is treated as a subprocessor of client-confidential material rather than as a library, with the questions that follow: what leaves the platform in a prompt, whether the retention and training settings are configured as the product's own representations imply, what contractual position exists, and whether the organization could describe it accurately to a hospital.
  • Prompt injection through customer-supplied content is treated as a design constraint rather than a pending fix. The model in this architecture has no tool access, no credentials and no authority to act, so the safety case rests on structural validation and on the absence of reachable capability rather than on the model declining to be misled.
  • Logging is designed as the separation of the security event from the clinical content, with the note that the audit controls standard at 164.312(b) has no implementation specifications, prescribes nothing about what to log, and requires that activity be examined and not merely recorded.
  • Recovery is assessed on evidence of restoration rather than evidence of backup, and deletion is assessed per copy rather than per system — logical deletion against complete lifecycle deletion, with the reference stating plainly that four of eight copies typically survive a deletion request and two of those are outside the platform's administrative control.
  • Compliance language is constrained throughout. Architecture supplies mechanisms, organizations operate controls, evidence demonstrates them, assessors assess, and an accountable person accepts residual risk. No conformity claim appears anywhere, and findings that have no regulatory anchor are labelled recommendations rather than dressed as breaches.

Implementation and migration approach

  • Built the evidence base before writing anything. Regulatory citations, framework versions, enforcement actions and vendor terms were verified against primary sources first, which is what caught the items most likely to be published wrongly: that the January 2025 Security Rule proposal has not been finalized despite widespread reporting to the contrary, that encryption remains addressable rather than required, and that one model provider's HIPAA-eligible endpoint list and its zero-retention endpoint list are not the same set.
  • Refused to write findings the material does not support. The reference states a method and an architecture; it states no assessment result, because there is no assessment behind it. Where an absence is the finding — no OCR guidance on AI, a vendor scope that could not be confirmed — it is published as an absence-of-evidence statement with the search described.
  • Built the page as a single self-contained HTML artifact matching the existing site artifacts, with the same tokens, header, sidebar, search, theme toggle and print behaviour, so it belongs to the site rather than arriving from somewhere else.
  • Built all seven figures as inline SVG driven by the page's own design tokens so they re-theme correctly, with no meaning carried by colour alone. The retention comparison is data-driven: the components hold position and only the persistence markers change, which renders the argument of the section as a mechanism rather than as a caption.
  • Layered the disclosure deliberately. Continuous prose forms the skim layer; the detail sits in a twelve-location explorer, a six-boundary explorer, a filterable twenty-row crosswalk and a numbered source list, so the page can be read in several minutes or worked through for considerably longer.
  • Verified rendering in a real browser at 1440, 834 and 390 pixels in both themes, with zero console errors, no page-level horizontal overflow, and every interactive control exercised programmatically — twelve location panels, six boundary panels, the retention toggle in both directions, all six crosswalk filters with row counts reconciled against the table, and search with its clear path checked against the filter state.
  • Inspected all seven figures at 2× in both themes rather than trusting the markup. Two defects were found and fixed that way: a return path in the first figure that crossed two columns of body text, and a summary line in the business-associate figure that overflowed its container.
  • Checked accessibility by construction: semantic sectioning, a single H1, tab and tabpanel semantics with arrow-key navigation on every selector, titled and described SVGs, captioned tables, and no information carried by colour alone.

Key decisions and trade-offs

  • Position it as an authored reference rather than as a case study. The source material is written throughout in conditional voice — what an assessment should examine, what an engagement would produce — and writing it up as delivered work would have produced a more impressive page and an indefensible one.
  • Lead with the data-flow map rather than the control list. It is the decision that determines everything else, and it is the one that separates a healthcare architecture review from a generic application security review.
  • State the addressable-versus-required position on encryption plainly, even though it reads as an argument against encrypting. It is what the regulation currently says, most secondary writing gets it wrong in one direction or the other, and the useful conclusion — do it, and document the decision — is stronger for being reached honestly.
  • Refuse to describe the January 2025 proposal as law. Several published articles describe a final rule that does not exist; the reference cites the Federal Register document and the Unified Agenda status and says so.
  • Ground the minimum necessary discussion in what the standard actually is. It is a Privacy Rule standard about uses, disclosures and requests, with a treatment exception, and it is not the authority for a transient-processing design. Overstating it would have been easy and would have undermined every other legal statement on the page.
  • Make the AI section rest on measurements. A peer-reviewed hallucination rate with a harm breakdown is harder to argue with than an assertion that models sometimes get things wrong, and it makes the design conclusion testable.
  • Publish the vendor contradiction rather than smoothing it. One provider's own eligibility lists disagree about the same endpoints, and its contract and help-centre pages use different names for the same retention mode. That is the single most useful thing an architect can be told about that boundary.
  • Keep the crosswalk honest about what architecture cannot supply. Four administrative rows have no mechanism, and saying so is more useful than inventing one.
  • Set featured to false. The work stands on its own page, and the flag stops selecting anything when most of the set carries it.

Results and outcomes

  • A twelve-location PHI model covering the mobile application, device storage, network transit, API process memory, temporary audio on disk, queues and job state, the transcription provider, the model provider, the database, backups and point-in-time recovery, logs and telemetry, and administrative and support tooling — each with its default retention behaviour, the control that actually holds, and the question that produces a finding.
  • A six-boundary trust ledger naming what crosses each boundary, who controls the far side, whether the crossing could be avoided at all, and what to verify — including the two boundaries that are typically discovered rather than designed.
  • Two retention models drawn against the same pipeline so the components stay fixed and only the persistence changes: seven persistent copies across four organizations under the conventional design, against two contractually bounded provider-side processing boundaries under transient processing.
  • A temporary-audio lifecycle model with the success path and four ordinary failure paths — process crash, provider timeout or rate limit, malformed model response, client disconnect — each leaving a different residue, together with the eight things a review examines and the sweeper that covers the exits a process cannot handle.
  • A model-boundary review placing the safety case only on controls that hold regardless of model behaviour, with the measured speech-to-text hallucination evidence stated rather than gestured at, and with clinician accountability for the signed note treated as a design constraint rather than a disclaimer.
  • A business-associate chain model showing the flow-down obligation from covered entity through the platform to every vendor and their subprocessors, with the two most commonly misunderstood points — the narrowness of the conduit exception and the irrelevance of encryption to business-associate status — corrected against HHS's own words.
  • A dated vendor position table covering model and transcription APIs, managed Postgres and the hyperscale clouds, including one provider whose own HIPAA-eligibility and zero-retention endpoint lists do not agree with each other, and a second whose contract and help-centre pages use different names for the same retention mode.
  • A twenty-row Security Rule crosswalk with columns named architecture mechanism, operational process and example evidence so the four activities stay separate, verified against the current regulation and stating explicitly where the architecture supplies nothing.
  • A severity model tied to PHI risk and a twelve-field register schema in which every entry carries evidence, a PHI-exposure reference, an effort estimate and — blank where none applies — the safeguard reference, plus a worked example showing what a developer-ready finding actually reads like.
  • A nine-layer target architecture in which the data store is conditional by design, and a production-readiness gate separating what must be fixed before real patient information is processed from what should be in place before a healthcare organization will say yes.
  • A published statement of limits: what the reference does not do, which parts will move first, and the specific claims that could not be settled — including one vendor's HIPAA scope that could not be confirmed from a public page and is recorded as unverified rather than as either a yes or a no.

Lessons learned

  • The exposure in an AI documentation pipeline is not created by the model. It is created by the number of forms the same utterance takes and the number of organizations that end up holding one of them, and both of those are decided by ordinary engineering choices made for sound reasons.
  • Retention defaults are the most consequential settings in this class of product and the least likely to have been chosen. A thirty-day abuse-monitoring window at a model provider, a recovery window at a database provider, a log platform that keeps request bodies — each was set by someone solving a different problem, and together they outlive every retention policy the product has written.
  • The failure path is where clinical data leaks. Success-path deletion is nearly universal; deletion on timeout, crash, cancellation and rate limit is not, and a retry that keeps the source file is a correct reliability decision producing an incorrect privacy outcome.
  • Logging is the accidental PHI store, and it is the easiest finding in the entire method to prove either way. Take a known test identifier and a distinctive phrase from a test note, and search the log platform, the crash reporter, the analytics tool and the helpdesk. The result is a finding whichever way it comes back.
  • A vendor advertising healthcare capability tells you nothing about whether a given plan, endpoint, region or configuration is appropriate — and in at least one current case, two of the same vendor's own lists disagree. The question is never whether a provider supports HIPAA; it is what this account, on this plan, calling these endpoints, with these settings, is actually sending and what the provider says it does with it.
  • Encryption is a channel property and business-associate status is a relationship property. Conflating them is the most common architectural error in this space, and HHS has answered it directly: lacking the key does not exempt a provider, and a storage provider is a business associate even if it never views the data.
  • Deleting a row is not deleting the information. Backups, recovery windows, caches, indexes, generated documents, logs and provider-side retention each need their own answer, and a retention promise written against the database describes an eighth of the problem.
  • The cheapest defensible thing a small healthcare software company can do is the thing it is most likely to have skipped. Enforcement in this area repeatedly turns on the absence of an accurate and thorough risk analysis rather than on the failure of a specific technical control.
  • The strongest control available in this architecture is the storage that was never created. Every persistent copy that does not exist is one that needs no encryption, no access control, no retention policy, no deletion path, no subprocessor disclosure and no breach assessment.

Related technologies

  • HIPAA Security Rule (45 CFR Part 164, Subpart C)
  • HIPAA Privacy Rule minimum necessary and de-identification standards
  • HIPAA Breach Notification Rule (45 CFR Part 164, Subpart D)
  • Business associate and subcontractor contracting
  • NIST SP 800-66 Revision 2
  • PHI data-flow mapping and trust-boundary analysis
  • Data minimization and transient processing architecture
  • React Native mobile security
  • iOS Keychain and Android Keystore
  • Node.js and Express API security
  • PostgreSQL row-level security and tenant isolation
  • Managed database platform security configuration
  • Object storage and temporary file handling
  • Encryption in transit and at rest, and key management
  • Secrets management and credential rotation
  • Speech-to-text and large language model APIs
  • Prompt minimization and output validation
  • Prompt-injection threat modelling
  • PHI-minimized audit logging
  • Backup, point-in-time recovery and deletion lifecycle design
  • Vendor and subprocessor assessment
  • Security risk register and remediation planning
GovernanceSanitized case study

NYDFS Part 500 and AI Cybersecurity Readiness Assessment

Independent readiness and gap assessment of a New York-licensed financial institution against 23 NYCRR Part 500, extended to cover the institution's own use of AI and the AI-enabled threats directed at it.

  • Microsoft Entra ID
  • Conditional Access
  • Privileged Identity Management
  • Microsoft Purview
Cybersecurity

Securing the Model Context Protocol as an Enterprise Control Plane

An authored reference architecture and threat model for governing AI tool access at enterprise scale — treating an MCP estate as what it becomes in practice, a control plane with a non-deterministic caller, and placing the enforceable controls where determinism still exists.

  • Model Context Protocol (revision 2026-07-28)
  • JSON-RPC 2.0
  • Streamable HTTP transport
  • OAuth 2.0 Token Exchange (RFC 8693)

Discuss a similar engagement

If your organization faces a comparable challenge, I can walk you through how this approach would translate to your environment.

Get in touch