# Search Documents by Entity

> Perform Search Documents by Entity through DocuTrack.

Source: [https://genhealth.ai/docs/workflows/integrations/docu-track/docutrack_search_documents](https://genhealth.ai/docs/workflows/integrations/docu-track/docutrack_search_documents)

Integration: [DocuTrack](https://genhealth.ai/docs/workflows/integrations/docu-track.md)

- Handler: `docutrack_search_documents`

- Connection type: `docutrack`

## Inputs

- `entity_type` — Entity Type (select)
  Optional selected identifier or value.
  Default: `"Patient"`
  Options: Facility ("Facility"), Physician ("Physician"), Patient ("Patient"), Prescription ("Prescription"), Ancillary ("Ancillary"), Manifest ("Manifest"), Unknown ("Unknown")
- `search_value` — Search Value (expression, required)
  Required literal value or workflow expression.
- `after_document_id` — After Document Id (number)
  Optional numeric value.
  Default: `0`
- `limit` — Limit (number)
  Optional numeric value.
  Default: `100`

## Outputs

- `success` — Success
- `documents` — Documents
- `count` — Count
- `total_count` — Total Count
- `truncated` — Truncated
- `next_after_id` — Next After Id
- `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": [
    "search_value"
  ],
  "properties": {
    "limit": {
      "type": "number",
      "default": 100,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "entity_type": {
      "enum": [
        "Facility",
        "Physician",
        "Patient",
        "Prescription",
        "Ancillary",
        "Manifest",
        "Unknown"
      ],
      "type": "string",
      "default": "Patient",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "search_value": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "after_document_id": {
      "type": "number",
      "default": 0,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "count": {},
    "error": {},
    "success": {},
    "documents": {},
    "truncated": {},
    "total_count": {},
    "next_after_id": {}
  },
  "additionalProperties": true
}
```
