> **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 SMART App on FHIR

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

**Authentication:** SMART On FHIR
**Categories:** Healthcare
**Tools:** 81: 33 read, 32 write, 16 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=CUSTOMSMARTFHIR)

## What you can do

- **Manage patients**: search, create, update, and delete patient demographics, or pull everything on file for a patient
- **Book appointments and encounters**: schedule, reschedule, cancel, and look up appointments and patient visits
- **Record clinical data**: create and update conditions, observations, allergies, immunizations, and procedures
- **Manage prescriptions and reports**: read and write medication requests, diagnostic reports, and document references
- **Coordinate care**: create and update care plans, care teams, and patient goals
- **Look up providers**: search and manage practitioners and organizations such as hospitals and clinics

## 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 SMART App on FHIR connection

   In **AgentKit > Connections**, create a SMART App on FHIR connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

   **Console steps with screenshots:**

   SMART App on FHIR uses an OAuth 2.0 authorization code flow with PKCE. Because every FHIR server exposes its own endpoints, you supply the authorization and token endpoints, the audience (`aud`), and the FHIR server domain when you create the connection. You also register a client with your FHIR server to obtain a client ID, and a client secret if the server issues one.

   1. ### Discover your FHIR server's SMART configuration

      Every SMART on FHIR server publishes its OAuth endpoints at a well-known discovery URL:

      ```text
      <fhir-base-url>/.well-known/smart-configuration
      ```

      Fetch that URL and note these values:

      - `authorization_endpoint` — the **Authorization endpoint**
      - `token_endpoint` — the **Token endpoint**
      - the FHIR server base URL, for example `https://fhir.example.com/r4` — this gives you both the **Audience (`aud`)** value and the **FHIR server domain** (the same URL without the `https://` scheme, for example `fhir.example.com`)

      > note: Why aud is required
      >
      > SMART on FHIR requires every authorization request to include an `aud` parameter set to the FHIR resource server's base URL. If `aud` doesn't match the server exactly, the authorization request fails.

   2. ### Register an app with your FHIR server

      - Register a new app in your FHIR server's developer portal or app-registration console to obtain a **client ID**. Scalekit uses PKCE, so a public client works; if your FHIR server issues a **client secret**, note it as well and add it in the next step.

      - When prompted for a redirect URI, leave the field open for now — you'll copy the exact value from Scalekit in the next step.

   3. ### Copy the redirect URI from Scalekit

      In the [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** > **Create Connection**. Find **SMART App on FHIR** and click **Create**. Copy the redirect URI — it looks like `https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback`.

      Return to your FHIR server's app registration and paste this redirect URI into the app's allowed redirect URIs.

   4. ### Create the connection in Scalekit

      Back in the Scalekit dashboard, finish creating the connection with the values you gathered:

      - **Client ID** — the client ID from your FHIR server app registration
      - **Client Secret** — the client secret from your FHIR server app registration, if one was issued; leave blank for a public PKCE client
      - **Authorization Endpoint** — the `authorization_endpoint` from `.well-known/smart-configuration`
      - **Token Endpoint** — the `token_endpoint` from `.well-known/smart-configuration`
      - **Audience (`aud`)** — the FHIR server base URL, sent as the required `aud` parameter on the authorization request
      - **FHIR Server Domain** — the FHIR server domain without the `https://` scheme, for example `fhir.example.com`. Scalekit routes every tool call to this host

      > caution: FHIR server domain is required for tool calls
      >
      > Scalekit uses the **FHIR Server Domain** as the base host for every API request a tool makes. If you leave it blank, authorization can still succeed, but every tool call fails because Scalekit has no server to route the request to.

      Under **Scopes**, select the SMART on FHIR scopes your agent needs. Start with `openid` and `offline_access` for identity and refresh tokens, then add resource-specific scopes such as `patient/Patient.read`, `patient/Observation.read`, or the broader `patient/*.read` and `patient/*.rs` scopes. The scopes you select here must match what's enabled on your FHIR server app registration.

      Click **Save**.

   5. ### Verify the connection is active

      Go to **Connected Accounts** for your SMART App on FHIR connection and confirm the status shows **Active** after a user completes authorization.

## 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: 'customsmartfhir_allergy_intolerance_read',
  toolInput: {
    allergy_intolerance_id: '<allergy_intolerance_id>',
  },
  connector: 'customsmartfhir',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="customsmartfhir_allergy_intolerance_read",
    tool_input={
        "allergy_intolerance_id": "<allergy_intolerance_id>",
    },
    connection_name="customsmartfhir",
    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.

### `customsmartfhir_allergy_intolerance_read`

Get Allergy Intolerance · Read-only

Retrieve a single FHIR AllergyIntolerance resource by its logical ID. Represents a patient's allergy or intolerance to a substance.

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

Inputs:

- `allergy_intolerance_id` (`string`, required): The logical ID of the AllergyIntolerance resource

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

### `customsmartfhir_allergy_intolerance_search`

Search Allergy Intolerances · Read-only

Search for FHIR AllergyIntolerance resources using parameters like patient, clinical status, type, category, and criticality.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `category` (`string`, optional): Category: food, medication, environment, biologic
- `clinical_status` (`string`, optional): Clinical status: active, inactive, resolved
- `code` (`string`, optional): Substance code (RxNorm, SNOMED, or NDF-RT)
- `criticality` (`string`, optional): Criticality: low, high, unable-to-assess
- `patient` (`string`, optional): Patient ID to filter allergy intolerances by
- `type` (`string`, optional): Allergy or intolerance type: allergy, intolerance

Example input: `{}`

### `customsmartfhir_appointment_read`

Get Appointment · Read-only

Retrieve a single FHIR Appointment resource by its logical ID. Appointments represent bookings for a patient, practitioner, or location at a specific time.

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

Inputs:

- `appointment_id` (`string`, required): The logical ID of the Appointment resource

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

### `customsmartfhir_appointment_search`

Search Appointments · Read-only

Search for FHIR Appointment resources using parameters like patient, practitioner, status, and date.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `date` (`string`, optional): Filter by appointment date (YYYY-MM-DD or range with prefix)
- `patient` (`string`, optional): Patient ID to filter appointments by
- `practitioner` (`string`, optional): Practitioner ID to filter appointments by
- `service_type` (`string`, optional): Type of service being delivered, e.g. 57 for Immunology
- `status` (`string`, optional): Appointment status: proposed, pending, booked, arrived, fulfilled, cancelled, noshow, entered-in-error, checked-in, waitlist

Example input: `{}`

### `customsmartfhir_care_plan_read`

Get Care Plan · Read-only

Retrieve a single FHIR CarePlan resource by its logical ID.

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

Inputs:

- `care_plan_id` (`string`, required): The logical ID of the CarePlan resource

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

### `customsmartfhir_care_plan_search`

Search Care Plans · Read-only

Search for FHIR CarePlan resources using parameters like patient, status, category, and date.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `category` (`string`, optional): Category of the care plan, e.g. assess-plan
- `date` (`string`, optional): Filter by time period the care plan covers (YYYY-MM-DD or range with prefix)
- `patient` (`string`, optional): Patient ID to filter care plans by
- `status` (`string`, optional): Care plan status: draft, active, on-hold, revoked, completed, entered-in-error, unknown

Example input: `{}`

### `customsmartfhir_care_team_read`

Get Care Team · Read-only

Retrieve a single FHIR CareTeam resource by its logical ID.

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

Inputs:

- `care_team_id` (`string`, required): The logical ID of the CareTeam resource

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

### `customsmartfhir_care_team_search`

Search Care Teams · Read-only

Search for FHIR CareTeam resources using parameters like patient and status.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `patient` (`string`, optional): Patient ID to filter care teams by
- `status` (`string`, optional): Care team status: proposed, active, suspended, inactive, entered-in-error

Example input: `{}`

### `customsmartfhir_condition_read`

Get Condition · Read-only

Retrieve a single FHIR Condition resource by its logical ID. Conditions represent clinical diagnoses, problems, or health concerns.

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

Inputs:

- `condition_id` (`string`, required): The logical ID of the Condition resource

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

### `customsmartfhir_condition_search`

Search Conditions · Read-only

Search for FHIR Condition resources representing diagnoses and health problems using parameters like patient, clinical status, category, and code.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `category` (`string`, optional): Category of condition, e.g. problem-list-item, encounter-diagnosis
- `clinical_status` (`string`, optional): Clinical status: active, recurrence, relapse, inactive, remission, resolved
- `code` (`string`, optional): ICD-10 or SNOMED code for the condition
- `onset_date` (`string`, optional): Filter by onset date (YYYY-MM-DD or range with prefix)
- `patient` (`string`, optional): Patient ID to filter conditions by

Example input: `{}`

### `customsmartfhir_diagnostic_report_read`

Get Diagnostic Report · Read-only

Retrieve a single FHIR DiagnosticReport resource by its logical ID. Diagnostic reports represent the findings from diagnostic services such as laboratory tests and imaging studies.

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

Inputs:

- `diagnostic_report_id` (`string`, required): The logical ID of the DiagnosticReport resource

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

### `customsmartfhir_diagnostic_report_search`

Search Diagnostic Reports · Read-only

Search for FHIR DiagnosticReport resources representing lab and imaging findings using parameters like patient, category, code, date, and status.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `category` (`string`, optional): Report category: LAB, RAD (radiology), etc.
- `code` (`string`, optional): LOINC code for the type of report
- `date` (`string`, optional): Filter by report date (YYYY-MM-DD or range with prefix)
- `patient` (`string`, optional): Patient ID to filter diagnostic reports by
- `status` (`string`, optional): Report status: registered, partial, preliminary, final, amended, corrected, appended, cancelled, entered-in-error

Example input: `{}`

### `customsmartfhir_document_reference_read`

Get Document Reference · Read-only

Retrieve a single FHIR DocumentReference resource by its logical ID.

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

Inputs:

- `document_reference_id` (`string`, required): The logical ID of the DocumentReference resource

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

### `customsmartfhir_document_reference_search`

Search Document References · Read-only

Search for FHIR DocumentReference resources using parameters like patient, status, category, type, and date.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `category` (`string`, optional): Category of the document, e.g. clinical-note
- `date` (`string`, optional): Filter by document creation date (YYYY-MM-DD or range with prefix)
- `patient` (`string`, optional): Patient ID to filter document references by
- `status` (`string`, optional): Document status: current, superseded, entered-in-error
- `type` (`string`, optional): Document type code (LOINC), e.g. 34133-9 for a summary of episode note

Example input: `{}`

### `customsmartfhir_encounter_read`

Get Encounter · Read-only

Retrieve a single FHIR Encounter resource by its logical ID. Encounters represent patient visits, admissions, or interactions with healthcare providers.

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

Inputs:

- `encounter_id` (`string`, required): The logical ID of the Encounter resource

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

### `customsmartfhir_encounter_search`

Search Encounters · Read-only

Search for FHIR Encounter resources representing patient visits and admissions using parameters like patient, status, date, and class.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `class` (`string`, optional): Encounter class: AMB (ambulatory), IMP (inpatient), EMER (emergency)
- `date` (`string`, optional): Filter by encounter date (YYYY-MM-DD or range with prefix)
- `patient` (`string`, optional): Patient ID to filter encounters by
- `status` (`string`, optional): Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled
- `type` (`string`, optional): Specific type of encounter by code

Example input: `{}`

### `customsmartfhir_goal_read`

Get Goal · Read-only

Retrieve a single FHIR Goal resource by its logical ID.

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

Inputs:

- `goal_id` (`string`, required): The logical ID of the Goal resource

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

### `customsmartfhir_goal_search`

Search Goals · Read-only

Search for FHIR Goal resources using parameters like patient, lifecycle status, and target date.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `lifecycle_status` (`string`, optional): Goal lifecycle status: proposed, planned, accepted, active, on-hold, completed, cancelled, entered-in-error, rejected
- `patient` (`string`, optional): Patient ID to filter goals by
- `target_date` (`string`, optional): Filter by target due date (YYYY-MM-DD or range with prefix)

Example input: `{}`

### `customsmartfhir_immunization_read`

Get Immunization · Read-only

Retrieve a single FHIR Immunization resource by its logical ID. Represents a vaccination event administered to a patient.

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

Inputs:

- `immunization_id` (`string`, required): The logical ID of the Immunization resource

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

### `customsmartfhir_immunization_search`

Search Immunizations · Read-only

Search for FHIR Immunization resources representing vaccination events using parameters like patient, status, vaccine code, and date.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `date` (`string`, optional): Filter by vaccination date (YYYY-MM-DD or range with prefix)
- `patient` (`string`, optional): Patient ID to filter immunizations by
- `status` (`string`, optional): Immunization status: completed, entered-in-error, not-done
- `vaccine_code` (`string`, optional): CVX vaccine code

Example input: `{}`

### `customsmartfhir_medication_request_read`

Get Medication Request · Read-only

Retrieve a single FHIR MedicationRequest resource by its logical ID. MedicationRequests represent prescriptions and medication orders.

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

Inputs:

- `medication_request_id` (`string`, required): The logical ID of the MedicationRequest resource

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

### `customsmartfhir_medication_request_search`

Search Medication Requests · Read-only

Search for FHIR MedicationRequest resources representing prescriptions using parameters like patient, status, medication code, and authored date.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `authoredon` (`string`, optional): Date the prescription was authored (YYYY-MM-DD or range with prefix)
- `intent` (`string`, optional): Intent of the request: proposal, plan, order, instance-order
- `medication` (`string`, optional): RxNorm or other medication code
- `patient` (`string`, optional): Patient ID to filter medication requests by
- `status` (`string`, optional): Medication request status: active, on-hold, cancelled, completed, entered-in-error, stopped, draft, unknown

Example input: `{}`

### `customsmartfhir_observation_read`

Get Observation · Read-only

Retrieve a single FHIR Observation resource by its logical ID. Observations represent measurements and simple assertions about a patient, such as vitals and lab results.

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

Inputs:

- `observation_id` (`string`, required): The logical ID of the Observation resource

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

### `customsmartfhir_observation_search`

Search Observations · Read-only

Search for FHIR Observation resources such as vitals and lab results using parameters like patient, category, code, and date.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `category` (`string`, optional): Category of observation, e.g. vital-signs, laboratory, social-history
- `code` (`string`, optional): LOINC or SNOMED code for the observation type
- `date` (`string`, optional): Filter by observation date (YYYY-MM-DD or range with prefix e.g. ge2024-01-01)
- `patient` (`string`, optional): Patient ID to filter observations by
- `status` (`string`, optional): Observation status: registered, preliminary, final, amended

Example input: `{}`

### `customsmartfhir_organization_read`

Get Organization · Read-only

Retrieve a single FHIR Organization resource by its logical ID. Organizations represent formally or informally recognized groupings of people or entities in the healthcare domain.

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

Inputs:

- `organization_id` (`string`, required): The logical ID of the Organization resource

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

### `customsmartfhir_organization_search`

Search Organizations · Read-only

Search for FHIR Organization resources such as hospitals and clinics using parameters like name, type, identifier, and active status.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `active` (`string`, optional): Whether the organization record is active: true or false
- `identifier` (`string`, optional): Organization identifier such as NPI
- `name` (`string`, optional): Name of the organization
- `type` (`string`, optional): Organization type code, e.g. prov (provider), dept (department), govt

Example input: `{}`

### `customsmartfhir_patient_everything`

Get Patient Everything · Read-only

Invoke the $everything operation on a Patient to retrieve all clinical resources associated with that patient in a single Bundle response.

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

Inputs:

- `patient_id` (`string`, required): The logical ID of the Patient resource
- `_count` (`number`, optional): Maximum number of resources to return per page
- `_since` (`string`, optional): Only include resources updated after this instant (ISO 8601 datetime)
- `_type` (`string`, optional): Comma-separated list of resource types to include (e.g. Observation,Condition)

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

### `customsmartfhir_patient_read`

Get Patient · Read-only

Retrieve a single FHIR Patient resource by its logical ID.

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

Inputs:

- `patient_id` (`string`, required): The logical ID of the Patient resource

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

### `customsmartfhir_patient_search`

Search Patients · Read-only

Search for FHIR Patient resources using common search parameters such as name, birthdate, gender, and identifier.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `birthdate` (`string`, optional): Patient's date of birth in YYYY-MM-DD format
- `email` (`string`, optional): Patient's email address
- `family` (`string`, optional): Family (last) name of the patient
- `gender` (`string`, optional): Administrative gender: male, female, other, unknown
- `given` (`string`, optional): Given (first) name of the patient
- `identifier` (`string`, optional): Patient identifier (e.g. MRN) in system|value format
- `phone` (`string`, optional): Patient's phone number

Example input: `{}`

### `customsmartfhir_practitioner_read`

Get Practitioner · Read-only

Retrieve a single FHIR Practitioner resource by its logical ID. Practitioners represent healthcare professionals such as doctors and nurses.

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

Inputs:

- `practitioner_id` (`string`, required): The logical ID of the Practitioner resource

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

### `customsmartfhir_practitioner_search`

Search Practitioners · Read-only

Search for FHIR Practitioner resources representing healthcare professionals using parameters like name, identifier, and active status.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `active` (`string`, optional): Whether the practitioner record is active: true or false
- `family` (`string`, optional): Family (last) name of the practitioner
- `given` (`string`, optional): Given (first) name of the practitioner
- `identifier` (`string`, optional): Practitioner identifier such as NPI

Example input: `{}`

### `customsmartfhir_procedure_read`

Get Procedure · Read-only

Retrieve a single FHIR Procedure resource by its logical ID. Procedures represent actions performed on or for a patient.

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

Inputs:

- `procedure_id` (`string`, required): The logical ID of the Procedure resource

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

### `customsmartfhir_procedure_search`

Search Procedures · Read-only

Search for FHIR Procedure resources representing clinical actions performed on a patient using parameters like patient, status, code, and date.

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

Inputs:

- `_count` (`number`, optional): Maximum number of results to return per page
- `_offset` (`number`, optional): Number of results to skip for pagination
- `code` (`string`, optional): SNOMED or CPT code for the procedure
- `date` (`string`, optional): Filter by procedure date (YYYY-MM-DD or range with prefix)
- `patient` (`string`, optional): Patient ID to filter procedures by
- `status` (`string`, optional): Procedure status: preparation, in-progress, not-done, on-hold, stopped, completed, entered-in-error, unknown

Example input: `{}`

### `customsmartfhir_allergy_intolerance_create`

Create Allergy Intolerance · Write

Create a new FHIR AllergyIntolerance resource recording a patient's allergy or intolerance to a substance.

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

Inputs:

- `code` (`string`, required): Code identifying the substance (RxNorm, SNOMED, or NDF-RT)
- `code_system` (`string`, required): Code system URI for the substance code
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `category` (`string`, optional): Category: food, medication, environment, biologic
- `clinical_status` (`string`, optional): Clinical status: active, inactive, resolved
- `code_display` (`string`, optional): Human-readable display for the substance
- `criticality` (`string`, optional): Criticality: low, high, unable-to-assess
- `note` (`string`, optional): Free-text note about the allergy
- `onset_date_time` (`string`, optional): Date/time of allergy onset (ISO 8601)
- `type` (`string`, optional): Type: allergy or intolerance

Example input: `{"code":"<code>","code_system":"<code_system>","patient_id":"<patient_id>"}`

### `customsmartfhir_allergy_intolerance_update`

Update Allergy Intolerance · Write

Update an existing FHIR AllergyIntolerance resource by its ID.

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

Inputs:

- `allergy_intolerance_id` (`string`, required): The logical ID of the AllergyIntolerance resource to update
- `code` (`string`, required): Code identifying the substance
- `code_system` (`string`, required): Code system URI for the substance code
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `category` (`string`, optional): Category: food, medication, environment, biologic
- `clinical_status` (`string`, optional): Clinical status: active, inactive, resolved
- `code_display` (`string`, optional): Human-readable display for the substance
- `criticality` (`string`, optional): Criticality: low, high, unable-to-assess
- `note` (`string`, optional): Free-text note about the allergy
- `type` (`string`, optional): Type: allergy or intolerance

Example input: `{"allergy_intolerance_id":"<allergy_intolerance_id>","code":"<code>","code_system":"<code_system>","patient_id":"<patient_id>"}`

### `customsmartfhir_appointment_create`

Create Appointment · Write

Create a new FHIR Appointment resource to book a patient visit with a practitioner.

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

Inputs:

- `end` (`string`, required): End date/time of the appointment (ISO 8601)
- `patient_id` (`string`, required): FHIR logical ID of the patient participant
- `start` (`string`, required): Start date/time of the appointment (ISO 8601)
- `status` (`string`, required): Appointment status: proposed, pending, booked, arrived, fulfilled, cancelled, noshow, entered-in-error, checked-in, waitlist
- `comment` (`string`, optional): Additional comments about the appointment
- `description` (`string`, optional): Short description of the appointment
- `practitioner_id` (`string`, optional): FHIR logical ID of the practitioner participant
- `service_type_code` (`string`, optional): Service type code for the appointment

Example input: `{"end":"<end>","patient_id":"<patient_id>","start":"<start>","status":"<status>"}`

### `customsmartfhir_appointment_update`

Update Appointment · Write

Update an existing FHIR Appointment resource by its ID, e.g. to reschedule or cancel.

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

Inputs:

- `appointment_id` (`string`, required): The logical ID of the Appointment resource to update
- `end` (`string`, required): End date/time of the appointment (ISO 8601)
- `patient_id` (`string`, required): FHIR logical ID of the patient participant
- `start` (`string`, required): Start date/time of the appointment (ISO 8601)
- `status` (`string`, required): Appointment status: proposed, pending, booked, arrived, fulfilled, cancelled, noshow, entered-in-error, checked-in, waitlist
- `comment` (`string`, optional): Additional comments about the appointment
- `description` (`string`, optional): Short description of the appointment
- `practitioner_id` (`string`, optional): FHIR logical ID of the practitioner participant

Example input: `{"appointment_id":"<appointment_id>","end":"<end>","patient_id":"<patient_id>","start":"<start>","status":"<status>"}`

### `customsmartfhir_care_plan_create`

Create Care Plan · Write

Create a new FHIR CarePlan resource for a patient with status, intent, title, description, category, and coverage period.

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

Inputs:

- `intent` (`string`, required): Care plan intent: proposal, plan, order, option
- `patient_id` (`string`, required): The logical ID of the Patient this care plan is for
- `status` (`string`, required): Care plan status: draft, active, on-hold, revoked, completed, entered-in-error, unknown
- `category` (`string`, optional): Category code identifying the type of care plan, e.g. assess-plan
- `description` (`string`, optional): Free-text summary of what the care plan involves
- `period_end` (`string`, optional): End date of the care plan period (YYYY-MM-DD)
- `period_start` (`string`, optional): Start date of the care plan period (YYYY-MM-DD)
- `title` (`string`, optional): Human-friendly title for the care plan

Example input: `{"intent":"<intent>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_care_plan_update`

Update Care Plan · Write

Update an existing FHIR CarePlan resource by its ID. Replaces the resource with the provided data.

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

Inputs:

- `care_plan_id` (`string`, required): The logical ID of the CarePlan resource to update
- `intent` (`string`, required): Care plan intent: proposal, plan, order, option
- `patient_id` (`string`, required): The logical ID of the Patient this care plan is for
- `status` (`string`, required): Care plan status: draft, active, on-hold, revoked, completed, entered-in-error, unknown
- `category` (`string`, optional): Category code identifying the type of care plan, e.g. assess-plan
- `description` (`string`, optional): Free-text summary of what the care plan involves
- `period_end` (`string`, optional): End date of the care plan period (YYYY-MM-DD)
- `period_start` (`string`, optional): Start date of the care plan period (YYYY-MM-DD)
- `title` (`string`, optional): Human-friendly title for the care plan

Example input: `{"care_plan_id":"<care_plan_id>","intent":"<intent>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_care_team_create`

Create Care Team · Write

Create a new FHIR CareTeam resource for a patient with a name, status, category, and a primary participant member and role.

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

Inputs:

- `patient_id` (`string`, required): The logical ID of the Patient this care team is for
- `status` (`string`, required): Care team status: proposed, active, suspended, inactive, entered-in-error
- `category` (`string`, optional): Category code identifying the type of care team
- `name` (`string`, optional): Human-friendly name for the care team
- `participant_member_id` (`string`, optional): Practitioner ID of the primary participant on this care team
- `participant_role` (`string`, optional): Role code of the participant on the care team

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

### `customsmartfhir_care_team_update`

Update Care Team · Write

Update an existing FHIR CareTeam resource by its ID. Replaces the resource with the provided data.

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

Inputs:

- `care_team_id` (`string`, required): The logical ID of the CareTeam resource to update
- `patient_id` (`string`, required): The logical ID of the Patient this care team is for
- `status` (`string`, required): Care team status: proposed, active, suspended, inactive, entered-in-error
- `category` (`string`, optional): Category code identifying the type of care team
- `name` (`string`, optional): Human-friendly name for the care team
- `participant_member_id` (`string`, optional): Practitioner ID of the primary participant on this care team
- `participant_role` (`string`, optional): Role code of the participant on the care team

Example input: `{"care_team_id":"<care_team_id>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_condition_create`

Create Condition · Write

Create a new FHIR Condition resource representing a diagnosis or health problem for a patient.

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

Inputs:

- `code` (`string`, required): ICD-10 or SNOMED code for the condition
- `code_system` (`string`, required): Code system URI
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `category` (`string`, optional): Condition category: problem-list-item, encounter-diagnosis
- `clinical_status` (`string`, optional): Clinical status: active, recurrence, relapse, inactive, remission, resolved
- `code_display` (`string`, optional): Human-readable display for the condition code
- `note` (`string`, optional): Free-text note about the condition
- `onset_date_time` (`string`, optional): Date/time of condition onset (ISO 8601)
- `verification_status` (`string`, optional): Verification status: unconfirmed, provisional, differential, confirmed, refuted, entered-in-error

Example input: `{"code":"<code>","code_system":"<code_system>","patient_id":"<patient_id>"}`

### `customsmartfhir_condition_update`

Update Condition · Write

Update an existing FHIR Condition resource by its ID. Replaces the resource with the provided data.

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

Inputs:

- `code` (`string`, required): ICD-10 or SNOMED code for the condition
- `code_system` (`string`, required): Code system URI
- `condition_id` (`string`, required): The logical ID of the Condition resource to update
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `category` (`string`, optional): Condition category: problem-list-item, encounter-diagnosis
- `clinical_status` (`string`, optional): Clinical status: active, recurrence, relapse, inactive, remission, resolved
- `code_display` (`string`, optional): Human-readable display for the condition code
- `note` (`string`, optional): Free-text note about the condition
- `onset_date_time` (`string`, optional): Date/time of condition onset (ISO 8601)
- `verification_status` (`string`, optional): Verification status: unconfirmed, provisional, differential, confirmed, refuted, entered-in-error

Example input: `{"code":"<code>","code_system":"<code_system>","condition_id":"<condition_id>","patient_id":"<patient_id>"}`

### `customsmartfhir_diagnostic_report_create`

Create Diagnostic Report · Write

Create a new FHIR DiagnosticReport resource representing findings from a laboratory, imaging, or other diagnostic service.

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

Inputs:

- `code` (`string`, required): LOINC code identifying the type of report
- `code_system` (`string`, required): Code system URI for the report code
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Report status: registered, partial, preliminary, final, amended, corrected, appended, cancelled, entered-in-error
- `category` (`string`, optional): Report category: LAB, RAD, etc.
- `code_display` (`string`, optional): Human-readable display for the report type
- `conclusion` (`string`, optional): Clinical interpretation of the report findings
- `effective_date_time` (`string`, optional): Date/time the report is clinically relevant (ISO 8601)

Example input: `{"code":"<code>","code_system":"<code_system>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_diagnostic_report_update`

Update Diagnostic Report · Write

Update an existing FHIR DiagnosticReport resource by its ID.

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

Inputs:

- `code` (`string`, required): LOINC code identifying the type of report
- `code_system` (`string`, required): Code system URI for the report code
- `diagnostic_report_id` (`string`, required): The logical ID of the DiagnosticReport resource to update
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Report status: registered, partial, preliminary, final, amended, corrected, appended, cancelled, entered-in-error
- `category` (`string`, optional): Report category: LAB, RAD, etc.
- `code_display` (`string`, optional): Human-readable display for the report type
- `conclusion` (`string`, optional): Clinical interpretation of the report findings
- `effective_date_time` (`string`, optional): Date/time the report is clinically relevant (ISO 8601)

Example input: `{"code":"<code>","code_system":"<code_system>","diagnostic_report_id":"<diagnostic_report_id>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_document_reference_create`

Create Document Reference · Write

Create a new FHIR DocumentReference resource pointing to a clinical document, referenced by a URL, for a patient.

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

Inputs:

- `content_type` (`string`, required): MIME type of the document content
- `content_url` (`string`, required): URL where the document content can be retrieved
- `patient_id` (`string`, required): The logical ID of the Patient this document is about
- `status` (`string`, required): Document status: current, superseded, entered-in-error
- `category` (`string`, optional): Category of the document, e.g. clinical-note
- `date` (`string`, optional): Date the document was created (ISO 8601 datetime)
- `description` (`string`, optional): Human-readable description of the document
- `type_code` (`string`, optional): Document type code (LOINC), e.g. 34133-9 for a summary of episode note

Example input: `{"content_type":"<content_type>","content_url":"<content_url>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_document_reference_update`

Update Document Reference · Write

Update an existing FHIR DocumentReference resource by its ID. Replaces the resource with the provided data.

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

Inputs:

- `content_type` (`string`, required): MIME type of the document content
- `content_url` (`string`, required): URL where the document content can be retrieved
- `document_reference_id` (`string`, required): The logical ID of the DocumentReference resource to update
- `patient_id` (`string`, required): The logical ID of the Patient this document is about
- `status` (`string`, required): Document status: current, superseded, entered-in-error
- `category` (`string`, optional): Category of the document, e.g. clinical-note
- `date` (`string`, optional): Date the document was created (ISO 8601 datetime)
- `description` (`string`, optional): Human-readable description of the document
- `type_code` (`string`, optional): Document type code (LOINC), e.g. 34133-9 for a summary of episode note

Example input: `{"content_type":"<content_type>","content_url":"<content_url>","document_reference_id":"<document_reference_id>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_encounter_create`

Create Encounter · Write

Create a new FHIR Encounter resource representing a patient visit or admission.

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

Inputs:

- `class_code` (`string`, required): Encounter class code: AMB (ambulatory), IMP (inpatient), EMER (emergency), HH (home health)
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled
- `period_end` (`string`, optional): End date/time of the encounter (ISO 8601)
- `period_start` (`string`, optional): Start date/time of the encounter (ISO 8601)
- `reason_code` (`string`, optional): SNOMED code for the reason of the encounter
- `type_code` (`string`, optional): Specific type of encounter by SNOMED code
- `type_display` (`string`, optional): Human-readable display for the encounter type

Example input: `{"class_code":"<class_code>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_encounter_update`

Update Encounter · Write

Update an existing FHIR Encounter resource by its ID. Replaces the resource with the provided data.

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

Inputs:

- `class_code` (`string`, required): Encounter class: AMB (ambulatory), IMP (inpatient), EMER (emergency), HH (home health)
- `encounter_id` (`string`, required): The logical ID of the Encounter resource to update
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled
- `period_end` (`string`, optional): End date/time of the encounter (ISO 8601)
- `period_start` (`string`, optional): Start date/time of the encounter (ISO 8601)
- `reason_code` (`string`, optional): SNOMED code for the reason of the encounter
- `type_code` (`string`, optional): Specific type of encounter by SNOMED code
- `type_display` (`string`, optional): Human-readable display for the encounter type

Example input: `{"class_code":"<class_code>","encounter_id":"<encounter_id>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_goal_create`

Create Goal · Write

Create a new FHIR Goal resource for a patient describing a target health outcome with a lifecycle status, description, category, and target due date.

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

Inputs:

- `description` (`string`, required): Free-text description of what the goal is trying to achieve
- `lifecycle_status` (`string`, required): Goal lifecycle status: proposed, planned, accepted, active, on-hold, completed, cancelled, entered-in-error, rejected
- `patient_id` (`string`, required): The logical ID of the Patient this goal is for
- `category` (`string`, optional): Category code identifying the type of goal, e.g. dietary, safety, behavioral
- `start_date` (`string`, optional): Date the goal starts being pursued (YYYY-MM-DD)
- `target_date` (`string`, optional): Target date by which the goal should be achieved (YYYY-MM-DD)

Example input: `{"description":"<description>","lifecycle_status":"<lifecycle_status>","patient_id":"<patient_id>"}`

### `customsmartfhir_goal_update`

Update Goal · Write

Update an existing FHIR Goal resource by its ID. Replaces the resource with the provided data.

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

Inputs:

- `description` (`string`, required): Free-text description of what the goal is trying to achieve
- `goal_id` (`string`, required): The logical ID of the Goal resource to update
- `lifecycle_status` (`string`, required): Goal lifecycle status: proposed, planned, accepted, active, on-hold, completed, cancelled, entered-in-error, rejected
- `patient_id` (`string`, required): The logical ID of the Patient this goal is for
- `category` (`string`, optional): Category code identifying the type of goal, e.g. dietary, safety, behavioral
- `start_date` (`string`, optional): Date the goal starts being pursued (YYYY-MM-DD)
- `target_date` (`string`, optional): Target date by which the goal should be achieved (YYYY-MM-DD)

Example input: `{"description":"<description>","goal_id":"<goal_id>","lifecycle_status":"<lifecycle_status>","patient_id":"<patient_id>"}`

### `customsmartfhir_immunization_create`

Create Immunization · Write

Create a new FHIR Immunization resource recording a vaccination event for a patient.

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

Inputs:

- `occurrence_date_time` (`string`, required): Date/time the vaccination occurred (ISO 8601)
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Immunization status: completed, entered-in-error, not-done
- `vaccine_code` (`string`, required): CVX vaccine code
- `vaccine_system` (`string`, required): Code system URI for the vaccine code
- `lot_number` (`string`, optional): Vaccine lot number
- `note` (`string`, optional): Additional notes about the immunization
- `vaccine_display` (`string`, optional): Human-readable display for the vaccine

Example input: `{"occurrence_date_time":"<occurrence_date_time>","patient_id":"<patient_id>","status":"<status>","vaccine_code":"<vaccine_code>","vaccine_system":"<vaccine_system>"}`

### `customsmartfhir_immunization_update`

Update Immunization · Write

Update an existing FHIR Immunization resource by its ID.

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

Inputs:

- `immunization_id` (`string`, required): The logical ID of the Immunization resource to update
- `occurrence_date_time` (`string`, required): Date/time the vaccination occurred (ISO 8601)
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Immunization status: completed, entered-in-error, not-done
- `vaccine_code` (`string`, required): CVX vaccine code
- `vaccine_system` (`string`, required): Code system URI for the vaccine code
- `lot_number` (`string`, optional): Vaccine lot number
- `note` (`string`, optional): Additional notes about the immunization
- `vaccine_display` (`string`, optional): Human-readable display for the vaccine

Example input: `{"immunization_id":"<immunization_id>","occurrence_date_time":"<occurrence_date_time>","patient_id":"<patient_id>","status":"<status>","vaccine_code":"<vaccine_code>","vaccine_system":"<vaccine_system>"}`

### `customsmartfhir_medication_request_create`

Create Medication Request · Write

Create a new FHIR MedicationRequest resource representing a prescription or medication order for a patient.

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

Inputs:

- `intent` (`string`, required): Intent: proposal, plan, order, instance-order
- `medication_code` (`string`, required): RxNorm or other medication code
- `medication_system` (`string`, required): Code system URI for the medication code
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Status: active, on-hold, cancelled, completed, entered-in-error, stopped, draft, unknown
- `authored_on` (`string`, optional): Date the prescription was authored (ISO 8601)
- `dosage_text` (`string`, optional): Free-text dosage instructions
- `medication_display` (`string`, optional): Human-readable medication name
- `note` (`string`, optional): Additional notes about the prescription

Example input: `{"intent":"<intent>","medication_code":"<medication_code>","medication_system":"<medication_system>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_medication_request_update`

Update Medication Request · Write

Update an existing FHIR MedicationRequest resource by its ID. Replaces the resource with the provided data.

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

Inputs:

- `intent` (`string`, required): Intent: proposal, plan, order, instance-order
- `medication_code` (`string`, required): RxNorm or other medication code
- `medication_request_id` (`string`, required): The logical ID of the MedicationRequest resource to update
- `medication_system` (`string`, required): Code system URI for the medication code
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Status: active, on-hold, cancelled, completed, entered-in-error, stopped, draft, unknown
- `authored_on` (`string`, optional): Date the prescription was authored (ISO 8601)
- `dosage_text` (`string`, optional): Free-text dosage instructions
- `medication_display` (`string`, optional): Human-readable medication name
- `note` (`string`, optional): Additional notes about the prescription

Example input: `{"intent":"<intent>","medication_code":"<medication_code>","medication_request_id":"<medication_request_id>","medication_system":"<medication_system>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_observation_create`

Create Observation · Write

Create a new FHIR Observation resource such as a vital sign or lab result for a patient.

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

Inputs:

- `code` (`string`, required): Code identifying the observation type (e.g. LOINC code)
- `code_system` (`string`, required): Code system URI for the observation code
- `patient_id` (`string`, required): FHIR logical ID of the patient this observation belongs to
- `status` (`string`, required): Observation status: registered, preliminary, final, amended
- `category` (`string`, optional): Observation category: vital-signs, laboratory, social-history, imaging, etc.
- `code_display` (`string`, optional): Human-readable display for the code
- `effective_date_time` (`string`, optional): Date/time the observation was clinically relevant (ISO 8601)
- `note` (`string`, optional): Free-text note about the observation
- `unit` (`string`, optional): Unit of measure for the value (UCUM code)
- `value` (`number`, optional): Numeric value of the observation

Example input: `{"code":"<code>","code_system":"<code_system>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_observation_update`

Update Observation · Write

Update an existing FHIR Observation resource by its ID. Replaces the resource with the provided data.

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

Inputs:

- `code` (`string`, required): Code identifying the observation type (e.g. LOINC code)
- `code_system` (`string`, required): Code system URI for the observation code
- `observation_id` (`string`, required): The logical ID of the Observation resource to update
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Observation status: registered, preliminary, final, amended
- `category` (`string`, optional): Observation category: vital-signs, laboratory, social-history, imaging, etc.
- `code_display` (`string`, optional): Human-readable display for the code
- `effective_date_time` (`string`, optional): Date/time the observation was clinically relevant (ISO 8601)
- `note` (`string`, optional): Free-text note about the observation
- `unit` (`string`, optional): Unit of measure for the value (UCUM code)
- `value` (`number`, optional): Numeric value of the observation

Example input: `{"code":"<code>","code_system":"<code_system>","observation_id":"<observation_id>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_organization_create`

Create Organization · Write

Create a new FHIR Organization resource representing a hospital, clinic, or other healthcare entity.

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

Inputs:

- `name` (`string`, required): Name of the organization
- `active` (`boolean`, optional): Whether the organization is active
- `address_line` (`string`, optional): Street address line
- `city` (`string`, optional): City
- `email` (`string`, optional): Organization's email address
- `phone` (`string`, optional): Organization's main phone number
- `postal_code` (`string`, optional): Postal or ZIP code
- `state` (`string`, optional): State or province
- `type_code` (`string`, optional): Organization type: prov (provider), dept (department), team, govt, ins (insurer), cg (clinical group)

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

### `customsmartfhir_organization_update`

Update Organization · Write

Update an existing FHIR Organization resource by its ID.

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

Inputs:

- `name` (`string`, required): Name of the organization
- `organization_id` (`string`, required): The logical ID of the Organization resource to update
- `active` (`boolean`, optional): Whether the organization is active
- `address_line` (`string`, optional): Street address line
- `city` (`string`, optional): City
- `email` (`string`, optional): Organization's email address
- `phone` (`string`, optional): Organization's main phone number
- `postal_code` (`string`, optional): Postal or ZIP code
- `state` (`string`, optional): State or province
- `type_code` (`string`, optional): Organization type: prov, dept, team, govt, ins, cg

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

### `customsmartfhir_patient_create`

Create Patient · Write

Create a new FHIR Patient resource with demographic information including name, gender, birth date, contact details, and address.

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

Inputs:

- `family_name` (`string`, required): Patient's family (last) name
- `address_line` (`string`, optional): Street address line
- `birth_date` (`string`, optional): Date of birth in YYYY-MM-DD format
- `city` (`string`, optional): City
- `country` (`string`, optional): Country code (ISO 3166)
- `email` (`string`, optional): Patient's email address
- `gender` (`string`, optional): Administrative gender: male, female, other, unknown
- `given_names` (`array`, optional): List of given (first/middle) names
- `phone` (`string`, optional): Patient's phone number
- `postal_code` (`string`, optional): Postal or ZIP code
- `state` (`string`, optional): State or province

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

### `customsmartfhir_patient_update`

Update Patient · Write

Update an existing FHIR Patient resource by its ID. Replaces the resource with the provided demographic data.

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

Inputs:

- `family_name` (`string`, required): Patient's family (last) name
- `patient_id` (`string`, required): The logical ID of the Patient resource to update
- `address_line` (`string`, optional): Street address line
- `birth_date` (`string`, optional): Date of birth in YYYY-MM-DD format
- `city` (`string`, optional): City
- `country` (`string`, optional): Country code (ISO 3166)
- `email` (`string`, optional): Patient's email address
- `gender` (`string`, optional): Administrative gender: male, female, other, unknown
- `given_names` (`array`, optional): List of given (first/middle) names
- `phone` (`string`, optional): Patient's phone number
- `postal_code` (`string`, optional): Postal or ZIP code
- `state` (`string`, optional): State or province

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

### `customsmartfhir_practitioner_create`

Create Practitioner · Write

Create a new FHIR Practitioner resource representing a healthcare professional such as a doctor or nurse.

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

Inputs:

- `family_name` (`string`, required): Practitioner's family (last) name
- `email` (`string`, optional): Practitioner's email address
- `gender` (`string`, optional): Administrative gender: male, female, other, unknown
- `given_names` (`array`, optional): List of given (first/middle) names
- `npi` (`string`, optional): National Provider Identifier (NPI)
- `phone` (`string`, optional): Practitioner's phone number

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

### `customsmartfhir_practitioner_update`

Update Practitioner · Write

Update an existing FHIR Practitioner resource by its ID.

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

Inputs:

- `family_name` (`string`, required): Practitioner's family (last) name
- `practitioner_id` (`string`, required): The logical ID of the Practitioner resource to update
- `email` (`string`, optional): Practitioner's email address
- `gender` (`string`, optional): Administrative gender: male, female, other, unknown
- `given_names` (`array`, optional): List of given (first/middle) names
- `npi` (`string`, optional): National Provider Identifier (NPI)
- `phone` (`string`, optional): Practitioner's phone number

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

### `customsmartfhir_procedure_create`

Create Procedure · Write

Create a new FHIR Procedure resource recording a clinical action performed on or for a patient.

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

Inputs:

- `code` (`string`, required): SNOMED or CPT code for the procedure
- `code_system` (`string`, required): Code system URI for the procedure code
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `status` (`string`, required): Procedure status: preparation, in-progress, not-done, on-hold, stopped, completed, entered-in-error, unknown
- `code_display` (`string`, optional): Human-readable display for the procedure code
- `note` (`string`, optional): Free-text note about the procedure
- `performed_date_time` (`string`, optional): Date/time the procedure was performed (ISO 8601)
- `reason_code` (`string`, optional): SNOMED code for the reason the procedure was performed

Example input: `{"code":"<code>","code_system":"<code_system>","patient_id":"<patient_id>","status":"<status>"}`

### `customsmartfhir_procedure_update`

Update Procedure · Write

Update an existing FHIR Procedure resource by its ID.

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

Inputs:

- `code` (`string`, required): SNOMED or CPT code for the procedure
- `code_system` (`string`, required): Code system URI for the procedure code
- `patient_id` (`string`, required): FHIR logical ID of the patient
- `procedure_id` (`string`, required): The logical ID of the Procedure resource to update
- `status` (`string`, required): Procedure status: preparation, in-progress, not-done, on-hold, stopped, completed, entered-in-error, unknown
- `code_display` (`string`, optional): Human-readable display for the procedure code
- `note` (`string`, optional): Free-text note about the procedure
- `performed_date_time` (`string`, optional): Date/time the procedure was performed (ISO 8601)
- `reason_code` (`string`, optional): SNOMED code for the reason the procedure was performed

Example input: `{"code":"<code>","code_system":"<code_system>","patient_id":"<patient_id>","procedure_id":"<procedure_id>","status":"<status>"}`

### `customsmartfhir_allergy_intolerance_delete`

Delete Allergy Intolerance · Destructive

Delete a FHIR AllergyIntolerance resource by its logical ID.

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

Inputs:

- `allergy_intolerance_id` (`string`, required): The logical ID of the AllergyIntolerance resource to delete

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

### `customsmartfhir_appointment_delete`

Delete Appointment · Destructive

Delete a FHIR Appointment resource by its logical ID.

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

Inputs:

- `appointment_id` (`string`, required): The logical ID of the Appointment resource to delete

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

### `customsmartfhir_care_plan_delete`

Delete Care Plan · Destructive

Delete a FHIR CarePlan resource by its logical ID.

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

Inputs:

- `care_plan_id` (`string`, required): The logical ID of the CarePlan resource to delete

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

### `customsmartfhir_care_team_delete`

Delete Care Team · Destructive

Delete a FHIR CareTeam resource by its logical ID.

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

Inputs:

- `care_team_id` (`string`, required): The logical ID of the CareTeam resource to delete

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

### `customsmartfhir_condition_delete`

Delete Condition · Destructive

Delete a FHIR Condition resource by its logical ID.

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

Inputs:

- `condition_id` (`string`, required): The logical ID of the Condition resource to delete

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

### `customsmartfhir_diagnostic_report_delete`

Delete Diagnostic Report · Destructive

Delete a FHIR DiagnosticReport resource by its logical ID.

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

Inputs:

- `diagnostic_report_id` (`string`, required): The logical ID of the DiagnosticReport resource to delete

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

### `customsmartfhir_document_reference_delete`

Delete Document Reference · Destructive

Delete a FHIR DocumentReference resource by its logical ID.

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

Inputs:

- `document_reference_id` (`string`, required): The logical ID of the DocumentReference resource to delete

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

### `customsmartfhir_encounter_delete`

Delete Encounter · Destructive

Delete a FHIR Encounter resource by its logical ID.

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

Inputs:

- `encounter_id` (`string`, required): The logical ID of the Encounter resource to delete

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

### `customsmartfhir_goal_delete`

Delete Goal · Destructive

Delete a FHIR Goal resource by its logical ID.

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

Inputs:

- `goal_id` (`string`, required): The logical ID of the Goal resource to delete

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

### `customsmartfhir_immunization_delete`

Delete Immunization · Destructive

Delete a FHIR Immunization resource by its logical ID.

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

Inputs:

- `immunization_id` (`string`, required): The logical ID of the Immunization resource to delete

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

### `customsmartfhir_medication_request_delete`

Delete Medication Request · Destructive

Delete a FHIR MedicationRequest resource by its logical ID.

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

Inputs:

- `medication_request_id` (`string`, required): The logical ID of the MedicationRequest resource to delete

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

### `customsmartfhir_observation_delete`

Delete Observation · Destructive

Delete a FHIR Observation resource by its logical ID.

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

Inputs:

- `observation_id` (`string`, required): The logical ID of the Observation resource to delete

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

### `customsmartfhir_organization_delete`

Delete Organization · Destructive

Delete a FHIR Organization resource by its logical ID.

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

Inputs:

- `organization_id` (`string`, required): The logical ID of the Organization resource to delete

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

### `customsmartfhir_patient_delete`

Delete Patient · Destructive

Delete a FHIR Patient resource by its logical ID.

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

Inputs:

- `patient_id` (`string`, required): The logical ID of the Patient resource to delete

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

### `customsmartfhir_practitioner_delete`

Delete Practitioner · Destructive

Delete a FHIR Practitioner resource by its logical ID.

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

Inputs:

- `practitioner_id` (`string`, required): The logical ID of the Practitioner resource to delete

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

### `customsmartfhir_procedure_delete`

Delete Procedure · Destructive

Delete a FHIR Procedure resource by its logical ID.

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

Inputs:

- `procedure_id` (`string`, required): The logical ID of the Procedure resource to delete

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

## Workflows

**Proxy API call**

Call the FHIR server's REST API directly through the Scalekit proxy. Use standard FHIR search paths such as `/Patient` or `/Observation`.

  **Node.js**

  ```typescript
  const result = await actions.request({
    connectionName: 'customsmartfhir',
    identifier: 'user_123',
    path: '/Patient?family=Smith&_count=10',
    method: 'GET',
  });
  console.log(result);
  ```

  **Python**

  ```python
  result = actions.request(
      connection_name='customsmartfhir',
      identifier='user_123',
      path="/Patient?family=Smith&_count=10",
      method="GET"
  )
  print(result)
  ```

**Search for patients**

  **Node.js**

  ```typescript
  const patients = await actions.executeTool({
    connector: 'customsmartfhir',
    identifier: 'user_123',
    toolName: 'customsmartfhir_patient_search',
    toolInput: {
      family: 'Smith',
      given: 'Jane',
      birthdate: '1985-04-12',
      _count: 10,
    },
  });
  console.log('Matching patients:', patients);
  ```

  **Python**

  ```python
  patients = actions.execute_tool(
      connection_name='customsmartfhir',
      identifier='user_123',
      tool_name="customsmartfhir_patient_search",
      tool_input={
          "family": "Smith",
          "given": "Jane",
          "birthdate": "1985-04-12",
          "_count": 10,
      },
  )
  print("Matching patients:", patients)
  ```

**Retrieve everything for a patient**

Invoke the FHIR `$everything` operation to pull all clinical resources for one patient in a single Bundle. Pass `_type` to limit the response to specific resource types.

  **Node.js**

  ```typescript
  const bundle = await actions.executeTool({
    connector: 'customsmartfhir',
    identifier: 'user_123',
    toolName: 'customsmartfhir_patient_everything',
    toolInput: {
      patient_id: 'a1b2c3d4-0000-1111-2222-333344445555',
      _type: 'Condition,Observation,MedicationRequest',
      _count: 50,
    },
  });
  console.log('Bundle entries:', bundle);
  ```

  **Python**

  ```python
  bundle = actions.execute_tool(
      connection_name='customsmartfhir',
      identifier='user_123',
      tool_name="customsmartfhir_patient_everything",
      tool_input={
          "patient_id": "a1b2c3d4-0000-1111-2222-333344445555",
          "_type": "Condition,Observation,MedicationRequest",
          "_count": 50,
      },
  )
  print("Bundle entries:", bundle)
  ```

**Search a patient's observations**

  **Node.js**

  ```typescript
  const observations = await actions.executeTool({
    connector: 'customsmartfhir',
    identifier: 'user_123',
    toolName: 'customsmartfhir_observation_search',
    toolInput: {
      patient: 'a1b2c3d4-0000-1111-2222-333344445555',
      category: 'vital-signs',
      date: 'ge2026-01-01',
      _count: 25,
    },
  });
  console.log('Observations:', observations);
  ```

  **Python**

  ```python
  observations = actions.execute_tool(
      connection_name='customsmartfhir',
      identifier='user_123',
      tool_name="customsmartfhir_observation_search",
      tool_input={
          "patient": "a1b2c3d4-0000-1111-2222-333344445555",
          "category": "vital-signs",
          "date": "ge2026-01-01",
          "_count": 25,
      },
  )
  print("Observations:", observations)
  ```

**Record a vital-sign observation**

Create an Observation such as a heart-rate reading. The `code` and `code_system` identify the measurement — this example uses the LOINC code `8867-4` (Heart rate).

  **Node.js**

  ```typescript
  const observation = await actions.executeTool({
    connector: 'customsmartfhir',
    identifier: 'user_123',
    toolName: 'customsmartfhir_observation_create',
    toolInput: {
      patient_id: 'a1b2c3d4-0000-1111-2222-333344445555',
      status: 'final',
      code: '8867-4',
      code_system: 'http://loinc.org',
      code_display: 'Heart rate',
      category: 'vital-signs',
      effective_date_time: new Date().toISOString(),
      value: 72,
      unit: '/min',
    },
  });
  console.log('Created observation:', observation);
  ```

  **Python**

  ```python
  from datetime import datetime, timezone

  observation = actions.execute_tool(
      connection_name='customsmartfhir',
      identifier='user_123',
      tool_name="customsmartfhir_observation_create",
      tool_input={
          "patient_id": "a1b2c3d4-0000-1111-2222-333344445555",
          "status": "final",
          "code": "8867-4",
          "code_system": "http://loinc.org",
          "code_display": "Heart rate",
          "category": "vital-signs",
          "effective_date_time": datetime.now(timezone.utc).isoformat(),
          "value": 72,
          "unit": "/min",
      },
  )
  print("Created observation:", observation)
  ```

## 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 |
