HIPAA Technical Safeguards
OmniEHR implements comprehensive technical safeguards to ensure HIPAA compliance for Protected Health Information (PHI). The system is designed with security-first principles to meet regulatory requirements for healthcare data protection.Administrative Controls
Access Control
Role-based access control (RBAC) with three distinct roles: admin, practitioner, and auditor
Audit Trail
Comprehensive logging of all PHI access and modifications
Authentication
JWT-based authentication with configurable token expiration
Encryption
AES-256-GCM encryption for all PHI at rest
Technical Implementation
The system enforces HIPAA compliance through multiple layers:1. Access Control
All API endpoints require authentication via JWT bearer tokens. Access is restricted based on user roles:2. Audit Logging
Every FHIR and administrative API request is automatically logged with comprehensive audit information:Audit logs are stored with indexed fields for efficient querying by date, user, resource type, and outcome. They capture both successful and failed access attempts.
3. PHI Encryption
All Protected Health Information fields are encrypted at rest using AES-256-GCM:iv- Initialization vector (12 bytes)authTag- Authentication tag for integrity verificationcontent- Encrypted data
Required Environment Variables
From~/workspace/source/server/src/config/env.js:5, the following environment variables are required for security:
The system validates that all required security environment variables are present at startup and will fail fast if any are missing.
Audit Log Schema
Audit logs track the following information for compliance:| Field | Type | Description |
|---|---|---|
actorUserId | ObjectId | Reference to the User who performed the action |
actorEmail | String | Email of the actor for human readability |
actorRole | String | Role at the time of action (admin/practitioner/auditor) |
action | String | Type of action (read/create/update/delete) |
resourceType | String | FHIR resource type or admin resource |
resourceId | String | Specific resource identifier |
method | String | HTTP method (GET/POST/PUT/DELETE) |
path | String | Full request path |
statusCode | Number | HTTP response status code |
outcome | String | success or failure |
ipAddress | String | Client IP address |
userAgent | String | Client user agent |
createdAt | Date | Timestamp of the action |
Access to Audit Logs
From~/workspace/source/server/src/routes/adminRoutes.js:83, audit logs are accessible only to admins and auditors:
page- Page number (default: 1)limit- Results per page (default: 50)outcome- Filter by success/failureresourceType- Filter by resource typeactorEmail- Filter by user email
Compliance Checklist
- ✅ Access Control: Role-based permissions enforced at API level
- ✅ Audit Trail: All PHI access logged with actor, action, and outcome
- ✅ Encryption: AES-256-GCM encryption for PHI at rest
- ✅ Authentication: JWT-based authentication with expiration
- ✅ Integrity: GCM mode provides authenticated encryption
- ✅ Minimum Necessary: Role-based filtering limits data exposure
Next Steps
Authentication
Learn about JWT authentication and login flow
Encryption
Deep dive into PHI encryption implementation
RBAC
Understand role-based access control
API Reference
View authentication API endpoints