# Search Patients

> Perform Search Patients through athenahealth.

Source: [https://genhealth.ai/docs/workflows/integrations/athenahealth/athena_search_patients](https://genhealth.ai/docs/workflows/integrations/athenahealth/athena_search_patients)

Integration: [athenahealth](https://genhealth.ai/docs/workflows/integrations/athenahealth.md)

- Handler: `athena_search_patients`

## Inputs

- `query` — Query (expression, required)
  Required literal value or workflow expression.
- `filter_type` — Filter Type (select)
  Optional selected identifier or value.
  Default: `"NAME"`
  Options: Name ("NAME"), Patient ID ("ID")
- `max_results` — Max Results (number)
  Optional numeric value.
  Default: `20`

## Outputs

- `success` — Success
- `query` — Query
- `filter_type` — Filter Type
- `result_count` — Result Count
- `count` — Count
- `matches` — Matches
- `single_match` — Single Match
- `patient_id` — Patient Id
- `chart_id` — Chart Id
- `first_patient_id` — First Patient Id
- `first_chart_id` — First Chart Id
- `response_length` — Response Length
- `error` — Error
- `error_message` — Error Message

Output schema completeness: `best_effort_declared`

## Safety

- External effect: `read`
- Confirmation recommended: no
- Retry safe: yes
- Dry run supported: no

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "filter_type": {
      "enum": [
        "NAME",
        "ID"
      ],
      "type": "string",
      "default": "NAME",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "max_results": {
      "type": "number",
      "default": 20,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "count": {},
    "error": {},
    "query": {},
    "matches": {},
    "success": {},
    "chart_id": {},
    "patient_id": {},
    "filter_type": {},
    "result_count": {},
    "single_match": {},
    "error_message": {},
    "first_chart_id": {},
    "response_length": {},
    "first_patient_id": {}
  },
  "additionalProperties": true
}
```
