# Search Expiring Prescriptions

> Perform Search Expiring Prescriptions through NikoHealth.

Source: [https://genhealth.ai/docs/workflows/integrations/nikohealth/nikohealth_search_expiring_prescriptions](https://genhealth.ai/docs/workflows/integrations/nikohealth/nikohealth_search_expiring_prescriptions)

Integration: [NikoHealth](https://genhealth.ai/docs/workflows/integrations/nikohealth.md)

- Handler: `nikohealth_search_expiring_prescriptions`

- Connection type: `nikohealth`

## Use in a workflow

Copy this discovered node config, fill params from the input contract, and validate the complete graph. Integration results are available as {{node_id.default.field}}. Check business success before dependent writes; completion alone does not prove business success.

```json

{
  "_group": "NikoHealth",
  "params": {
    "statuses": [
      "Active",
      "Expired"
    ],
    "timezone": "America/New_York",
    "max_pages": 10,
    "page_size": 100,
    "days_ahead": 30,
    "days_behind": 0,
    "include_archived": false
  },
  "handler": "nikohealth_search_expiring_prescriptions"
}

```

[Action contracts](https://genhealth.ai/docs/workflows/action-contracts.md) · [Run recovery](https://genhealth.ai/docs/workflows/operations.md)

## Inputs

- `days_ahead` — Days Ahead (number)
  Optional numeric value.
  Default: `30`
- `days_behind` — Days Behind (number)
  Optional numeric value.
  Default: `0`
- `statuses` — Statuses (multi_select)
  Optional list of selected values.
  Default: `["Active","Expired"]`
  Options: Active ("Active"), Expired ("Expired")
- `include_archived` — Include Archived (boolean)
  Optional true-or-false value.
  Default: `false`
- `page_size` — Page Size (number)
  Optional numeric value.
  Default: `100`
- `max_pages` — Max Pages (number)
  Optional numeric value.
  Default: `10`
- `timezone` — Timezone (expression)
  Optional literal value or workflow expression.
  Default: `"America/New_York"`

## Outputs

- `success` — Success
- `prescriptions` — Prescriptions
- `count` — Count
- `truncated` — Truncated
- `total_reported` — Total Reported
- `window_from` — Window From
- `window_to` — Window To
- `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",
  "properties": {
    "statuses": {
      "type": "array",
      "items": {
        "enum": [
          "Active",
          "Expired"
        ],
        "type": "string"
      },
      "default": [
        "Active",
        "Expired"
      ],
      "description": "Optional list of selected values.",
      "x-workflow-field-type": "multi_select"
    },
    "timezone": {
      "default": "America/New_York",
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "max_pages": {
      "type": "number",
      "default": 10,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "page_size": {
      "type": "number",
      "default": 100,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "days_ahead": {
      "type": "number",
      "default": 30,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "days_behind": {
      "type": "number",
      "default": 0,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "include_archived": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "count": {},
    "error": {},
    "success": {},
    "truncated": {},
    "window_to": {},
    "window_from": {},
    "prescriptions": {},
    "total_reported": {}
  },
  "additionalProperties": true
}
```
