Delta Checks
Vorian Connect runs delta checks on every numeric result before release. It compares the current value against the patient's most recent previous result for the same analyte and flags any change that exceeds the configured absolute or percentage threshold. STAT orders automatically override delta flags to prevent clinically necessary results from being held.
How It Works
- When a message arrives with numeric OBX results, the auto-verification pipeline triggers delta checking for each analyte that has an active delta configuration
- Vorian looks up the most recent previous result for the same patient and analyte within a configurable time window (default 168 hours for most analytes, up to 720 hours for slow-changing markers like TSH)
- Both absolute delta and percentage delta are calculated. If either exceeds the configured threshold, the result is flagged for review
- STAT orders receive a special override: even when thresholds are exceeded, the result passes with a
STATOverrideflag so critical care results are never blocked by delta rules - Every delta comparison is logged to
delta_check_logwith current value, previous value, absolute delta, percentage delta, and pass/fail outcome — full audit trail for every result - Flagged results appear on the Delta Checks dashboard page alongside pending review items from other verification stages
What's Included
- Per-analyte configuration: Set absolute delta value, percentage delta threshold, and time window independently for each analyte. Common analytes (sodium, potassium, creatinine, hemoglobin, TSH, WBC) ship with clinically validated defaults
- Absolute delta thresholds: Flag results when the raw difference between current and previous values exceeds a numeric limit — for example, a potassium shift greater than 2.0 mmol/L within 24 hours
- Percentage delta thresholds: Flag results when the relative change exceeds a percentage — for example, a creatinine increase greater than 50% within 7 days. Percentage thresholds are ideal for analytes with wide reference ranges
- Configurable time windows: Set how far back to look for previous results — 24 hours for acute markers, 72 hours for hematology, 168 hours for chemistry, 720 hours for endocrine markers
- STAT override: STAT-priority orders automatically pass delta checks regardless of thresholds. The override is logged so reviewers can see that a delta was flagged but clinically overridden
- Dashboard management: Create, edit, enable, and disable delta configurations through the dashboard UI at
/delta-checks. Pending flagged results appear alongside configuration controls - Audit logging: Full
delta_check_logtable with tenant isolation, message ID, patient ID, analyte code, current/previous values, calculated deltas, and pass/fail disposition
Where It Fits
Delta checks run inside the auto-verification pipeline on the gateway after parsing, range validation, and before delivery. They are part of the four-stage verification sequence: emergency brake → range validation → delta checking → boolean rules. A result that passes delta checks proceeds to configurable boolean rules; a result that fails is flagged for manual review on the dashboard.
Delta checks are tenant-scoped. Each lab configures its own analyte thresholds and time windows. Default configurations for sodium, potassium, creatinine, hemoglobin, TSH, and WBC are seeded with clinically reasonable values, but labs can override any parameter. New analytes can be added at any time through the dashboard without restarting the gateway.
Technical Details (for evaluators)
Delta checks execute inside the message writer transaction on the gateway — the current result, previous lookup, delta calculation, and log insert all happen atomically. If the database query for the previous result fails, the entire message write rolls back. Configurations are loaded from delta_check_config with per-tenant filtering via RLS-enforced PostgreSQL queries.
The previous result lookup uses an indexed query on analyte_results(tenant_id, patient_id, upper(analyte_code), received_at) with a time-window filter. The query excludes the current message ID (message_id <> $4) to prevent self-comparison. If no previous result exists within the time window, the delta check is skipped and the result proceeds — first-time results for a patient are never blocked.
Default configurations are embedded in the gateway binary and applied when no tenant-specific configuration exists. Labs can view and override defaults through the dashboard API at /api/delta-check-config. Pending flagged results are polled every 30 seconds by the dashboard at /api/delta-check-log?status=pending.