# Download & Merge Patient Documents

> Perform Download & Merge Patient Documents through ClaimSoft.

Source: [https://genhealth.ai/docs/workflows/integrations/claim-soft/claimsoft_download_patient_documents](https://genhealth.ai/docs/workflows/integrations/claim-soft/claimsoft_download_patient_documents)

Integration: [ClaimSoft](https://genhealth.ai/docs/workflows/integrations/claim-soft.md)

- Handler: `claimsoft_download_patient_documents`

- Connection type: `claimsoft`

## Inputs

- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `documents` — Documents (json, required)
  Required JSON value.
- `merge` — Merge (boolean)
  Optional true-or-false value.
  Default: `true`
- `hidden` — Hidden (boolean)
  Optional true-or-false value.
  Default: `false`
- `title` — Title (text)
  Optional text value.
- `dedupe_key` — Dedupe Key (expression)
  Optional literal value or workflow expression.
- `date_of_service` — Date Of Service (expression)
  Optional literal value or workflow expression.

## Outputs

- `success` — Success
- `patient_id` — Patient Id
- `document_id` — Document Id
- `document_ids` — Document Ids
- `total` — Total
- `hidden` — Hidden
- `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": [
    "patient_id",
    "documents"
  ],
  "properties": {
    "merge": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "title": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "hidden": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "documents": {
      "description": "Required JSON value.",
      "x-workflow-field-type": "json"
    },
    "dedupe_key": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "patient_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "date_of_service": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "total": {},
    "hidden": {},
    "success": {},
    "patient_id": {},
    "document_id": {},
    "document_ids": {}
  },
  "additionalProperties": true
}
```
