# Assign Documents to Order

> Perform Assign Documents to Order through NikoHealth.

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

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

- Handler: `nikohealth_assign_order_documents`

- Connection type: `nikohealth`

## Inputs

- `patient_id` — Patient Id (text, required)
  Required text value.
- `order_id` — Order Id (text, required)
  Required text value.
- `patient_document_ids` — Patient Document Ids (expression, required)
  Required literal value or workflow expression.
- `merge_existing` — Merge Existing (boolean)
  Optional true-or-false value.
  Default: `true`
- `enabled` — Enabled (boolean)
  Optional true-or-false value.
  Default: `true`
- `skip_if_empty` — Skip If Empty (boolean)
  Optional true-or-false value.
  Default: `false`

## Outputs

- `success` — Success
- `status` — Status
- `skipped` — Skipped
- `patient_id` — Patient Id
- `order_id` — Order Id
- `incoming_patient_document_ids` — Incoming Patient Document Ids
- `existing_patient_document_ids` — Existing Patient Document Ids
- `submitted_patient_document_ids` — Submitted Patient Document Ids
- `patient_document_ids` — Patient Document Ids
- `assigned_count` — Assigned Count
- `associated_count` — Associated Count
- `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": [
    "patient_id",
    "order_id",
    "patient_document_ids"
  ],
  "properties": {
    "enabled": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "order_id": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "patient_id": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "skip_if_empty": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "merge_existing": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "patient_document_ids": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "status": {},
    "skipped": {},
    "success": {},
    "order_id": {},
    "patient_id": {},
    "assigned_count": {},
    "associated_count": {},
    "patient_document_ids": {},
    "existing_patient_document_ids": {},
    "incoming_patient_document_ids": {},
    "submitted_patient_document_ids": {}
  },
  "additionalProperties": true
}
```
