HIPAA is an architecture decision, not a feature
The biggest mistake healthcare software projects make is treating HIPAA compliance as a feature to add later. It is not. HIPAA requirements affect your database design, authentication system, hosting infrastructure, and even how you handle error logging.
Adding compliance after the fact means rebuilding. Building it in from the start means doing it once, correctly.
What HIPAA actually requires for software
HIPAA has two main rule sets that affect software development:
The Privacy Rule: Controls who can access Protected Health Information (PHI) and under what circumstances. In software terms, this means role-based access control, audit trails, and data minimization.
The Security Rule: Specifies technical safeguards for electronic PHI (ePHI). This covers encryption, access controls, authentication, and transmission security.
The technical safeguards checklist
Access Controls
- Unique user identification (no shared accounts)
- Emergency access procedures for system downtime
- Automatic session timeout after inactivity
- Role-based permissions tied to job functions
- Multi-factor authentication for all users handling PHI
Audit Controls
- Log every access to PHI (who, what, when)
- Log all modifications to PHI records
- Log authentication attempts (successful and failed)
- Retain logs for a minimum of 6 years
- Make logs tamper-evident (write-once storage)
Integrity Controls
- Encryption at rest for all PHI (AES-256 minimum)
- Encryption in transit (TLS 1.2+ for all connections)
- Input validation to prevent injection attacks
- Database-level encryption for sensitive fields
- Integrity verification for stored data
Transmission Security
- End-to-end encryption for all data in transit
- Secure APIs with authentication tokens
- No PHI in URLs, query strings, or error messages
- Email encryption for any communications containing PHI
Infrastructure requirements
Your hosting environment must support HIPAA compliance:
-
Business Associate Agreement (BAA): Your cloud provider must sign a BAA. AWS, Azure, and GCP all offer HIPAA-eligible services, but you must configure them correctly.
-
Dedicated environments: PHI should live in isolated environments, not shared with non-healthcare workloads.
-
Backup and disaster recovery: Encrypted backups with tested recovery procedures. RPO and RTO must be documented.
-
Network segmentation: PHI-handling systems should be in their own network segment with restricted access.
Common architecture patterns
Patient Portal Architecture
Client (Browser)
-> TLS 1.3 ->
API Gateway (rate limiting, auth)
->
Application Server (RBAC, audit logging)
->
Encrypted Database (AES-256, field-level)
->
Audit Log Store (immutable, 6-year retention)
Key design decisions:
- Authentication: OAuth 2.0 + PKCE with MFA required
- Authorization: Attribute-based access control (ABAC) for fine-grained permissions
- Data storage: Field-level encryption for PHI columns, standard encryption for everything else
- Audit logging: Structured JSON logs shipped to immutable storage
- Error handling: Sanitized error messages that never expose PHI
Testing and validation
HIPAA compliance requires ongoing validation, not just a one-time audit:
- Penetration testing: Annual minimum, quarterly recommended
- Vulnerability scanning: Automated weekly scans of all infrastructure
- Access reviews: Quarterly review of all user permissions
- Risk assessment: Annual comprehensive risk analysis
- Incident response drills: Simulated breach scenarios twice per year
The cost of getting it wrong
HIPAA violations carry penalties ranging from $100 to $50,000 per violation, with annual maximums up to $1.5 million per violation category. Beyond fines, breaches damage patient trust and can end a healthcare business.
The investment in building compliance correctly from the start is always cheaper than remediation after a breach.
Getting started
If you are building healthcare software, start with these three steps:
- Conduct a risk assessment to identify where PHI will flow through your system
- Select HIPAA-eligible infrastructure and sign BAAs with all vendors
- Design your data model with encryption and access controls built into the schema
HIPAA compliance is achievable for teams of any size. It requires discipline and planning, but it does not require enterprise-scale budgets or teams.


