# Find Similar Patient Document

> Perform Find Similar Patient Document through GenHealth.

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

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

- Handler: `genhealth_find_similar_document`

## 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": "GenHealth",
  "params": {
    "min_shingles": 50,
    "lookback_days": 14,
    "duplicate_threshold": 0.85,
    "containment_threshold": 0.9
  },
  "handler": "genhealth_find_similar_document"
}

```

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

## Inputs

- `document_id` — Document Id (expression, required)
  Required literal value or workflow expression.
- `lookback_days` — Lookback Days (number)
  Optional numeric value.
  Default: `14`
- `duplicate_threshold` — Duplicate Threshold (number)
  Optional numeric value.
  Default: `0.85`
- `containment_threshold` — Containment Threshold (number)
  Optional numeric value.
  Default: `0.9`
- `min_shingles` — Min Shingles (number)
  Optional numeric value.
  Default: `50`

## Outputs

- `success` — Success
- `document_id` — Document Id
- `decision` — Decision
- `reason` — Reason
- `is_duplicate` — Is Duplicate
- `needs_review` — Needs Review
- `original_document_id` — Original Document Id
- `jaccard` — Jaccard
- `incoming_containment` — Incoming Containment
- `candidates_compared` — Candidates Compared
- `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": [
    "document_id"
  ],
  "properties": {
    "document_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "min_shingles": {
      "type": "number",
      "default": 50,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "lookback_days": {
      "type": "number",
      "default": 14,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "duplicate_threshold": {
      "type": "number",
      "default": 0.85,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "containment_threshold": {
      "type": "number",
      "default": 0.9,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "reason": {},
    "jaccard": {},
    "success": {},
    "decision": {},
    "document_id": {},
    "is_duplicate": {},
    "needs_review": {},
    "candidates_compared": {},
    "incoming_containment": {},
    "original_document_id": {}
  },
  "additionalProperties": true
}
```
