← Thyra Health

HIPAA Security Architecture for Cloud-Native EHRs

Author: Jean Jacques Nya Ngatchou, MD | November 15, 2025

Jean Jacques Nya Ngatchou, MD is a board-certified endocrinologist and the founder of Thyra, an AI-powered EHR for specialty and primary care workflows. He previously practiced at Optum and completed his endocrinology fellowship at the University of Washington. Thyra is backed by INSEAD AI Venture Lab and Google Cloud for Startups.

HIPAA compliance is not a checkbox. For cloud-native EHRs, it requires deliberate architecture decisions around encryption, access control, and audit logging.

Cloud changes the threat model

Traditional on-premise EHRs had a simple security perimeter: the clinic's network. Cloud-native EHRs have no perimeter. Data flows through APIs, is stored in managed databases, and is accessed from anywhere.

This is not inherently less secure. In many ways, cloud infrastructure offers better security primitives than on-premise. But it requires different architectural thinking.

The three pillars of HIPAA technical safeguards

Encryption

HIPAA requires encryption of ePHI at rest and in transit. For cloud-native systems:

In transit: TLS 1.2+ for all API communications. No exceptions. This includes internal service-to-service calls, not just external-facing APIs.

At rest: AES-256 encryption for databases, file storage, and backups. Use your cloud provider's managed encryption with customer-managed keys (CMK) for maximum control.

Application-level encryption: Consider encrypting sensitive fields (SSN, detailed clinical notes) at the application level before they reach the database. This protects against database-level breaches.

Access control

Role-based access control (RBAC) is the minimum. For clinical systems, you often need:

Implement access control at the API layer, not just the UI layer. A user who cannot see a field in the interface should not be able to retrieve it via API.

Audit logging

Every access to ePHI must be logged. Every modification must be logged. The log must include:

Audit logs must be:

Architecture decisions that matter

Multi-tenancy isolation

If you serve multiple clinics, tenant isolation is critical. Options:

Row-level security with PostgreSQL policies is practical for most EHR deployments, but every query must be tested to ensure tenant data cannot leak.

API security

Backup and disaster recovery

The BAA chain

Every cloud service that touches ePHI needs a Business Associate Agreement. This includes:

Map your data flow. Every service in the flow needs a BAA.

Risk assessment

HIPAA requires an annual risk assessment. For cloud-native systems, this should include:

The standard to hold

Security is not a feature you add after launch. It is an architecture you design from the start. Every shortcut in security becomes technical debt with regulatory consequences.


Frequently Asked Questions

How do AI EHRs prevent hallucinations in clinical workflows?

A well-designed clinical AI should never operate on information it generated itself. Every piece of data it references, lab values, medication lists, diagnosis codes, vital signs, should come from the verified clinical record through FHIR interfaces. The AI synthesizes and drafts based on this data but cannot introduce new clinical facts. The second layer is deterministic rules for high-stakes actions: abnormal results get flagged for physician review before any message is sent, and critical values trigger immediate escalation regardless of what the AI suggests. The third layer is a complete audit trail for every AI-assisted action. Thyra implements all three layers.

How is auditability handled for AI-assisted actions?

Auditability for AI-assisted clinical actions requires logging every decision point: what the AI suggested, the data that informed the suggestion, the clinician's response, and the final action taken. This creates a complete chain of evidence for each interaction. Thyra logs every prioritization and routing decision with "why" signals (which data triggered the recommendation, what confidence level was assigned, who reviewed it, and what the outcome was). These audit trails integrate with existing compliance dashboards and support both internal quality review and regulatory requirements.

What safeguards exist for automated clinical suggestions?

Safeguards for automated clinical suggestions include human-in-the-loop review (clinicians approve any recommendation before it becomes an order or patient instruction), confidence thresholds (low-confidence classifications fall back to manual triage), escalation pathways (red-flag symptoms trigger immediate routing rather than waiting in a general queue), role-based access control, and HIPAA-aligned encryption and access logging. The core principle is that automation should support clinical decision-making without silently practicing medicine.