# Edit Existing Order via Tracking (v2)

> Perform Edit Existing Order via Tracking (v2) through NikoHealth.

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

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

- Handler: `nikohealth_edit_order_tracking_v2`

- Connection type: `nikohealth`

## Inputs

- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `order_id` — Order Id (expression, required)
  Required literal value or workflow expression.
- `product_swaps` — Product Swaps (expression)
  Optional literal value or workflow expression.
- `add_items` — Add Items (expression)
  Optional literal value or workflow expression.
- `diagnosis_codes` — Diagnosis Codes (expression)
  Optional literal value or workflow expression.
- `diagnosis_code_prefixes` — Diagnosis Code Prefixes (expression)
  Optional literal value or workflow expression.
- `dry_run` — Dry Run (boolean)
  Optional true-or-false value.
  Default: `true`

## Outputs

- `success` — Success
- `order_id` — Order Id
- `edit_status` — Edit Status
- `applied_ops` — Applied Ops
- `item_count` — Item Count
- `diagnosis_count` — Diagnosis Count
- `confirmed_by_readback` — Confirmed By Readback
- `partial_edit` — Partial Edit
- `refusal_reason` — Refusal Reason
- `refusal_field` — Refusal Field
- `refusal_detail` — Refusal Detail
- `failure_category` — Failure Category
- `retryable` — Retryable
- `error` — Error

Output schema completeness: `best_effort_declared`

## Safety

- External effect: `write`
- Confirmation recommended: no
- Retry safe: no
- Dry run supported: yes

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "required": [
    "patient_id",
    "order_id"
  ],
  "properties": {
    "dry_run": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "order_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "add_items": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "patient_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "product_swaps": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "diagnosis_codes": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "diagnosis_code_prefixes": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "order_id": {},
    "retryable": {},
    "item_count": {},
    "applied_ops": {},
    "edit_status": {},
    "partial_edit": {},
    "refusal_field": {},
    "refusal_detail": {},
    "refusal_reason": {},
    "diagnosis_count": {},
    "failure_category": {},
    "confirmed_by_readback": {}
  },
  "additionalProperties": true
}
```
