Skip to main content

Documentation Index

Fetch the complete documentation index at: https://polyai-docs-ecw-integration.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

PolyAI integrates with eClinicalWorks (eCW) through SMART on FHIR, giving virtual agents read access to patient and operational data (subject to permissions). PolyAI handles the OAuth client-credentials token exchange on your behalf and uses scoped, short-lived access tokens for each FHIR request. This integration uses the eCW FHIR R4 API and the FHIR R4 specification standards.

How to integrate eCW with PolyAI

To complete the integration, you register PolyAI as a trusted application in your eCW developer portal, then confirm the request in PolyAI Agent Studio so PolyAI can review and approve it.

Step 1: Register PolyAI in your eCW developer portal

  1. Log in to the eCW developer portal.
  2. Open your app and start a new integration request.
  3. Select System (backend services) as the launch type and choose FHIR R4.
  4. Add the FHIR scopes your agent needs (for example, system/Patient.read system/Group.read).

Step 2: Submit an integration request to the PolyAI eCW App

Invite the PolyAI eCW App as a trusted application using the client ID provided by your PolyAI representative. Make sure the scopes you select match what your agent needs to read during a call. Once all required fields are completed, submit the integration request in eCW.

Step 3: Submit the request in PolyAI Agent Studio

After submitting the request in eCW:
  1. Log in to PolyAI Agent Studio.
  2. Open your Project.
  3. Navigate to Integrations.
  4. Locate the eClinicalWorks integration tile.
  5. Click Submit Request.
This links your eCW submission with your PolyAI project.

Step 4: PolyAI review and approval

Once both steps are complete:
  • Your request will remain in a pending state.
  • PolyAI will review the eCW integration request.
  • PolyAI will reach out if additional information or configuration is required.
After approval, the eCW integration is active in your PolyAI project. PolyAI signs a JWT client assertion, exchanges it for a short-lived access token (typically valid for 5 minutes), and caches tokens per scope so each FHIR call uses the right permissions.

Differences from Epic

If you have used PolyAI’s Epic integration, eCW behaves similarly with a few practical differences:
  • Scopes are per-request. PolyAI requests a separate access token for each set of FHIR scopes and caches them independently.
  • Tokens are shorter-lived. eCW access tokens default to 300 seconds, so PolyAI refreshes them more frequently than Epic’s 3600-second tokens.
You do not need to manage these behaviors yourself — PolyAI handles caching and refresh automatically.

Support

If you encounter any issues during the eCW integration process or have questions about required permissions or scopes, please contact your PolyAI representative or PolyAI Support.

Epic

Connect to Epic EHR for patient data access.

Integrations overview

Browse all available integrations.
Last modified on May 12, 2026