# Download Patient Document

> Perform Download Patient Document through ExaPACS.

Source: [https://genhealth.ai/docs/workflows/integrations/exa-pacs/exapacs_download_patient_document](https://genhealth.ai/docs/workflows/integrations/exa-pacs/exapacs_download_patient_document)

Integration: [ExaPACS](https://genhealth.ai/docs/workflows/integrations/exa-pacs.md)

- Handler: `exapacs_download_patient_document`

- Connection type: `exapacs`

## Inputs

- `exa_doc_id` — Exa Doc Id (expression, required)
  Required literal value or workflow expression.
- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `order_id` — Order Id (expression, required)
  Required literal value or workflow expression.
- `output_path` — Output Path (text)
  Optional text value.

## Outputs

- `status` — Status
- `document_id` — Document Id
- `s3_key` — S3 Key
- `filename` — Filename
- `mime_type` — Mime Type
- `byte_count` — Byte Count
- `output_path` — Output Path
- `skipped` — Skipped
- `error` — Error

Output schema completeness: `best_effort_declared`

## Safety

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

## Schemas

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

### Input schema

```json
{
  "type": "object",
  "required": [
    "exa_doc_id",
    "patient_id",
    "order_id"
  ],
  "properties": {
    "order_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "exa_doc_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"
    },
    "output_path": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "s3_key": {},
    "status": {},
    "skipped": {},
    "filename": {},
    "mime_type": {},
    "byte_count": {},
    "document_id": {},
    "output_path": {}
  },
  "additionalProperties": true
}
```
