Skip to content

Workflows

A Workflow is the unit you configure in MedFlow. Every Workflow has three parts: a Trigger that decides when work starts, a Diagram that lays out the care pathway, and Metrics that measure the outcome.

Each part has its own concept guide and API reference:

PartWhere to look
TriggerTriggers, Quickstart, Triggers API
DiagramDiagram nodes, Diagrams API
MetricsMetrics, Monitoring runs

One note on terminology: in the product UI, pathway or care pathway means the Diagram, not the whole Workflow. You author a pathway as a blueprint in the editor, and a run (runId) is one active copy of that blueprint (sourceId) once work has started. For ready-made clinical workflows, see Workflow templates.

Under every Workflow, the engine runs one loop. Find searches the clinical graph with a query to select the patients or pathways that matter. Automate runs the care pathway for each match, handling the repetitive work so your team can focus on patients, through diagram nodes and automated actions. Validate then measures whether the gap closed, through metrics and run status. Because Find and Validate share the same queries, you measure outcomes against the exact population you acted on.

  1. An author builds a blueprint in the diagram editor (see Diagrams).
  2. A trigger points at that blueprint (sourceId) and attaches a query, a web trigger, or a webhook.
  3. A run starts whenever the trigger fires, whether from a search or schedule, a web trigger, or a webhook event.
  4. The run’s automationStatus moves through its states until the run finishes.
  5. Metrics show the workflow’s outcomes over time.
IDMeaning
triggerIdHow work starts (Triggers)
runIdOne pathway run (Runs)
sourceIdBlueprint the run or trigger came from (Diagrams)
queryIdQuery attached to a trigger (Queries)
nodeIdStep on a pathway (Diagram nodes)
automationIdAutomated action on a node (Automated actions)
tenantId / workspaceIdTenancy (from the API key)
keyIdAPI key id on audit events