# List Outgoing Referrals

> Perform List Outgoing Referrals through eClinicalWorks.

Source: [https://genhealth.ai/docs/workflows/integrations/eclinicalworks/ecw_list_outgoing_referrals](https://genhealth.ai/docs/workflows/integrations/eclinicalworks/ecw_list_outgoing_referrals)

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

- Handler: `ecw_list_outgoing_referrals`

- Connection type: `eclinicalworks`

## Use in a workflow

Copy this discovered node config, fill params from the input contract, and validate the complete graph. Integration results are available as {{node_id.default.field}}. Check business success before dependent writes; completion alone does not prove business success.

```json

{
  "_group": "eClinicalWorks",
  "params": {
    "status": "open",
    "timezone": "UTC",
    "lookback_days": 7,
    "max_referrals": 200
  },
  "handler": "ecw_list_outgoing_referrals"
}

```

[Action contracts](https://genhealth.ai/docs/workflows/action-contracts.md) · [Run recovery](https://genhealth.ai/docs/workflows/operations.md)

## Inputs

- `lookback_days` — Lookback Days (number)
  Optional numeric value.
  Default: `7`
- `query_params` — Query Params (json)
  Optional JSON value.
- `status` — Status (text)
  Optional text value.
  Default: `"open"`
- `timezone` — Timezone (text)
  Optional text value.
  Default: `"UTC"`
- `max_referrals` — Max Referrals (number)
  Optional numeric value.
  Default: `200`

## Outputs

- `success` — Success
- `referrals` — Referrals
- `count` — Count
- `scanned_count` — Scanned Count
- `error` — Error

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",
  "properties": {
    "status": {
      "type": "string",
      "default": "open",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "timezone": {
      "type": "string",
      "default": "UTC",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "query_params": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "lookback_days": {
      "type": "number",
      "default": 7,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "max_referrals": {
      "type": "number",
      "default": 200,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "count": {},
    "error": {},
    "success": {},
    "referrals": {},
    "scanned_count": {}
  },
  "additionalProperties": true
}
```
