Passing values between steps
Use what an earlier step produced with a double-brace reference, and see which values each Rhazes workflow step offers to later steps.
Updated
The reference
Steps are joined by more than arrows. A step can use a value an earlier step produced by referring to it:
{{ step_id.field }}
The first part names the step, the second names the value from it. Spaces inside the braces are ignored, so {{step.field}} and {{ step.field }} are the same.
Anywhere you type text in a step, you can drop a reference into it. A question can quote the patient name an earlier step found. A prompt can include the score a Calculate step produced. A document can carry values gathered across the whole run.
It is a lookup, not a calculation
This is deliberately not a small programming language. There are no operators, no function calls and no digging into nested values. A reference does one thing: fetch a value an earlier step already produced.
That restraint is on purpose. Workflows are written by clinicians and shared between accounts through the community, so a reference that could compute something would be a reference that could do something unexpected in somebody else's account. Arithmetic belongs in a Calculate step, where it is visible and checkable. See Calculations you can rely on.
A bad reference is caught when you save
If you refer to a step that does not exist, or to a value that step never produces, Rhazes tells you when you save rather than when the workflow runs on a patient.
That matters for scheduled workflows especially. A typo that only surfaced at 6am on a Monday, unattended, would be found by nobody.
What each step gives you
- Input:
message,conversation,today, andsources. - Ask Rhazes:
textfor the written answer, andstructuredwhen the step was set up to return structured values. - Calculate: the result itself, plus
workingfor the sum it did,breakdownfor the values it read, andcategoryfor the band it fell in. - Sources:
count, the number of things found. The retrieved text itself is fed into the reasoning steps directly rather than being available as a reference.
When a value is missing at run time
A reference that resolves to nothing renders as empty rather than stopping the run, and the run records that it was missing. Each step decides whether that matters to it.
Worth knowing when a document comes out with a gap in it: the reference was fine, the value simply was not there on that patient.