> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to NextGen Office

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.

**Authentication:** SMART On FHIR
**Categories:** Healthcare
**Tools:** 48: 48 read, 0 write, 0 destructive
**Users sign in with:** SMART on FHIR
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=NEXTGENOFFICE)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".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](/agentkit/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](https://app.scalekit.com), 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](mailto: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`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'nextgenoffice_allergy_intolerance_read',
  toolInput: {
    allergy_intolerance_id: '<allergy_intolerance_id>',
  },
  connector: 'nextgenoffice',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="nextgenoffice_allergy_intolerance_read",
    tool_input={
        "allergy_intolerance_id": "<allergy_intolerance_id>",
    },
    connection_name="nextgenoffice",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `nextgenoffice_allergy_intolerance_read`

Get Allergy Intolerance · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `allergy_intolerance_id` (`string`, required): FHIR logical ID of the AllergyIntolerance resource to return. Example: 12345.

Example input: `{"allergy_intolerance_id":"<allergy_intolerance_id>"}`

### `nextgenoffice_allergy_intolerance_search`

Search Allergy Intolerances · Read-only

List a patient's allergies and intolerances in NextGen Office. Returns a FHIR searchset Bundle of AllergyIntolerance resources with their allergy and intolerance details, with substances coded in RxNorm, reactions, severity and status. Use this to see all of a patient's allergies. Use nextgenoffice_allergy_intolerance_read for one record by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `date` (`string`, optional): Filter by when the allergy was recorded. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_care_plan_read`

Get Care Plan · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `care_plan_id` (`string`, required): FHIR logical ID of the CarePlan resource to return. Example: 12345.

Example input: `{"care_plan_id":"<care_plan_id>"}`

### `nextgenoffice_care_plan_search`

Search Care Plans · Read-only

List a patient's care plans and assessment and plan of treatment notes in NextGen Office. Returns a FHIR searchset Bundle of CarePlan resources with their assessment and plan of treatment, care plans and orders, with status, category, period and narrative. Use this for treatment plans. Use nextgenoffice_goal_search for the patient's goals. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `category` (`string`, required): Care plan category code (required by NextGen Office). US Core uses assess-plan for assessment and plan of treatment. Example: assess-plan.
- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `date` (`string`, optional): Filter by the care plan period. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"category":"<category>","patient":"<patient>"}`

### `nextgenoffice_care_team_read`

Get Care Team · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `care_team_id` (`string`, required): FHIR logical ID of the CareTeam resource to return. Example: 12345.

Example input: `{"care_team_id":"<care_team_id>"}`

### `nextgenoffice_care_team_search`

Search Care Teams · Read-only

List a patient's care team in NextGen Office, or get one care team by ID. Send patient alone, patient with status, or _id alone. Any other combination, status alone, or no filter returns 400 Bad Request. Returns a FHIR searchset Bundle of CareTeam resources with their care team members and their roles for the patient. Use this to see who cares for a patient. Use nextgenoffice_practitioner_read for a member's details. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `_id` (`string`, optional): Logical ID of a single CareTeam resource to return as a one-entry Bundle. Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `patient` (`string`, optional): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345. Required unless _id is given.
- `status` (`string`, optional): Care team status to filter by (needs patient): proposed, active, suspended, inactive or entered-in-error. Example: active. One of: `proposed`, `active`, `suspended`, `inactive`, `entered-in-error`.

Example input: `{}`

### `nextgenoffice_condition_read`

Get Condition · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `condition_id` (`string`, required): 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.

Example input: `{"condition_id":"<condition_id>"}`

### `nextgenoffice_condition_search`

Search Conditions · Read-only

List a patient's problems, health concerns and encounter diagnoses in NextGen Office. Returns a FHIR searchset Bundle of Condition resources with their problems, health concerns and encounter diagnoses, coded in SNOMED CT, with clinical status and onset. Use this for a patient's problem list. Use nextgenoffice_condition_read for one condition by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `category` (`string`, optional): Condition category code to filter by: problem-list-item, health-concern or encounter-diagnosis. Example: problem-list-item.
- `date` (`string`, optional): Filter by the condition's recorded or onset date. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_coverage_read`

Get Coverage · Read-only

