Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to NextGen Office

Scalekit connector
Open markdown

The NextGen Office connector lets your AI agent act in each user's NextGen Office account. Each user signs in to NextGen Office once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 48 tools.

Tools
48
What they doRead · write · destructive
48 · 0 · 048 read0 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the NextGen Office connection

    In AgentKit > Connections, create a NextGen Office connection. The name you give it is the connection_name your code passes. See Configure connections.

    Console steps with screenshots

    NextGen Office connections use SMART on FHIR and act as the signed-in clinician, through NextGen Office’s provider-facing FHIR R4 API. The API is read-only, so every tool reads data. NextGen Office uses the same endpoints and FHIR server for every practice, and the connection already has them; you add the audience (aud) and the client ID and secret NextGen issues for your app.

    1. Create the connection and copy the redirect URI

      In the Scalekit dashboard, go to AgentKit > Connections > Create Connection, find NextGen Office and click Create. Copy the Redirect URI.

    2. Request a client from NextGen

      Email nextgen-office-api@nextgen.com to request a client for your app, and give NextGen the redirect URI you copied. NextGen issues the client ID and client secret. Each practice that uses your agent needs an active subscription to your registered app.

    3. Enter the values on the connection

      Back on the NextGen Office connection, enter:

      • Client ID and Client Secret: from NextGen.
      • Audience (aud): https://fhir.meditouchehr.com/api/fhir/r4

      Select openid, fhirUser, offline_access and user/*.read, or narrower resource scopes such as user/Patient.read. Click Save.

    NextGen Office has no separate sandbox host. Test with a NextGen Office test practice.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • nextgenoffice_allergy_intolerance_readGet one AllergyIntolerance resource from NextGen Office by its FHIR ID.Read-only

    Get Allergy Intolerance

    Get one AllergyIntolerance resource from NextGen Office by its FHIR ID. Returns the AllergyIntolerance with its allergy and intolerance details, with substances coded in RxNorm, reactions, severity and status. Use this when you have the ID; use nextgenoffice_allergy_intolerance_search to find records.

    Inputs

    allergy_intolerance_idstringrequired
    FHIR logical ID of the AllergyIntolerance resource to return. Example: 12345.
  • nextgenoffice_care_plan_readGet one CarePlan resource from NextGen Office by its FHIR ID.Read-only

    Get Care Plan

    Get one CarePlan resource from NextGen Office by its FHIR ID. Returns the CarePlan with its assessment and plan of treatment, care plans and orders, with status, category, period and narrative. Use this when you have the ID; use nextgenoffice_care_plan_search to find records.

    Inputs

    care_plan_idstringrequired
    FHIR logical ID of the CarePlan resource to return. Example: 12345.
  • nextgenoffice_care_team_readGet one CareTeam resource from NextGen Office by its FHIR ID.Read-only

    Get Care Team

    Get one CareTeam resource from NextGen Office by its FHIR ID. Returns the CareTeam with its care team members and their roles for the patient. Use this when you have the ID; use nextgenoffice_care_team_search to find records.

    Inputs

    care_team_idstringrequired
    FHIR logical ID of the CareTeam resource to return. Example: 12345.
  • nextgenoffice_condition_readGet one Condition resource from NextGen Office by its FHIR ID.Read-only

    Get Condition

    Get one Condition resource from NextGen Office by its FHIR ID. Returns the Condition with its problems, health concerns and encounter diagnoses, coded in SNOMED CT, with clinical status and onset. Use this when you have the ID; use nextgenoffice_condition_search to find records.

    Inputs

    condition_idstringrequired
    FHIR logical ID of the Condition resource to return. Example: PL-123. NextGen Office condition IDs carry a type prefix and a hyphen: PL- (problem list), HC- (health concern) or ED- (encounter diagnosis), for example PL-123.