
A practical step-by-step guide to scoping PHI, designing the three required safeguard layers, managing Business Associate Agreements, and sustaining compliance through launch and beyond.
Any application that stores, transmits, or processes Protected Health Information (PHI) on behalf of a hospital, clinic, insurer, or pharmacy must meet HIPAA's requirements before it handles a single patient record. Getting there is not a one-time checklist; it is an engineering and operational discipline that runs from the first design decision through every release that follows. This guide walks through what the law requires, how to design for it, and the concrete steps a development team takes to reach and maintain compliance.
PHI is any individually identifiable health information linked to a past, present, or future medical condition, treatment, or payment. The category is broader than most teams expect:
If your application collects, stores, or transmits any of these in connection with health care, it handles PHI and HIPAA applies. This includes not just covered entities — hospitals, clinics, and insurers — but also business associates: the development companies, cloud providers, analytics platforms, and any other vendor that processes PHI on a covered entity's behalf.
HIPAA's framework rests on three rules that any compliant application must address.
The Privacy Rule governs how PHI may be used and disclosed. It establishes patient rights — to access their own records, request corrections, and receive notice of how their data is used. Your application design must implement these rights: data access endpoints, correction workflows, and privacy notices.
The Security Rule specifies the administrative, physical, and technical safeguards required to protect electronic PHI (ePHI). This is where most engineering work lives.
The Breach Notification Rule requires covered entities and their business associates to notify affected individuals and HHS within 60 days of discovering a breach. That clock starts at discovery — not at the conclusion of your investigation.
The Security Rule organizes its requirements into three categories. A compliant application must address all three; gaps in any one are audit findings.
Administrative safeguards are policies and procedures — not code — but they drive every technical decision that follows.
These are the controls your engineering team builds into the application and infrastructure.
| Control | Requirement |
|---|---|
| Unique user IDs | Every account maps to one individual — no shared logins |
| Role-Based Access Control | Least-privilege access by job function |
| Multi-factor authentication | Required for administrative and clinical roles |
| Automatic logoff | Enforced on inactivity on both web and mobile |
| Encryption at rest | AES-256 or equivalent for all ePHI storage |
| Encryption in transit | TLS 1.2 or higher for all network communication |
| Audit logging | Immutable logs capturing reads, writes, and configuration changes |
| Data integrity controls | Mechanisms detecting unauthorized modification of ePHI |
Mobile applications carry one additional requirement: any PHI cached or stored locally on a device must be encrypted at rest with device-level controls. Applications must also implement appropriate handling for compromised devices.
For cloud-native applications, the hosting provider handles data centre infrastructure under its own BAA. Your team retains responsibility for workstation and mobile device controls, tested backup and disaster recovery procedures, emergency access procedures for critical clinical scenarios, and the handling of PHI in development and staging environments.
Before writing a line of code, document every category of PHI the application will touch and trace the full lifecycle: where it enters, where it is stored, how it moves between services, and how it is deleted or de-identified. The output is a written PHI data flow diagram. You cannot design safeguards for data flows you have not mapped, and this diagram becomes the foundation of your risk analysis.
Review the data flow diagram against known threat categories: unauthorized access, data interception in transit, ransomware and data destruction, insider misuse, and infrastructure failure. For each threat, document the likelihood, the potential impact, and the control you plan to implement. Write this down in a dated document. A missing or undated risk analysis is a finding on its own — it is not sufficient to demonstrate that the analysis was done verbally or informally.
Not every service from a cloud provider is covered by the provider's BAA. Before routing any ePHI to a cloud service, confirm it appears on the provider's published list of eligible services. AWS publishes its HIPAA Eligible Services reference; Microsoft documents covered Azure services in its compliance offerings; Google Cloud lists eligible services in its Healthcare compliance guide.
Sign the BAA with your chosen provider before any production PHI flows through it. If your application integrates with EHR systems, plan FHIR API support at architecture time — retrofitting an integration layer after data models are established is significantly more expensive.
Build the controls defined in the technical safeguards layer. A few architecture patterns make this more reliable:
Authentication and access: Use a centralized policy engine for access decisions rather than scattering authorization checks across services. Issue short-lived authentication tokens with refresh flows; enforce logoff at the server, not only in the UI.
Encryption: Use cloud-managed key services (AWS KMS, Azure Key Vault, Cloud KMS) rather than hardcoded keys. Never store unencrypted PHI in local device storage, application caches, or development environments.
Audit logging: Build an immutable, append-only audit log pipeline that ships records to a separate, write-protected service — AWS CloudTrail, Azure Monitor Logs, or Google Cloud Audit Logs. The application should not be able to delete its own audit records.
For AI or machine learning features that process PHI, add access logging at the model level and document how PHI enters and exits the model pipeline.
Integrate compliance into your engineering process rather than treating it as a final audit:
Before accepting production PHI, complete:
Common failure modes discovered at this stage: storage buckets missing server-side encryption, analytics SDKs transmitting device identifiers alongside PHI, logging pipelines that strip PHI from application logs but leave it exposed in infrastructure logs, and admin access roles left over from development that were never tightened.
Launch is the beginning, not the end. Sustained compliance requires:
The 60-day breach notification window under the Breach Notification Rule starts at discovery. Build incident response procedures around fast triage with pre-approved communication templates — the investigation continues in parallel with notification, not in sequence before it.
Treating compliance as a launch checklist. Enforcement consistently targets organizations with a compliant launch but no ongoing maintenance program. The risk analysis, BAA register, and audit log reviews all require periodic updates as the application and its threat landscape evolve.
Missing BAAs with downstream vendors. Push notification services, error tracking SDKs, analytics platforms, and customer support systems are all business associates if PHI passes through them. Each needs a signed BAA. Many teams audit their primary cloud provider carefully and then overlook a dozen smaller tools in the same stack.
Using non-eligible cloud services. A service from a HIPAA-capable cloud provider is not automatically covered by the provider's BAA. Logs routed to non-eligible monitoring endpoints, files cached in non-eligible CDN tiers, or backups in non-eligible archive storage are out-of-scope for the BAA and create compliance exposure.
Broad access roles left from development. Admin roles granted during development and never tightened before launch are a recurring audit finding. Every production role needs documented justification, a minimum-necessary scope, and a named owner.
Skipping mobile-specific controls. Automatic logoff, encrypted local storage, and device-level access controls must be tested on real hardware in realistic conditions. Simulator and emulator testing does not expose the same failure modes as a real device.
HIPAA compliance is not a status you achieve and hold. It is a set of practices — risk analysis, access control, encryption, audit logging, BAA management, and ongoing testing — that must run continuously as the application evolves. Teams that build these practices into their engineering culture before writing production code spend significantly less time and money retrofitting them later. The common thread across avoidable enforcement situations is not a single missed control; it is an organization that treated compliance as a project milestone rather than an ongoing operating discipline.