Get one Coverage resource from NextGen Office by its FHIR ID. Returns the Coverage with its insurance coverage: payer, plan, subscriber, member ID, relationship and period. Use this when you have the ID; use nextgenoffice_coverage_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `coverage_id` (`string`, required): FHIR logical ID of the Coverage resource to return. Example: 12345.

Example input: `{"coverage_id":"<coverage_id>"}`

### `nextgenoffice_coverage_search`

Search Coverages · Read-only

List a patient's insurance coverage in NextGen Office. Returns a FHIR searchset Bundle of Coverage resources with their insurance coverage: payer, plan, subscriber, member ID, relationship and period. Use this for the patient's insurance. Use nextgenoffice_coverage_read for one coverage by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_device_read`

Get Device · Read-only

Get one Device resource from NextGen Office by its FHIR ID. Returns the Device with its implantable devices with Unique Device Identifier (UDI), type and status. Use this when you have the ID; use nextgenoffice_device_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `device_id` (`string`, required): FHIR logical ID of the Device resource to return. Example: 12345.

Example input: `{"device_id":"<device_id>"}`

### `nextgenoffice_device_search`

Search Devices · Read-only

List a patient's implantable devices in NextGen Office. Returns a FHIR searchset Bundle of Device resources with their implantable devices with Unique Device Identifier (UDI), type and status. Use this for implants. Use nextgenoffice_device_read for one device by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `date` (`string`, optional): Filter by the device date. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_diagnostic_report_read`

Get Diagnostic Report · Read-only

Get one DiagnosticReport resource from NextGen Office by its FHIR ID. Returns the DiagnosticReport with its lab and radiology reports, with status, category, code, dates and references to their result Observations. Use this when you have the ID; use nextgenoffice_diagnostic_report_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `diagnostic_report_id` (`string`, required): FHIR logical ID of the DiagnosticReport resource to return. Example: 12345.

Example input: `{"diagnostic_report_id":"<diagnostic_report_id>"}`

### `nextgenoffice_diagnostic_report_search`

Search Diagnostic Reports · Read-only

List a patient's lab and radiology reports in NextGen Office. Returns a FHIR searchset Bundle of DiagnosticReport resources with their lab and radiology reports, with status, category, code, dates and references to their result Observations. Use this for whole reports. Use nextgenoffice_observation_search for individual result values. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `category` (`string`, optional): Report category code to filter by, such as LAB or RAD. Example: LAB.
- `code` (`string`, optional): Code of the report (usually LOINC) to filter by. Example: 24323-8.
- `date` (`string`, optional): Filter by the report date. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_document_reference_read`

Get Document Reference · Read-only

Get one DocumentReference resource from NextGen Office by its FHIR ID. Returns the DocumentReference with its clinical note and document metadata (type, category, date, author, status) with the document content or a link to it. Use this when you have the ID; use nextgenoffice_document_reference_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `document_reference_id` (`string`, required): FHIR logical ID of the DocumentReference resource to return. Example: 12345.

Example input: `{"document_reference_id":"<document_reference_id>"}`

### `nextgenoffice_document_reference_search`

Search Document References · Read-only

List a patient's clinical notes and documents in NextGen Office. Returns a FHIR searchset Bundle of DocumentReference resources with their clinical note and document metadata (type, category, date, author, status) with the document content or a link to it. Use this to find notes. Use nextgenoffice_document_reference_read for one document by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_id` (`string`, optional): Logical ID of a single DocumentReference resource to return as a one-entry Bundle. Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `category` (`string`, optional): Document category code. NextGen Office supports only clinical-note. Example: clinical-note. One of: `clinical-note`.
- `date` (`string`, optional): Filter by when the document reference was created. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.
- `status` (`string`, optional): Document status to filter by: current, superseded or entered-in-error. Example: current. One of: `current`, `superseded`, `entered-in-error`.
- `type` (`string`, optional): Document type code, LOINC where possible, to filter by. Example: 11506-3 (progress note).

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_encounter_read`

Get Encounter · Read-only

Get one Encounter resource from NextGen Office by its FHIR ID. Returns the Encounter with its visits with type, status, period, participants, reason and location. Use this when you have the ID; use nextgenoffice_encounter_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `encounter_id` (`string`, required): FHIR logical ID of the Encounter resource to return. Example: PT-123. NextGen Office encounter IDs carry the prefix PT- and a hyphen, for example PT-123.

Example input: `{"encounter_id":"<encounter_id>"}`

### `nextgenoffice_encounter_search`

Search Encounters · Read-only

List a patient's encounters (visits) in NextGen Office, or get one encounter by ID. Send either patient (optionally with date) or _id alone. Any other combination, date alone, or no filter returns 400 Bad Request. Returns a FHIR searchset Bundle of Encounter resources with their visits with type, status, period, participants, reason and location. Use this to browse visits. Use nextgenoffice_encounter_read for one encounter by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `_id` (`string`, optional): Logical ID of a single Encounter resource to return as a one-entry Bundle. Example: PT-123.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `date` (`string`, optional): Filter by a date within the encounter period (needs patient). Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.
- `patient` (`string`, optional): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345. Required unless _id is given.

Example input: `{}`

### `nextgenoffice_goal_read`

Get Goal · Read-only

Get one Goal resource from NextGen Office by its FHIR ID. Returns the Goal with its patient goals with description, lifecycle status, targets and dates. Use this when you have the ID; use nextgenoffice_goal_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `goal_id` (`string`, required): FHIR logical ID of the Goal resource to return. Example: 12345.

Example input: `{"goal_id":"<goal_id>"}`

### `nextgenoffice_goal_search`

Search Goals · Read-only

List a patient's goals in NextGen Office. Returns a FHIR searchset Bundle of Goal resources with their patient goals with description, lifecycle status, targets and dates. Use this for patient goals. Use nextgenoffice_care_plan_search for treatment plans. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `date` (`string`, optional): Filter by the goal target date. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_immunization_read`

