# List Referral Documents

> Perform List Referral Documents through athenahealth.

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

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

- Handler: `athena_list_referral_documents`

- Connection type: `athenahealth`

## Inputs

- `bucket_name` — Bucket Name (expression, required)
  Required literal value or workflow expression.
- `assigned_to` — Assigned To (expression, required)
  Required literal value or workflow expression.
- `subject_types` — Subject Types (expression)
  Optional literal value or workflow expression.
- `document_classes` — Document Classes (expression)
  Optional literal value or workflow expression.
- `document_sub_classes` — Document Sub Classes (expression)
  Optional literal value or workflow expression.
  Default: `"ADMIN_REFERRAL"`
- `per_page` — Per Page (number)
  Optional numeric value.
  Default: `50`
- `max_items` — Max Items (number)
  Optional numeric value.
  Default: `200`
- `sort_column` — Sort Column (expression)
  Optional literal value or workflow expression.
- `sort_direction` — Sort Direction (expression)
  Optional literal value or workflow expression.
- `sort_field` — Sort Field (expression)
  Optional literal value or workflow expression.

## Outputs

- `success` — Success
- `bucket_name` — Bucket Name
- `assigned_to` — Assigned To
- `documents` — Documents
- `document_count` — Document Count
- `count` — Count
- `document_ids` — Document Ids
- `scanned_count` — Scanned Count
- `filtered_out_count` — Filtered Out Count
- `bucket_total_count` — Bucket Total Count
- `pages_read` — Pages Read
- `truncated` — Truncated
- `subject_types_seen` — Subject Types Seen
- `document_classes_seen` — Document Classes Seen
- `document_sub_classes_seen` — Document Sub Classes Seen
- `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": [
    "bucket_name",
    "assigned_to"
  ],
  "properties": {
    "per_page": {
      "type": "number",
      "default": 50,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "max_items": {
      "type": "number",
      "default": 200,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "sort_field": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "assigned_to": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "bucket_name": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "sort_column": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "subject_types": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "sort_direction": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "document_classes": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "document_sub_classes": {
      "default": "ADMIN_REFERRAL",
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "count": {},
    "error": {},
    "success": {},
    "documents": {},
    "truncated": {},
    "pages_read": {},
    "assigned_to": {},
    "bucket_name": {},
    "document_ids": {},
    "error_message": {},
    "scanned_count": {},
    "document_count": {},
    "bucket_total_count": {},
    "filtered_out_count": {},
    "subject_types_seen": {},
    "document_classes_seen": {},
    "document_sub_classes_seen": {}
  },
  "additionalProperties": true
}
```
