# Create Order

> Perform Create Order through ClaimSoft.

Source: [https://genhealth.ai/docs/workflows/integrations/claim-soft/claimsoft_create_order](https://genhealth.ai/docs/workflows/integrations/claim-soft/claimsoft_create_order)

Integration: [ClaimSoft](https://genhealth.ai/docs/workflows/integrations/claim-soft.md)

- Handler: `claimsoft_create_order`

- Connection type: `claimsoft`

## Inputs

- `idempotency_key` — Idempotency Key (text, required)
  Required text value.
- `write_idempotency_to_original_ref_no` — Write Idempotency To Original Ref No (boolean)
  Optional true-or-false value.
  Default: `true`
- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `date_of_service_from` — Date Of Service From (text, required)
  Required text value.
- `date_of_service_to` — Date Of Service To (text, required)
  Required text value.
- `location` — Location (text, required)
  Required text value.
- `diagnosis_codes` — Diagnosis Codes (json, required)
  Required JSON value.
- `physician_id` — Physician Id (number, required)
  Required numeric value.
- `physician` — Physician (text, required)
  Required text value.
- `referral_source_id` — Referral Source Id (number)
  Optional numeric value.
- `referral_source` — Referral Source (text)
  Optional text value.
- `psr_id` — Psr Id (number, required)
  Required numeric value.
- `sales_rep_id` — Sales Rep Id (number)
  Optional numeric value.
- `sales_rep` — Sales Rep (text)
  Optional text value.
- `warehouse` — Warehouse (number)
  Optional numeric value.
- `place_of_service` — Place Of Service (number)
  Optional numeric value.
- `signature` — Signature (number)
  Optional numeric value.
- `rendering_provider_id` — Rendering Provider Id (number)
  Optional numeric value.
- `rendering_provider` — Rendering Provider (text)
  Optional text value.
- `semantic_items` — Semantic Items (json)
  Optional JSON value.
- `is_accident` — Is Accident (boolean)
  Optional true-or-false value.
- `accident_date` — Accident Date (text)
  Optional text value.
- `accident_state_id` — Accident State Id (text)
  Optional text value.
- `accident_description` — Accident Description (text)
  Optional text value.
- `prescription_date` — Prescription Date (text)
  Optional text value.
- `order_override` — Order Override (json)
  Optional JSON value.

## Outputs

- `success` — Success
- `order_id` — Order Id
- `created` — Created
- `duplicate_prevented` — Duplicate Prevented
- `match_basis` — Match Basis
- `idempotency_key` — Idempotency Key
- `message` — Message
- `error_kind` — Error Kind
- `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": [
    "idempotency_key",
    "patient_id",
    "date_of_service_from",
    "date_of_service_to",
    "location",
    "diagnosis_codes",
    "physician_id",
    "physician",
    "psr_id"
  ],
  "properties": {
    "psr_id": {
      "type": "number",
      "description": "Required numeric value.",
      "x-workflow-field-type": "number"
    },
    "location": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "physician": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "sales_rep": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "signature": {
      "type": "number",
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "warehouse": {
      "type": "number",
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "patient_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "is_accident": {
      "type": "boolean",
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "physician_id": {
      "type": "number",
      "description": "Required numeric value.",
      "x-workflow-field-type": "number"
    },
    "sales_rep_id": {
      "type": "number",
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "accident_date": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "order_override": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "semantic_items": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "diagnosis_codes": {
      "description": "Required JSON value.",
      "x-workflow-field-type": "json"
    },
    "idempotency_key": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "referral_source": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "place_of_service": {
      "type": "number",
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "accident_state_id": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "prescription_date": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "date_of_service_to": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "referral_source_id": {
      "type": "number",
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "rendering_provider": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "accident_description": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "date_of_service_from": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "rendering_provider_id": {
      "type": "number",
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "write_idempotency_to_original_ref_no": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "created": {},
    "message": {},
    "success": {},
    "order_id": {},
    "error_kind": {},
    "match_basis": {},
    "idempotency_key": {},
    "duplicate_prevented": {}
  },
  "additionalProperties": true
}
```
