Rule-Based Task Router
Perform Rule-Based Task Router through NikoHealth.
nikohealth_rule_based_task_routerInputs
- Document Id
document_idexpressionrequiredRequired literal value or workflow expression.
- Patient Id
patient_idexpressionOptional literal value or workflow expression.
- Has Patient Data
has_patient_dataexpressionOptional literal value or workflow expression.
- Has Order Data
has_order_dataexpressionOptional literal value or workflow expression.
- Is New Patient
is_new_patientexpressionOptional literal value or workflow expression.
- Document Type
document_typeexpressionOptional literal value or workflow expression.
- Is Carecentrix
is_carecentrixexpressionOptional literal value or workflow expression.
- Has Resupply
has_resupplyexpressionOptional literal value or workflow expression.
- Has Pending Authorization
has_pending_authorizationexpressionOptional literal value or workflow expression.
- Referring Provider Name
referring_provider_nameexpressionOptional literal value or workflow expression.
- Ocr Text
ocr_textexpressionOptional literal value or workflow expression.
- Document Url
document_urlexpressionOptional literal value or workflow expression.
- Enable Strategy Title Triage
enable_strategy_title_triagebooleanOptional true-or-false value.
Default:
false - Routing Rules
routing_rulesrepeatable_groupOptional list of structured items.
- Enabled
enabledbooleanOptional true-or-false value.
Default:
true - Priority
prioritytextOptional text value.
Default:
"100" - Name
nametextrequiredRequired text value.
- Condition Flags
condition_flagsmulti_selectOptional list of selected values.
Options: Has patient data ("has_patient_data"), No patient data ("no_patient_data"), Has order data ("has_order_data"), No order data ("no_order_data"), Supports order tasking ("supports_order_tasking"), Does not support order tasking ("not_supports_order_tasking"), New patient ("is_new_patient"), Existing patient ("is_existing_patient"), Has resupply ("has_resupply"), No resupply ("no_resupply"), Has pending authorization ("has_pending_authorization"), No pending authorization ("no_pending_authorization"), Referral signal ("has_referral_signal"), No referral signal ("no_referral_signal"), WellSky referral ("is_wellsky_referral"), Not WellSky referral ("not_wellsky_referral")
- Document Types
document_typesmulti_selectOptional list of selected values.
- Ocr Contains Any
ocr_contains_anymulti_selectOptional list of selected values.
- Ocr Contains All
ocr_contains_allmulti_selectOptional list of selected values.
- Provider Contains Any
provider_contains_anymulti_selectOptional list of selected values.
- Provider Resolution Mode
provider_resolution_modeselectOptional selected identifier or value.
Default:
"configured_terms"Options: Configured provider terms ("configured_terms"), Strategy provider resolver ("strategy_provider_resolver")
- Custom Context Flags
custom_context_flagsmulti_selectOptional list of selected values.
- Outcome Action
outcome_actionselectOptional selected identifier or value.
Default:
"create_task"Options: Create task ("create_task"), Complete without task ("complete_without_task"), Skip ("skip"), Fail tasking ("fail")
- Tasking Outcome
tasking_outcometextOptional text value.
- Task Category Id
task_category_idselectdynamic optionsOptional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
- Task Priority
task_priorityselectOptional selected identifier or value.
Default:
"Normal"Options: Normal ("Normal"), Low ("Low"), High ("High")
- Assignee Ids
assignee_idsmulti_selectdynamic optionsOptional list of selected values. Retrieve allowed values from the dynamic options endpoint.
- Assignee Ids Manual
assignee_ids_manualexpressionOptional literal value or workflow expression.
- Pick Random Assignee
pick_random_assigneebooleanOptional true-or-false value.
Default:
false - Assignee Type
assignee_typeselectOptional selected identifier or value.
Default:
"user"Options: User ("user"), Team ("team")
- Assignee Resolution Mode
assignee_resolution_modeselectOptional selected identifier or value.
Default:
"static"Options: Static assignees ("static"), Latest open task, fallback to assignees ("latest_open_task"), Latest authorization task, fallback to assignees ("latest_authorization_task")
- Title Template
title_templatetextOptional text value.
- Description Template
description_templatetextareaOptional text value.
- Attach Patient
attach_patientbooleanOptional true-or-false value.
Default:
true - Attach Legacy Document
attach_legacy_documentbooleanOptional true-or-false value.
Default:
true
Outputs
successSuccesstasking_outcomeTasking Outcometask_idTask IdidempotentIdempotentmatched_ruleMatched Rulematched_rule_sourceMatched Rule Sourcedocument_idDocument Iddocument_typeDocument Typeis_new_patientIs New Patientsupports_order_taskingSupports Order Taskingcustom_context_flagsCustom Context Flagshas_resupplyHas Resupplyhas_pending_authorizationHas Pending Authorizationdisplay_nameDisplay NameskippedSkippedmessageMessageerror_codeError Codeerror_typeError TypeerrorError
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
{
"type": "object",
"required": [
"document_id"
],
"properties": {
"ocr_text": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"patient_id": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"document_id": {
"description": "Required literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"document_url": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"has_resupply": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"document_type": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"routing_rules": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Required text value.",
"x-workflow-field-type": "text"
},
"enabled": {
"type": "boolean",
"default": true,
"description": "Optional true-or-false value.",
"x-workflow-field-type": "boolean"
},
"priority": {
"type": "string",
"default": "100",
"description": "Optional text value.",
"x-workflow-field-type": "text"
},
"assignee_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional list of selected values. Retrieve allowed values from the dynamic options endpoint.",
"x-dynamic-options": true,
"x-workflow-field-type": "multi_select"
},
"assignee_type": {
"enum": [
"user",
"team"
],
"type": "string",
"default": "user",
"description": "Optional selected identifier or value.",
"x-workflow-field-type": "select"
},
"task_priority": {
"enum": [
"Normal",
"Low",
"High"
],
"type": "string",
"default": "Normal",
"description": "Optional selected identifier or value.",
"x-workflow-field-type": "select"
},
"attach_patient": {
"type": "boolean",
"default": true,
"description": "Optional true-or-false value.",
"x-workflow-field-type": "boolean"
},
"document_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional list of selected values.",
"x-workflow-field-type": "multi_select"
},
"outcome_action": {
"enum": [
"create_task",
"complete_without_task",
"skip",
"fail"
],
"type": "string",
"default": "create_task",
"description": "Optional selected identifier or value.",
"x-workflow-field-type": "select"
},
"title_template": {
"type": "string",
"description": "Optional text value.",
"x-workflow-field-type": "text"
},
"condition_flags": {
"type": "array",
"items": {
"enum": [
"has_patient_data",
"no_patient_data",
"has_order_data",
"no_order_data",
"supports_order_tasking",
"not_supports_order_tasking",
"is_new_patient",
"is_existing_patient",
"has_resupply",
"no_resupply",
"has_pending_authorization",
"no_pending_authorization",
"has_referral_signal",
"no_referral_signal",
"is_wellsky_referral",
"not_wellsky_referral"
],
"type": "string"
},
"description": "Optional list of selected values.",
"x-workflow-field-type": "multi_select"
},
"tasking_outcome": {
"type": "string",
"description": "Optional text value.",
"x-workflow-field-type": "text"
},
"ocr_contains_all": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional list of selected values.",
"x-workflow-field-type": "multi_select"
},
"ocr_contains_any": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional list of selected values.",
"x-workflow-field-type": "multi_select"
},
"task_category_id": {
"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"
},
"assignee_ids_manual": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"custom_context_flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional list of selected values.",
"x-workflow-field-type": "multi_select"
},
"description_template": {
"type": "string",
"description": "Optional text value.",
"x-workflow-field-type": "textarea"
},
"pick_random_assignee": {
"type": "boolean",
"default": false,
"description": "Optional true-or-false value.",
"x-workflow-field-type": "boolean"
},
"provider_contains_any": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional list of selected values.",
"x-workflow-field-type": "multi_select"
},
"attach_legacy_document": {
"type": "boolean",
"default": true,
"description": "Optional true-or-false value.",
"x-workflow-field-type": "boolean"
},
"assignee_resolution_mode": {
"enum": [
"static",
"latest_open_task",
"latest_authorization_task"
],
"type": "string",
"default": "static",
"description": "Optional selected identifier or value.",
"x-workflow-field-type": "select"
},
"provider_resolution_mode": {
"enum": [
"configured_terms",
"strategy_provider_resolver"
],
"type": "string",
"default": "configured_terms",
"description": "Optional selected identifier or value.",
"x-workflow-field-type": "select"
}
},
"additionalProperties": false
},
"description": "Optional list of structured items.",
"x-workflow-field-type": "repeatable_group"
},
"has_order_data": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"is_carecentrix": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"is_new_patient": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"has_patient_data": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"referring_provider_name": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"has_pending_authorization": {
"description": "Optional literal value or workflow expression.",
"x-workflow-field-type": "expression"
},
"enable_strategy_title_triage": {
"type": "boolean",
"default": false,
"description": "Optional true-or-false value.",
"x-workflow-field-type": "boolean"
}
},
"additionalProperties": false
}Output schema
{
"type": "object",
"properties": {
"error": {},
"message": {},
"skipped": {},
"success": {},
"task_id": {},
"error_code": {},
"error_type": {},
"idempotent": {},
"document_id": {},
"display_name": {},
"has_resupply": {},
"matched_rule": {},
"document_type": {},
"is_new_patient": {},
"tasking_outcome": {},
"matched_rule_source": {},
"custom_context_flags": {},
"supports_order_tasking": {},
"has_pending_authorization": {}
},
"additionalProperties": true
}