Orders & Host Query
Vorian Connect tracks active orders across every connected instrument, processes real-time host queries when analyzers ask the LIS for pending work, and manages governed order actions — cancel, reload, and rerun — with source-scoped execution tracking, full audit trails, and operator-reviewable replay evidence.
How It Works
When an instrument needs to know what tests are pending for a specimen, it sends an HL7 host query (QBP^Q11 or QBP^R02) through its source channel. The Vorian Edge Agent intercepts the query and routes it to the Query Handler, which resolves the specimen ID through a three-tier cache:
- Local order cache: The fastest path. The Edge Agent maintains an in-memory cache of recently received orders, keyed by specimen ID. Cache hits return results in under a millisecond — critical for instruments that expect near-instant query responses during automation cycles.
- Cloud lookup: If the specimen is not in the local cache, the Query Handler forwards the request to the cloud gateway, which searches the active-order store. A configurable timeout of 200 ms ensures the instrument isn't left waiting. Slow lookups (over 100 ms) are logged for latency monitoring.
- Cache fallback: If the cloud lookup fails or the specimen isn't found, the handler falls back to the local cache as a safety net. If the specimen is still not found, a NACK with code “specimen not found” is returned to the instrument.
Every query is recorded as a runtime event with the specimen ID, query tag, control ID, outcome, response source, order count, and response time. These events feed the Orders & Host Query dashboard for live monitoring and historical review.
What’s Included
- Active order tracking: Every order received through the gateway is cached with specimen ID, battery code, priority, order status, and expiration. The dashboard shows per-source active-order counts — including STAT, critical, and expired breakdowns — so operators can see workload at a glance.
- Host query monitoring: Real-time visibility into every host query received, processed, and answered. Operators see which instruments are querying, how quickly queries are being answered, cache hit rates, and any query failures with operational error codes (
parse_failed,unsupported_message_type,specimen_missing,specimen_not_found). - Host query replay packages: The Edge Agent captures query/reply pairs as replay evidence. These packages are reviewed through the dashboard with counts for total, pending review, and approved. Replay packages help validate that the site’s query configuration matches expected instrument behavior before go-live.
- Source channel diagnostics: Per-source channel inventory with counts for query/reply channels, result upload channels, order download channels, and file ingest channels. Direction and protocol mismatches (e.g., an HL7 channel configured for ASTM traffic) are flagged as operational issues so they can be corrected before they cause query failures.
- Order action requests: Governed order actions — cancel order, reload order, and request rerun — submitted by operators with required review reasons. Each request is audited, tracked through execution attempts, and visible in the dashboard with its current status and dispatch history.
- Execution tracking: Every order action request spawns execution attempts that are dispatched to internal workers. The dashboard shows attempt history per request, including dispatch jobs and their outcomes, so operators can verify that a cancel or reload actually reached the instrument.
- Source scoping: Orders, queries, and actions honor assigned source scopes. Operators see only the instruments they are authorized to manage. Decommissioned sources are excluded from active query and order views.
Where It Fits
Orders & Host Query sits between order intake and instrument execution:
- Orders arrive at the gateway through HL7 feed (ORM^O01) or are downloaded from the LIS through order-download channels.
- The routing engine (see Routing Intelligence) decides which instrument should perform the work.
- Active orders are cached and become available for host queries. The Orders & Host Query dashboard shows what’s cached, what’s expired, and what’s currently being queried.
- When an instrument sends a host query (QBP), the Query Handler responds with the matching orders from cache. Operators can review every query/response pair through replay packages.
- If an operator needs to intervene — cancel a stale order, reload updated order data, or request a rerun — they submit an order action request through the dashboard. The action is audited, dispatched, and tracked through execution.
This is a review and evidence surface, not a control surface. The dashboard does not send host queries, download orders, change order records, or approve go-live. It shows operators what happened and gives them governed actions when intervention is needed.
Technical Details (for evaluators)
- Protocol support: HL7 v2.x QBP^Q11 and QBP^R02 query messages. Specimen ID extraction from SPM-2, QPD-3, and OBR-3 fields with configurable field precedence. Responses are standard HL7 QBP ACK messages with embedded order entries.
- Query timeout: Cloud lookups time out at 200 ms. Slow lookups (over 100 ms) are logged with specimen ID for latency troubleshooting. The local cache path avoids timeout concerns for repeat queries.
- Order caching: Active orders are stored with configurable TTL (default 24 hours). Cache entries carry specimen ID, battery code, priority, status, source message reference, and expiration time. Expired orders are surfaced in the dashboard for operator review.
- Order actions: Three supported actions — cancel order, reload order, request rerun. Each requires an operator review reason (max 500 characters), is audited before any dispatch work begins, and fails closed if audit logging is unavailable. Actions are linked to source-scoped active-order rows and rejected for decommissioned sources.
- Replay evidence: Query/reply pairs are captured by the Edge Agent as PHI-safe replay packages. Packages are source-scoped and require explicit review approval before they become validation evidence. Raw query payloads are never exposed in replay summaries.
- Channel diagnostics: Source channels are classified by direction (result upload, order download, query/reply, file ingest) and protocol (HL7 MLLP, ASTM). Direction and protocol mismatches are detected automatically and flagged as operational issues.
- Idempotency: Order cache upserts are idempotent on specimen ID. Replay package captures are deduplicated. Query responses are stateless — the same query answered twice produces the same orders (or a cache-miss NACK if the order expired).
- Audit trail: Every order action request is audited before dispatch. Query runtime events carry specimen ID, source, channel, outcome, and performance metrics. Replay package review and approval are audited.