# Prepare Intake Source Cleanup

> Perform Prepare Intake Source Cleanup through GenHealth.

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

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

- Handler: `genhealth_prepare_intake_source_cleanup`

## Inputs

- `workflow_key` — Workflow Key (text)
  Optional text value.
- `case_payload` — Case Payload (json)
  Optional JSON value.
- `ehr_payload` — Ehr Payload (json)
  Optional JSON value.
- `execution_context` — Execution Context (json)
  Optional JSON value.
- `routing_context` — Routing Context (json)
  Optional JSON value.
- `eligibility_context` — Eligibility Context (json)
  Optional JSON value.
- `patient_context` — Patient Context (json)
  Optional JSON value.
- `workflow_items_context` — Workflow Items Context (json)
  Optional JSON value.
- `service_confirmation_context` — Service Confirmation Context (json)
  Optional JSON value.
- `post_processing_context` — Post Processing Context (json)
  Optional JSON value.
- `trigger_payload` — Trigger Payload (json)
  Optional JSON value.
- `final_summary_context` — Final Summary Context (json)
  Optional JSON value.

## Outputs

- `success` — Success
- `source_cleanup_prepare_context` — Source Cleanup Prepare Context
- `tracker_summary` — Tracker Summary
- `created_workflows` — Created Workflows
- `execution_summary` — Execution Summary
- `side_effect_ledger` — Side Effect Ledger
- `error_message` — Error Message
- `manual_review_required` — Manual Review Required
- `terminal_skip_required` — Terminal Skip Required
- `delete_request` — Delete Request

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": {
    "ehr_payload": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "case_payload": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "workflow_key": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "patient_context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "routing_context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "trigger_payload": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "execution_context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "eligibility_context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "final_summary_context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "workflow_items_context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "post_processing_context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "service_confirmation_context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "success": {},
    "error_message": {},
    "delete_request": {},
    "tracker_summary": {},
    "created_workflows": {},
    "execution_summary": {},
    "side_effect_ledger": {},
    "manual_review_required": {},
    "terminal_skip_required": {},
    "source_cleanup_prepare_context": {}
  },
  "additionalProperties": true
}
```
