> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Count Appointments For Patient

> Documentation for the Count Appointments For Patient action for Healthie

![images/healthie.svg](https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/healthie.svg?fit=max\&auto=format\&n=EU2WCxuXGIUQcziR\&q=85\&s=d168a24dbae69f2202ca63dd7aa2e1f3)

# Parameters

**Action** `Parameters`

**parameters**

**Appointment Type Ids** `[]string`

This field maps to the destination API `filter_by_appointment_type_ids` field.

**Filter** `string`

This field maps to the destination API `filter (value: `all`, `future`, `past`, `ended`or`didnt-occur`) default `all\`\` field.

**Filter By Statuses** `[]string`

This field maps to the destination API `filter_by_apppointment_statuses (values: `Cancelled`, `Re-Scheduled`,`No-Show`, `Occurred`,`Late Cancellation`) defaults to all statuses` field.

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "appointment_ids": [
      "1000701",
      "2004221"
    ],
    "count": 42
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "appointment_ids": "The matching appointments for the selected appointment type IDs and filter combination",
    "count": "The count of matching appointments for the selected appointment type IDs and filter combination"
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**AppointmentsCount** `Fetch Action Response Object`

**fields**

**appointment\_ids** `[]string` *required*

The matching appointments for the selected appointment type IDs and filter combination

```json CEL theme={null}
$result_object_key.appointment_ids
```

```json Example theme={null}
[
"1000701",
"2004221"
]
```

**count** `uint64` *required*

The count of matching appointments for the selected appointment type IDs and filter combination

```json CEL theme={null}
$result_object_key.count
```

```json Example theme={null}
42
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.