Get Immunization · Read-only

Get one Immunization resource from NextGen Office by its FHIR ID. Returns the Immunization with its immunization records with vaccines coded in CVX, status and administration date. Use this when you have the ID; use nextgenoffice_immunization_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `immunization_id` (`string`, required): FHIR logical ID of the Immunization resource to return. Example: 12345.

Example input: `{"immunization_id":"<immunization_id>"}`

### `nextgenoffice_immunization_search`

Search Immunizations · Read-only

List a patient's immunization records in NextGen Office. Returns a FHIR searchset Bundle of Immunization resources with their immunization records with vaccines coded in CVX, status and administration date. Use this for vaccination history. Use nextgenoffice_immunization_read for one record by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `date` (`string`, optional): Filter by the immunization date. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_location_read`

Get Location · Read-only

Get one Location resource from NextGen Office by its FHIR ID. Returns the Location with its location name, address, type, status and contact details. NextGen Office has no search for this resource, so take the ID from a reference in another resource.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `location_id` (`string`, required): FHIR logical ID of the Location resource to return. Example: 12345.

Example input: `{"location_id":"<location_id>"}`

### `nextgenoffice_medication_administration_read`

Get Medication Administration · Read-only

Get one MedicationAdministration resource from NextGen Office by its FHIR ID. Returns the MedicationAdministration with its records of medications given to the patient in the practice, coded in RxNorm, with dose and status. Use this when you have the ID; use nextgenoffice_medication_administration_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `medication_administration_id` (`string`, required): FHIR logical ID of the MedicationAdministration resource to return. Example: 12345.

Example input: `{"medication_administration_id":"<medication_administration_id>"}`

### `nextgenoffice_medication_administration_search`

Search Medication Administrations · Read-only

List medications administered to a patient in NextGen Office. Returns a FHIR searchset Bundle of MedicationAdministration resources with their records of medications given to the patient in the practice, coded in RxNorm, with dose and status. Use this for in-office administrations. Use nextgenoffice_medication_request_search for prescriptions. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `status` (`string`, optional): Administration status code to filter by, such as completed. Example: completed.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_medication_dispense_read`

Get Medication Dispense · Read-only

Get one MedicationDispense resource from NextGen Office by its FHIR ID. Returns the MedicationDispense with its medication dispense records with the medication coded in RxNorm, quantity and status. Use this when you have the ID; use nextgenoffice_medication_dispense_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `medication_dispense_id` (`string`, required): FHIR logical ID of the MedicationDispense resource to return. Example: 12345.

Example input: `{"medication_dispense_id":"<medication_dispense_id>"}`

### `nextgenoffice_medication_dispense_search`

Search Medication Dispenses · Read-only

List a patient's medication dispense records in NextGen Office. Returns a FHIR searchset Bundle of MedicationDispense resources with their medication dispense records with the medication coded in RxNorm, quantity and status. Use this to see what was dispensed. Use nextgenoffice_medication_request_search for prescriptions. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `status` (`string`, optional): Dispense status code to filter by, such as completed. Example: completed.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_medication_request_read`

