# Split Document By Patient

> Perform Split Document By Patient through GenHealth.

Source: [https://genhealth.ai/docs/workflows/integrations/gen-health/genhealth_split_by_patient](https://genhealth.ai/docs/workflows/integrations/gen-health/genhealth_split_by_patient)

Integration: [GenHealth](https://genhealth.ai/docs/workflows/integrations/gen-health.md)

- Handler: `genhealth_split_by_patient`

## Inputs

- `document_id` — Document Id (expression)
  Optional literal value or workflow expression.
- `boundary_categories` — Boundary Categories (text)
  Optional text value.
- `drop_categories` — Drop Categories (text)
  Optional text value.
- `cover_page_policy` — Cover Page Policy (select)
  Optional selected identifier or value.
  Default: `"drop"`
  Options: Drop ("drop"), Previous ("previous"), Next ("next")
- `group_by` — Group By (text)
  Optional text value.
  Default: `"name,dob"`
- `split_on_identity_change` — Split On Identity Change (boolean)
  Optional true-or-false value.
  Default: `"true"`
- `orphan_page_policy` — Orphan Page Policy (select)
  Optional selected identifier or value.
  Default: `"previous"`
  Options: Previous ("previous"), Next ("next"), Review ("review")
- `identity_source` — Identity Source (select)
  Optional selected identifier or value.
  Default: `"llm"`
  Options: LLM (read each page) ("llm"), None (boundary categories only) ("none")
- `identity_model` — Identity Model (text)
  Optional text value.
- `identity_prompt_override` — Identity Prompt Override (textarea)
  Optional text value.
- `expected_patient_count` — Expected Patient Count (expression)
  Optional literal value or workflow expression.
- `review_on_count_mismatch` — Review On Count Mismatch (boolean)
  Optional true-or-false value.
  Default: `"true"`
- `min_pages_per_patient` — Min Pages Per Patient (number)
  Optional numeric value.
  Default: `1`
- `persist` — Persist (boolean)
  Optional true-or-false value.
  Default: `"true"`
- `hide_parent` — Hide Parent (boolean)
  Optional true-or-false value.
  Default: `"false"`
- `force` — Force (boolean)
  Optional true-or-false value.
  Default: `"false"`
- `split_cache_version` — Split Cache Version (number)
  Optional numeric value.
  Default: `0`

## Outputs

- `success` — Success
- `document_id` — Document Id
- `children` — Children
- `child_count` — Child Count
- `segments` — Segments
- `segment_count` — Segment Count
- `dropped_pages` — Dropped Pages
- `review_required` — Review Required
- `review_reason` — Review Reason
- `review_reasons` — Review Reasons
- `reason` — Reason
- `split_failure_reason` — Split Failure Reason
- `split_reconciliation` — Split Reconciliation
- `skipped` — Skipped
- `manual_split` — Manual Split
- `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",
  "properties": {
    "force": {
      "type": "boolean",
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "persist": {
      "type": "boolean",
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "group_by": {
      "type": "string",
      "default": "name,dob",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "document_id": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "hide_parent": {
      "type": "boolean",
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "identity_model": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "drop_categories": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "identity_source": {
      "enum": [
        "llm",
        "none"
      ],
      "type": "string",
      "default": "llm",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "cover_page_policy": {
      "enum": [
        "drop",
        "previous",
        "next"
      ],
      "type": "string",
      "default": "drop",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "orphan_page_policy": {
      "enum": [
        "previous",
        "next",
        "review"
      ],
      "type": "string",
      "default": "previous",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "boundary_categories": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "split_cache_version": {
      "type": "number",
      "default": 0,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "min_pages_per_patient": {
      "type": "number",
      "default": 1,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "expected_patient_count": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "identity_prompt_override": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "textarea"
    },
    "review_on_count_mismatch": {
      "type": "boolean",
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "split_on_identity_change": {
      "type": "boolean",
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "reason": {},
    "skipped": {},
    "success": {},
    "children": {},
    "segments": {},
    "child_count": {},
    "document_id": {},
    "manual_split": {},
    "dropped_pages": {},
    "review_reason": {},
    "segment_count": {},
    "review_reasons": {},
    "review_required": {},
    "split_failure_reason": {},
    "split_reconciliation": {}
  },
  "additionalProperties": true
}
```
