# Sync Patient Documents for Duplicate Check

> Perform Sync Patient Documents for Duplicate Check through Brightree.

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

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

- Handler: `brightree_sync_patient_documents`

- Connection type: `brightree`

## Inputs

- `document_id` — Document Id (expression, required)
  Required literal value or workflow expression.
- `patient_key` — Patient Key (expression, required)
  Required literal value or workflow expression.
- `document_types` — Document Types (text, required)
  Required text value.

## Outputs

- `success` — Success
- `is_duplicate` — Is Duplicate
- `already_in_db` — Already In Db
- `found_in_brightree` — Found In Brightree
- `synced_count` — Synced Count
- `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": [
    "document_id",
    "patient_key",
    "document_types"
  ],
  "properties": {
    "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_types": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "is_duplicate": {},
    "synced_count": {},
    "already_in_db": {},
    "found_in_brightree": {}
  },
  "additionalProperties": true
}
```
