# Extract ICD Codes From Text

> Perform Extract ICD Codes From Text through GenHealth.

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

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

- Handler: `genhealth_extract_icd_codes_from_text`

## Inputs

- `text` — Text (textarea, required)
  Required text value.
- `date_of_service` — Date Of Service (date, required)
  Required date in YYYY-MM-DD format.
- `encounter_setting` — Encounter Setting (select, required)
  Required selected identifier or value.
  Options: Inpatient Final Discharge ("inpatient_final_discharge"), Outpatient Or Other ("outpatient_or_other")

## Outputs

- `success` — Success
- `icd_codes` — Icd Codes
- `diagnosis_codes` — Diagnosis Codes
- `diagnosis_count` — Diagnosis Count
- `extraction_runs` — Extraction Runs
- `successful_extraction_runs` — Successful Extraction Runs
- `agreed_on_first_two` — Agreed On First Two
- `consensus_reached` — Consensus Reached
- `official_code_validation_performed` — Official Code Validation Performed
- `icd10_reference_release` — Icd10 Reference Release
- `diagnosis_coding_service` — Diagnosis Coding Service
- `diagnosis_coding_model` — Diagnosis Coding Model
- `human_review_required` — Human Review Required
- `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": [
    "text",
    "date_of_service",
    "encounter_setting"
  ],
  "properties": {
    "text": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "textarea"
    },
    "date_of_service": {
      "type": "string",
      "format": "date",
      "description": "Required date in YYYY-MM-DD format.",
      "x-workflow-field-type": "date"
    },
    "encounter_setting": {
      "enum": [
        "inpatient_final_discharge",
        "outpatient_or_other"
      ],
      "type": "string",
      "description": "Required selected identifier or value.",
      "x-workflow-field-type": "select"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "icd_codes": {},
    "diagnosis_codes": {},
    "diagnosis_count": {},
    "extraction_runs": {},
    "consensus_reached": {},
    "agreed_on_first_two": {},
    "human_review_required": {},
    "diagnosis_coding_model": {},
    "icd10_reference_release": {},
    "diagnosis_coding_service": {},
    "successful_extraction_runs": {},
    "official_code_validation_performed": {}
  },
  "additionalProperties": true
}
```
