Epic Integration
This guide covers connecting Vigil to Epic.
Prerequisites
Before starting, you need:
- Epic App Orchard registration (or equivalent)
- FHIR R4 endpoint URL
- OAuth2 client credentials (client ID, client secret)
- Required scopes approved
Work with your Epic administrator to obtain these credentials.
Required Scopes
Request these FHIR scopes:
| Scope | Purpose |
|---|---|
patient/Patient.read | Read patient demographics |
patient/Observation.read | Read existing observations |
patient/Observation.write | Write observations from Vigil |
Configuration Steps
1. Access Integration Settings
- Sign in to Vigil as IT Admin
- Navigate to Settings > Integrations
- Tap Config tab
2. Configure EMR Connection
| Field | Value |
|---|---|
| EMR Type | Epic |
| FHIR Base URL | https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4 (example) |
| Auth URL | https://fhir.epic.com/interconnect-fhir-oauth/oauth2/token (example) |
| Client ID | From Epic |
| Client Secret | From Epic |
| FHIR Version | R4 |
3. Configure Patient Matching
Select matching method based on your Epic configuration:
- MRN - Match on Epic MRN
- MRN + DOB - Match on MRN and date of birth
4. Configure Data Flows
Enable desired data flows:
- ✓ Patient Census (Inbound)
- ✓ Observations (Outbound)
- ✓ Vitals (Outbound)
- ✓ Assessments (Outbound)
5. Test Connection
- Tap Save
- Return to Status tab
- Tap Test Connection
- Verify successful connection
ADT Integration
To receive patient census updates:
Epic Configuration
- Configure Epic to send ADT messages to Vigil's webhook
- Use HL7 v2.5.1 format
- Include these segments:
- MSH (Message Header)
- EVN (Event Type)
- PID (Patient Identification)
- PV1 (Patient Visit)
Vigil Configuration
- Navigate to Config tab
- Set HL7 Version to 2.5.1
- Note the Webhook URL displayed
- Provide this URL to your Epic administrator
ADT Events
| Event | Epic Action | Vigil Action |
|---|---|---|
| A01 | Admit | Create patient |
| A02 | Transfer | Update unit/room |
| A03 | Discharge | Mark discharged |
| A08 | Update | Update demographics |
SMART on FHIR Launch
Enable launching Vigil directly from Epic:
Configuration
- In Config tab, set SMART Launch URL
- Provide this URL to your Epic administrator
- Epic configures a hyperlink or button
Usage
- Staff clicks Vigil link in Epic
- Vigil opens to the correct patient context
- No additional sign-in required (SSO)
Troubleshooting
Connection fails
- Verify FHIR Base URL is accessible from Vigil
- Check client credentials are correct
- Ensure required scopes are approved
Syncs failing
- Check Sync Log for error messages
- Verify patient exists in Epic (matching may fail)
- Review OAuth token expiration
ADT not arriving
- Verify Epic is configured to send to correct URL
- Check network connectivity
- Review ADT Log for received messages
Contact your Epic administrator and Vigil support for complex issues.