# Classify New Patient

> Perform Classify New Patient through eClinicalWorks.

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

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

- Handler: `ecw_classify_new_patient`

- Connection type: `eclinicalworks`

## Inputs

- `lookback_days` — Lookback Days (number)
  Optional numeric value.
  Default: `1095`
- `physician_predicate` — Physician Predicate (select)
  Optional selected identifier or value.
  Default: `"rendering_only"`
  Options: Rendering Only (strict) ("rendering_only"), Rendering or Supervising (loose) ("rendering_or_supervising")
- `encounter_id` — Encounter Id (text, required)
  Required text value.

## Outputs

- `success` — Success
- `is_new_patient` — Is New Patient
- `last_physician_visit_date` — Last Physician Visit Date
- `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",
  "required": [
    "encounter_id"
  ],
  "properties": {
    "encounter_id": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "lookback_days": {
      "type": "number",
      "default": 1095,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "physician_predicate": {
      "enum": [
        "rendering_only",
        "rendering_or_supervising"
      ],
      "type": "string",
      "default": "rendering_only",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "is_new_patient": {},
    "last_physician_visit_date": {}
  },
  "additionalProperties": true
}
```
