# Find Patient Documents By Category

> Perform Find Patient Documents By Category through GenHealth.

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

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

- Handler: `genhealth_find_patient_documents_by_category`

## Inputs

- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `required_categories` — Required Categories (expression, required)
  Required literal value or workflow expression.
- `lookback_days` — Lookback Days (number)
  Optional numeric value.
  Default: `30`

## Outputs

- `success` — Success
- `documents` — Documents
- `document_ids` — Document Ids
- `matched_categories` — Matched Categories
- `missing_categories` — Missing Categories
- `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": [
    "patient_id",
    "required_categories"
  ],
  "properties": {
    "patient_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "lookback_days": {
      "type": "number",
      "default": 30,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "required_categories": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "documents": {},
    "document_ids": {},
    "matched_categories": {},
    "missing_categories": {}
  },
  "additionalProperties": true
}
```
