AI Rule Generator

Write lab rules in plain English and Vorian Connect converts them into executable auto-verification conditions. A medical technologist types "Glucose auto-verify when between 70 and 110 unless flag is H or L" — the system generates the correct JSON rule with field paths, operators, and logical nesting.

How It Works

What's Included

Examples

Input
Glucose auto-verify when between 70 and 110, unless flag is H or L
Generated rule
{ "name": "Glucose auto-verify 70-110", "action": "auto_verify", "condition": { "and": [ { "field": "OBX.GLU.value", "op": "between", "value": [70, 110] }, { "field": "OBX.GLU.flag", "op": "in", "value": ["", "N"] } ] } }
Input
Sodium flag if less than 135 or greater than 145
Generated rule
{ "name": "Sodium critical range", "action": "flag", "condition": { "or": [ { "field": "OBX.NA.value", "op": "<", "value": 135 }, { "field": "OBX.NA.value", "op": ">", "value": 145 } ] } }
Input
Potassium reject if above 6.0
Generated rule
{ "name": "Potassium critical high reject", "action": "reject", "condition": { "field": "OBX.K.value", "op": ">", "value": 6.0 } }

Where It Fits

The rule generator is part of the Rules page in the Vorian dashboard. Generated rules feed directly into the auto-verification engine — the same pipeline that evaluates every incoming HL7 and ASTM message. The generator reduces a rule authoring workflow that previously required manual JSON editing to a natural language conversation. Interface engineers who understand lab logic but don't write code can now author rules directly.

Technical Details (for evaluators)

The generator accepts free-text English descriptions and returns structured JSON conforming to Vorian's rule condition DSL. Supported field paths include any OBX analyte code (OBX.GLU.value, OBX.K.flag, etc.) and message header fields (MSH.sending_app). Operators cover the full auto-verification expression tree: equality, inequality, greater/less-than, between (inclusive range), and in (string set membership). Logical operators support arbitrary nesting — complex multi-analyte rules with combined AND/OR/NOT logic are handled correctly.

The generated JSON passes through a strict validator before being returned to the dashboard. The validator checks that every field is a recognized path, every operator is in the supported set, and the overall structure matches the condition DSL schema. Invalid output is rejected before the user ever sees it.

Last updated: May 14, 2026