Security and Auditing
The Patient Chart Viewer enforces OAuth 2.0 security requirements to protect patient data and supports full audit logging to ensure compliance with HIPAA and organizational monitoring policies. Sessions are authenticated, time-bound, and monitored to prevent unauthorized access and maintain a traceable record of chart activity.
OAuth 2.0 Protections
Viewer access requires a valid OAuth 2.0 access token issued during the SMART on FHIR launch flow. Health Gorilla validates the access token on every FHIR API request and enforces all associated scopes and client-level permissions.
Access control and session security behaviors include:
- All API requests must use a valid bearer token in the
Authorizationheader over HTTPS - Access tokens are short-lived and expire based on the
expires_invalue returned during token exchange - Expired tokens are rejected with an HTTP 401 response; refresh tokens may be used to renew access if issued
- Viewer sessions terminate automatically when the token expires, is revoked, or the browser tab is closed
- Scopes such as
patient/*.*oruser/*.*determine which resources are accessible in the viewer session - Session duration is tied to the token lifespan and does not persist any data beyond the session window
Session Activity and Logging
All activity within the Patient Chart Viewer is logged to support auditability, security monitoring, and usage tracking. Health Gorilla maintains immutable records of:
- Viewer launch and termination times
- OAuth client ID and application metadata
- SMART launch context, including patient ID and optional encounter or practitioner references
- All FHIR resource requests made during the session
- HTTP status codes and any authorization or access errors
- User-agent and IP address for each request
- Token lifecycle events such as issuance, expiration, and revocation
These records are stored in accordance with Health Gorilla’s audit and retention policies and can be surfaced upon request for compliance purposes.
Internal Audit Integration
To support internal security monitoring, you can capture additional metadata through the viewer workflow:
- Use the
redirect_uriparameter on logout to capture session end timestamps and associate user identity in your system - Track token issuance and refresh activity on your OAuth backend
- Monitor viewer launches by logging SMART context parameters, such as
launchorfhirUser - Use
X-Hg-Request-Idheaders from FHIR API responses to link access logs and detect failures or anomalies - Generate alerting or notifications for unauthorized access attempts, expired token reuse, or repeated 401 errors
Audit events can also be integrated with your existing compliance frameworks or SIEM infrastructure. If you require access to session logs or audit trails for investigation or certification purposes, contact Health Gorilla Support.