# Read Referral Attachments

> Perform Read Referral Attachments through athenahealth.

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

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

- Handler: `athena_read_referral_attachments`

## Inputs

- `document_id` — Document Id (expression, required)
  Required literal value or workflow expression.
- `chart_id` — Chart Id (expression, required)
  Required literal value or workflow expression.
- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `document_class` — Document Class (expression, required)
  Required literal value or workflow expression.
  Default: `"PATIENTCASE"`
- `target_document_id` — Target Document Id (expression)
  Optional literal value or workflow expression.

## Outputs

- `success` — Success
- `document_id` — Document Id
- `document_class` — Document Class
- `patient_id` — Patient Id
- `chart_id` — Chart Id
- `attachment_count` — Attachment Count
- `attached_count` — Attached Count
- `attachments` — Attachments
- `target_document_id` — Target Document Id
- `target_attachment_found` — Target Attachment Found
- `target_attachment_attached` — Target Attachment Attached
- `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": [
    "document_id",
    "chart_id",
    "patient_id",
    "document_class"
  ],
  "properties": {
    "chart_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "patient_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "document_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "document_class": {
      "default": "PATIENTCASE",
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "target_document_id": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "chart_id": {},
    "patient_id": {},
    "attachments": {},
    "document_id": {},
    "error_message": {},
    "attached_count": {},
    "document_class": {},
    "attachment_count": {},
    "target_document_id": {},
    "target_attachment_found": {},
    "target_attachment_attached": {}
  },
  "additionalProperties": true
}
```