Get Medication Request · Read-only

Get one MedicationRequest resource from NextGen Office by its FHIR ID. Returns the MedicationRequest with its prescriptions with the medication coded in RxNorm, dosage instructions, status, intent and prescriber. Use this when you have the ID; use nextgenoffice_medication_request_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `medication_request_id` (`string`, required): FHIR logical ID of the MedicationRequest resource to return. Example: 12345.

Example input: `{"medication_request_id":"<medication_request_id>"}`

### `nextgenoffice_medication_request_search`

Search Medication Requests · Read-only

List a patient's medication prescriptions in NextGen Office. Returns a FHIR searchset Bundle of MedicationRequest resources with their prescriptions with the medication coded in RxNorm, dosage instructions, status, intent and prescriber. Use this for a patient's medication list. Use nextgenoffice_medication_request_read for one prescription by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `date` (`string`, optional): Filter by the prescription date. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.
- `intent` (`string`, optional): Prescription intent code to filter by, such as order or plan. Example: order.
- `status` (`string`, optional): Prescription status code to filter by, such as active, completed or stopped. Example: active.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_next_page`

Get Next Page of Search Results · Read-only

Fetch the next page of results from a previous NextGen Office search tool by following the Bundle's `next` link. Returns a FHIR searchset Bundle in the same shape as the original search. When the returned Bundle has no `next` link, it is the last page.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `next_page_path` (`string`, required): The part of the previous Bundle's `link` entry with relation `next` that comes after `https://fhir.meditouchehr.com/api/fhir/r4`, without the leading slash. Pass it exactly as returned; do not rebuild or re-encode it. This server is HAPI FHIR, whose next links usually look like `https://fhir.meditouchehr.com/api/fhir/r4?_getpages=7f3c9a2e&_getpagesoffset=10&_count=10&_bundletype=searchset`; for that link pass `?_getpages=7f3c9a2e&_getpagesoffset=10&_count=10&_bundletype=searchset`. If the link instead looks like `https://fhir.meditouchehr.com/api/fhir/r4/Observation?patient=12345&_getpagesoffset=10`, pass `Observation?patient=12345&_getpagesoffset=10`.

Example input: `{"next_page_path":"<next_page_path>"}`

### `nextgenoffice_observation_read`

Get Observation · Read-only

Get one Observation resource from NextGen Office by its FHIR ID. Returns the Observation with its vital signs, lab results, social history and smoking status, with codes, values, units and dates. Use this when you have the ID; use nextgenoffice_observation_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `observation_id` (`string`, required): FHIR logical ID of the Observation resource to return. Example: VS-123. NextGen Office observation IDs carry a type prefix and a hyphen: HX- (history), VS- (vital signs) or LR- (lab result), for example VS-123.

Example input: `{"observation_id":"<observation_id>"}`

### `nextgenoffice_observation_search`

Search Observations · Read-only

List a patient's observations in NextGen Office: vital signs, lab results, social history and smoking status. Returns a FHIR searchset Bundle of Observation resources with their vital signs, lab results, social history and smoking status, with codes, values, units and dates. Use this for vitals and results. Use nextgenoffice_diagnostic_report_search for whole lab or imaging reports. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `category` (`string`, optional): Observation category code to filter by, such as vital-signs, laboratory or social-history. Example: vital-signs.
- `code` (`string`, optional): LOINC code to filter by. NextGen Office documents only 72166-2 (smoking status) here. Example: 72166-2.
- `date` (`string`, optional): Filter by the observation date. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_organization_read`

Get Organization · Read-only

Get one Organization resource from NextGen Office by its FHIR ID. Returns the Organization with its organization name, identifiers, type, address and contact details. Use this when you have the ID; use nextgenoffice_organization_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `organization_id` (`string`, required): FHIR logical ID of the Organization resource to return. Example: 12345.

Example input: `{"organization_id":"<organization_id>"}`

### `nextgenoffice_organization_search`

Search Organizations · Read-only

Search organizations in NextGen Office by name or address. Returns a FHIR searchset Bundle of Organization resources with their organization name, identifiers, type, address and contact details. Use this to find an organization. Use nextgenoffice_organization_read when you have the ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address` (`string`, optional): Text that may match any part of the organization's address (line, city, state, postal code). Example: Austin.
- `name` (`string`, optional): Part of the organization's name or alias. Example: Family Clinic.

