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
- From the Rules page in the dashboard, an admin user types a rule description in natural language
- The system validates the request (admin-only, prompt required) and sends it to the AI generation endpoint
- A validated JSON rule is returned with a descriptive name, an action (auto-verify, flag, or reject), and a structured condition tree
- The generated rule is ready to save and deploy — no manual JSON editing required
- Rules are validated against a strict condition DSL before acceptance — made-up operators or invalid field paths are rejected
What's Included
- Natural language input: Type rules the way you'd explain them to a colleague
- Three rule actions: Auto-verify (pass through), flag (hold for review), reject (block entirely)
- Full condition DSL: Supports numeric comparisons (=, >, <, between), string checks (in), and logical operators (and, or, not)
- Field-aware generation: The system understands HL7 field paths — OBX.GLU.value, OBX.GLU.flag, MSH.sending_app
- Strict output validation: Every generated rule is verified against the DSL schema before it reaches the user
- Admin-gated: Only tenant admins can generate rules — the endpoint requires admin authentication
Examples
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.