# Upload Document to Patient

> Perform Upload Document to Patient through Brightree.

Source: [https://genhealth.ai/docs/workflows/integrations/brightree/brightree_upload_document_to_patient](https://genhealth.ai/docs/workflows/integrations/brightree/brightree_upload_document_to_patient)

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

- Handler: `brightree_upload_document_to_patient`

- Connection type: `brightree`

## Inputs

- `patient_key` — Patient Key (expression, required)
  Required literal value or workflow expression.
- `document_id` — Document Id (expression, required)
  Required literal value or workflow expression.
- `document_type` — Document Type (text, required)
  Required text value.
- `deduplicate` — Deduplicate (boolean)
  Optional true-or-false value.
  Default: `false`
- `verify_count_increase` — Verify Count Increase (boolean)
  Optional true-or-false value.
  Default: `false`
- `verify_document_types` — Verify Document Types (text)
  Optional text value.
- `verify_max_attempts` — Verify Max Attempts (number)
  Optional numeric value.
  Default: `10`
- `batch_name` — Batch Name (text)
  Optional text value.
- `batch_id` — Batch Id (text)
  Optional text value.
- `file_name` — File Name (expression)
  Optional literal value or workflow expression.
- `notes` — Notes (textarea)
  Optional text value.

## Outputs

- `success` — Success
- `uploaded_filename` — Uploaded Filename
- `uploaded_count` — Uploaded Count
- `skipped_count` — Skipped Count
- `failed_count` — Failed Count
- `uploaded_document_ids` — Uploaded Document Ids
- `count_before` — Count Before
- `count_after` — Count After
- `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_key",
    "document_id",
    "document_type"
  ],
  "properties": {
    "notes": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "textarea"
    },
    "batch_id": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "file_name": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "batch_name": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "deduplicate": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "document_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "patient_key": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "document_type": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "verify_max_attempts": {
      "type": "number",
      "default": 10,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "verify_count_increase": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "verify_document_types": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "count_after": {},
    "count_before": {},
    "failed_count": {},
    "skipped_count": {},
    "uploaded_count": {},
    "uploaded_filename": {},
    "uploaded_document_ids": {}
  },
  "additionalProperties": true
}
```
