Unmapped Results

When Vorian Connect receives analyzer results with instrument-specific test codes that have no LOINC mapping, those results are flagged in the unmapped results queue. Interface engineers review these unmapped codes — grouped by source instrument and code — and assign LOINC mappings, accept ML-generated suggestions, or mark codes as intentionally ignored. Each mapping action triggers automatic reprocessing so previously unmapped results flow through auto-verification with the new mapping applied.

How It Works

What's Included

Where It Fits

Unmapped results are the bridge between raw instrument traffic and the auto-verification engine. Before Vorian can apply clinical rules, delta checks, and QC monitoring to a result, it needs to know what the result represents — and that requires a LOINC mapping. The unmapped queue is where interface engineers close that gap during implementation, mapping instrument-specific codes to standard LOINC codes as they appear in live traffic.

This is especially valuable during the shadow-mode validation period before go-live. As instrument traffic flows through Vorian in parallel with the existing middleware, every unmapped code is surfaced immediately — the interface team doesn't discover missing mappings at cutover. The queue also serves as ongoing operations monitoring: if a new test is added to an analyzer without updating the mapping table, it appears in the unmapped queue the same day.

Technical Details (for evaluators)

The unmapped results API is built around a group-by pattern: the GET /api/unmapped-results endpoint queries pending results, groups them by (source_id, instrument_code) using a client-side map, and returns aggregated groups with total occurrence counts, latest seen timestamps, and ML suggestions (when available). Source-scope filtering is applied through the sourceScopeSql helper using the operator's authorized source IDs.

The map endpoint (POST /api/unmapped-results/:id/map) requires config:mappings permission, validates the unmapped result UUID and request body, looks up the result row with source-scope filtering, and then within the same tenant-scoped transaction: upserts the mapping into test_code_mappings (using ON CONFLICT (source_id, instrument_code) DO UPDATE), marks all pending results for that source+code combination as mapped, creates a reprocess job targeting the original message with a one-second time window, and notifies the edge agent of the config change. The reprocess job is enqueued through Redis RPUSH to the reprocess queue key, and a unmapped_result_map audit event is written.

The ignore endpoint (POST /api/unmapped-results/:id/ignore) follows the same pattern but updates status to ignored without creating a mapping or triggering reprocessing. Both endpoints fail with clean 400s for malformed JSON, invalid UUIDs, or missing required fields. The results:view permission controls whether operators see individual result values in the detail view — mapping-only users see source, analyte code, and unit context without result values or message IDs.

Last updated: May 22, 2026