# Find or Create Patient

> Perform Find or Create Patient through NikoHealth.

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

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

- Handler: `nikohealth_find_or_create_patient`

- Connection type: `nikohealth`

## Inputs

- `document_id` — Document Id (expression, required)
  Required literal value or workflow expression.
- `location_id` — Location Id (expression)
  Optional literal value or workflow expression.
- `location_id_select` — Location Id Select (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
- `auto_update_existing_patient_fields` — Auto Update Existing Patient Fields (boolean)
  Optional true-or-false value.
  Default: `false`
- `append_missing_phone_contacts` — Append Missing Phone Contacts (boolean)
  Optional true-or-false value.
  Default: `false`
- `duplicate_match_mode` — Duplicate Match Mode (select)
  Optional selected identifier or value.
  Default: `"strict"`
  Options: Strict ("strict"), Exact First Name, Last Name, and DOB ("exact_identity"), Review Near Matches ("review_near_matches"), Match on Available Identifiers (name-only when no DOB) ("available_identifiers")
- `patient_genhealth_tag_id` — Patient Genhealth Tag Id (text)
  Optional text value.
- `patient_genhealth_tag_id_select` — Patient Genhealth Tag Id Select (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
- `mark_signature_on_file` — Mark Signature On File (boolean)
  Optional true-or-false value.
  Default: `false`
- `existing_patient_signature_date` — Existing Patient Signature Date (date)
  Optional date in YYYY-MM-DD format.
- `overwrite_existing_signature_date` — Overwrite Existing Signature Date (boolean)
  Optional true-or-false value.
  Default: `true`
- `set_responsible_contact_to_self` — Set Responsible Contact To Self (boolean)
  Optional true-or-false value.
  Default: `false`

## Outputs

- `success` — Success
- `patient_id` — Patient Id
- `first_name` — First Name
- `last_name` — Last Name
- `birthday` — Birthday
- `is_new_patient` — Is New Patient
- `document_id` — Document Id
- `applied_patient_tag_ids` — Applied Patient Tag Ids
- `patient_tag_writeback_status` — Patient Tag Writeback Status
- `patient_tag_warning` — Patient Tag Warning
- `patient_check_status` — Patient Check Status
- `ambiguous_patient_match` — Ambiguous Patient Match
- `ambiguous_patient_match_tag_id` — Ambiguous Patient Match Tag Id
- `responsible_contact_updated` — Responsible Contact Updated
- `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"
    },
    "location_id": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "location_id_select": {
      "type": "string",
      "description": "Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.",
      "x-dynamic-options": true,
      "x-workflow-field-type": "select"
    },
    "duplicate_match_mode": {
      "enum": [
        "strict",
        "exact_identity",
        "review_near_matches",
        "available_identifiers"
      ],
      "type": "string",
      "default": "strict",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "mark_signature_on_file": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "patient_genhealth_tag_id": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "append_missing_phone_contacts": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "existing_patient_signature_date": {
      "type": "string",
      "format": "date",
      "description": "Optional date in YYYY-MM-DD format.",
      "x-workflow-field-type": "date"
    },
    "patient_genhealth_tag_id_select": {
      "type": "string",
      "description": "Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.",
      "x-dynamic-options": true,
      "x-workflow-field-type": "select"
    },
    "set_responsible_contact_to_self": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "overwrite_existing_signature_date": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "auto_update_existing_patient_fields": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "birthday": {},
    "last_name": {},
    "first_name": {},
    "patient_id": {},
    "document_id": {},
    "is_new_patient": {},
    "patient_tag_warning": {},
    "patient_check_status": {},
    "ambiguous_patient_match": {},
    "applied_patient_tag_ids": {},
    "responsible_contact_updated": {},
    "patient_tag_writeback_status": {},
    "ambiguous_patient_match_tag_id": {}
  },
  "additionalProperties": true
}
```
