Skip to content

Labflow Management

Inspect and administer labflows from the command line. Most day-to-day labflow operations — assignment, stage transitions — happen through the web UI because they are tied to the clinical workflow. The CLI is useful for listing definitions, inspecting a project's active labflow, and reading an order's current stage programmatically.

Prerequisites

  • CLI installed and authenticated (see Installation).
  • A selected project: iflow config select-project.

Listing labflow definitions

List labflows visible to the current project (includes system, org, and project-scoped definitions):

iflow labflows list

Filter by scope:

iflow labflows list --scope system
iflow labflows list --scope org
iflow labflows list --scope project

Getting a labflow definition

iflow labflows get LABFLOW_ID

Output includes the stage list with capability flags (browser_viewable, browser_editable, report_viewable, report_editable) and the allowed transitions.

Inspecting an order's current stage

iflow orders get ORDER_ID

The labflow section of the output shows:

  • Current stage code and name.
  • Current state (unassigned, pending, in_progress, on_hold, completed, skipped).
  • Assigned user (if any).
  • Last transition.

Labflow administration is an admin task

Creating and editing labflow definitions requires project_admin or higher. Day-to-day stage transitions use iflow orders transition.

Transitioning an order's stage

Order-level status transitions use iflow orders transition (see Order Management). Labflow-level stage-state transitions (for example pendingin_progress on the same stage) currently go through the web UI.

Read-only API access

For read-only programmatic access:

# All labflow definitions visible to the project
curl "https://miner.<env-domain>/api/v1/labflows" \
  -H "Authorization: Bearer $IFLOW_PAT" \
  -H "X-Project-ID: $PROJECT_ID"

# Current labflow state for an order
curl "https://miner.<env-domain>/api/v1/orders/ORDER_ID/labflow" \
  -H "Authorization: Bearer $IFLOW_PAT" \
  -H "X-Project-ID: $PROJECT_ID"