Example input: `{}`

### `nextgenoffice_patient_read`

Get Patient · Read-only

Get one Patient resource from NextGen Office by its FHIR ID. Returns the Patient with its demographics: name, birth date, sex, race, ethnicity, address, phone, preferred language and identifiers. Use this when you have the ID; use nextgenoffice_patient_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient_id` (`string`, required): FHIR logical ID of the Patient resource to return. Example: 12345.

Example input: `{"patient_id":"<patient_id>"}`

### `nextgenoffice_patient_search`

Search Patients · Read-only

Search patients in NextGen Office by name, birth date, gender, identifier or ID. Returns a FHIR searchset Bundle of Patient resources with their demographics: name, birth date, sex, race, ethnicity, address, phone, preferred language and identifiers. Use this to find a patient's ID. Use nextgenoffice_patient_read when you already have the ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `_id` (`string`, optional): Logical ID of a single Patient resource to return as a one-entry Bundle. Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `birthdate` (`string`, optional): Patient's date of birth as YYYY-MM-DD, with no time zone. Example: 2000-01-01.
- `gender` (`string`, optional): Administrative gender code to filter by. Example: female.
- `identifier` (`string`, optional): A patient identifier such as the medical record number, as value or system|value. Example: 12345.
- `name` (`string`, optional): Any part of the patient's name (family, given, prefix or suffix). Example: Doe.

Example input: `{}`

### `nextgenoffice_practitioner_read`

Get Practitioner · Read-only

Get one Practitioner resource from NextGen Office by its FHIR ID. Returns the Practitioner with its practitioner name, identifiers (such as NPI), contact details and qualifications. NextGen Office has no search for this resource, so take the ID from a reference in another resource.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `practitioner_id` (`string`, required): FHIR logical ID of the Practitioner resource to return. Example: 12345.

Example input: `{"practitioner_id":"<practitioner_id>"}`

### `nextgenoffice_practitioner_role_read`

Get Practitioner Role · Read-only

Get one PractitionerRole resource from NextGen Office by its FHIR ID. Returns the PractitionerRole with its the practitioner's role, specialty, organization, locations and contact details. Use this when you have the ID; use nextgenoffice_practitioner_role_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `practitioner_role_id` (`string`, required): FHIR logical ID of the PractitionerRole resource to return. Example: 12345.

Example input: `{"practitioner_role_id":"<practitioner_role_id>"}`

### `nextgenoffice_practitioner_role_search`

Search Practitioner Roles · Read-only

List the roles of a practitioner in NextGen Office. Returns a FHIR searchset Bundle of PractitionerRole resources with their the practitioner's role, specialty, organization, locations and contact details. Use this for a practitioner's roles and specialties. Use nextgenoffice_practitioner_read for the person. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `practitioner` (`string`, required): FHIR logical ID of the practitioner whose roles to return. Example: 12345.

Example input: `{"practitioner":"<practitioner>"}`

### `nextgenoffice_procedure_read`

Get Procedure · Read-only

Get one Procedure resource from NextGen Office by its FHIR ID. Returns the Procedure with its procedures performed for the patient, with codes, status, dates and performer. Use this when you have the ID; use nextgenoffice_procedure_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `procedure_id` (`string`, required): FHIR logical ID of the Procedure resource to return. Example: 12345.

Example input: `{"procedure_id":"<procedure_id>"}`

### `nextgenoffice_procedure_search`

Search Procedures · Read-only

List a patient's procedures in NextGen Office. Returns a FHIR searchset Bundle of Procedure resources with their procedures performed for the patient, with codes, status, dates and performer. Use this to browse procedures. Use nextgenoffice_procedure_read for one procedure by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `date` (`string`, optional): Filter by the procedure date. Use YYYY-MM-DD with an optional comparison prefix: eq, gt, lt, ge or le (the only prefixes NextGen Office supports). Example: ge2024-01-01 for on or after 1 January 2024.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_provenance_read`

Get Provenance · Read-only

Get one Provenance resource from NextGen Office by its FHIR ID. Returns the Provenance with its who created or changed a record, when, and on whose behalf. NextGen Office has no search for this resource, so take the ID from a reference in another resource.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `provenance_id` (`string`, required): FHIR logical ID of the Provenance resource to return. Example: 12345.

Example input: `{"provenance_id":"<provenance_id>"}`

### `nextgenoffice_related_person_read`

Get Related Person · Read-only

Get one RelatedPerson resource from NextGen Office by its FHIR ID. Returns the RelatedPerson with its people related to the patient, such as family members and caregivers, with relationship and contact details. Use this when you have the ID; use nextgenoffice_related_person_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `related_person_id` (`string`, required): FHIR logical ID of the RelatedPerson resource to return. Example: 12345.

Example input: `{"related_person_id":"<related_person_id>"}`

### `nextgenoffice_related_person_search`

Search Related Persons · Read-only

List people related to a patient in NextGen Office, such as family members and caregivers. Returns a FHIR searchset Bundle of RelatedPerson resources with their people related to the patient, such as family members and caregivers, with relationship and contact details. Use this for a patient's contacts. Use nextgenoffice_related_person_read for one person by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `patient` (`string`, required): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345.

Example input: `{"patient":"<patient>"}`

### `nextgenoffice_service_request_read`

Get Service Request · Read-only

Get one ServiceRequest resource from NextGen Office by its FHIR ID. Returns the ServiceRequest with its orders and referrals: what was requested, category, status, intent, authored date and requester. Use this when you have the ID; use nextgenoffice_service_request_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `service_request_id` (`string`, required): FHIR logical ID of the ServiceRequest resource to return. Example: 12345.

Example input: `{"service_request_id":"<service_request_id>"}`

### `nextgenoffice_service_request_search`

Search Service Requests · Read-only

List a patient's service requests (orders and referrals) in NextGen Office. Send patient (optionally with other filters) or _id. Returns a FHIR searchset Bundle of ServiceRequest resources with their orders and referrals: what was requested, category, status, intent, authored date and requester. Use this for orders. Use nextgenoffice_diagnostic_report_search for the resulting reports. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `_id` (`string`, optional): Logical ID of a single ServiceRequest resource to return as a one-entry Bundle. Example: 12345.
- `_revinclude` (`string`, optional): Set to Provenance:target to also return the Provenance resources (who recorded each record, and when) in the same Bundle. Leave empty to return only the matching resources. One of: `Provenance:target`.
- `authored` (`string`, optional): Filter by the date the request was signed. Use YYYY-MM-DD with an optional eq, gt, lt, ge or le prefix. Example: ge2024-01-01.
- `category` (`string`, optional): Service request category code to filter by. Example: 108252007 (laboratory procedure).
- `code` (`string`, optional): Code of what was requested or ordered to filter by. Example: 24323-8.
- `patient` (`string`, optional): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345. Required unless _id is given.

Example input: `{}`

### `nextgenoffice_specimen_read`

Get Specimen · Read-only

Get one Specimen resource from NextGen Office by its FHIR ID. Returns the Specimen with its specimen type, collection details and status. Use this when you have the ID; use nextgenoffice_specimen_search to find records.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `specimen_id` (`string`, required): FHIR logical ID of the Specimen resource to return. Example: 12345.

Example input: `{"specimen_id":"<specimen_id>"}`

### `nextgenoffice_specimen_search`

Search Specimens · Read-only

List a patient's specimens in NextGen Office, or get one specimen by ID. Send patient or _id; with neither the server returns 400 Bad Request. Returns a FHIR searchset Bundle of Specimen resources with their specimen type, collection details and status. Use this to browse specimens. Use nextgenoffice_specimen_read for one specimen by ID. If the result has a `next` link, use `nextgenoffice_next_page` to get more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `_id` (`string`, optional): Logical ID of a single Specimen resource to return as a one-entry Bundle. Example: 12345.
- `patient` (`string`, optional): FHIR logical ID of the patient whose records to return (the Patient resource `id`, for example from nextgenoffice_patient_search). Example: 12345. Required unless _id is given.

Example input: `{}`

## Related

Other Healthcare & life sciences connectors ([all 16](/agentkit/connectors/?category=healthcare)):

- [Synapse MCP server](/agentkit/connectors/synapsemcp/): Vendor MCP, OAuth, 48 tools
- [Availity](/agentkit/connectors/availity/): Scalekit connector, Service account, 11 tools
- [Healthie](/agentkit/connectors/healthie/): Scalekit connector, API key, 44 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
