An Introduction
to nuMetrix

Diagnostic analytics for hospital material flow

February 2026

Hospital Material Flow Leaks

Received
Moved
Consumed
Billed
  • This chain leaks. Industry estimates: 2–5% of material spend lost to process gaps.
  • Data exists — but trapped in vendor-specific ERP silos that don’t talk to each other.
  • Nobody reconciles until the annual audit. By then, the trail is cold.

What nuMetrix Is (and What It Isn’t)

What it is
A structured investigation pipeline. Ingests ERP exports, validates every row, runs automated diagnostics, and produces auditable findings with root-cause analysis.

Every number is traceable. Every finding has a source row.
What it isn’t
Not a dashboard. Not BI. Not an ERP plugin. Not “AI-powered” in the marketing sense.

It’s an engineering system with AI as an accelerator — not a black box.

The Two Pillars

Stable Scaffolding
dbt + DuckDB pipeline. Versioned contracts. YAML-compiled probes. Multi-tenant isolation.

The foundation that makes results reproducible and auditable.
AI as Subject Matter Expert
AI doesn’t run nuMetrix — it informed it. ERP data formats, medical knowledge, regulatory context, operational logic.

Domain expertise injected at build time, not runtime.
The framework embraces modern technology but does not rely on AI without stable scaffolding.

The Data Foundation

Ingest everything. Judge nothing. Then validate everything.

Bronze / Silver / Gold

CSV files
Bronze
intake
Silver
validation
Gold
contract
  • Bronze — Every row from every CSV, exactly as it arrives. No transformation.
  • Silver — Every row validated and flagged. Invalid rows are never silently dropped.
  • Gold — Valid rows only. Versioned schema. The API surface for all downstream analytics.

Source-System Agnostic

OPALE
Swiss hospital ERP
case_token
SAP MM
German standard
AUFNR
Navision
Microsoft Dynamics
No_
SAP calls a patient case AUFNR. Navision calls it No_. OPALE calls it case_token.
All become case_id. Translate once, at the boundary. From Silver onward, no model knows which ERP the data came from.

Seven Core Entities

Case
Patient episode
Procedure
Clinical intervention
Material
Article master data
Cost Center
Organizational unit
Usage
Material consumed
Movement
Warehouse transfer
Billing Event
Revenue record

The canonical schema. Source-system-agnostic. Pseudonymised. Every probe operates on these entities.

Multi-Tenant Isolation

hospital_alpha
hospital_beta
hospital_zeta
Platform Layer
UNION ALL across tenants
  • Each hospital is an isolated DuckDB schema. Resettable independently.
  • The platform layer unions across all tenants for cross-hospital analytics.
  • Same probes, same questions — different data, different answers.

No Silent Filtering

Traditional approach
Drop invalid rows during ETL. “98% data quality” in the report.

Nobody asks about the 2%.
nuMetrix approach
Flag every row: is_valid + invalid_reason.
Invalid rows stay visible.

Data quality becomes a finding, not a footnote.
In one hospital: 17,250 zero-price materials cascade into 211K invalid billing + usage rows. CHF 1.24M invisible to any system that silently filters.

Gold = The Product Contract

gold_contract.v1.json
Probes
Explorer
Reports
  • Gold has a versioned JSON schema contract. Every downstream consumer codes against it.
  • Probes, Explorer, dashboards — all reference Gold, never internal layers.
  • Layer responsibilities must not leak. Bronze = structure. Silver = domain truth. Gold = consumption.

The Analytics Pyramid

From symptoms to root causes

Five Layers

Action Lists
“What do we do about it?”
Diagnoses
“Why is it happening?”
Hypotheses
“Is this business concern real?”
Assessments
“How healthy is this entity?”
Probes
“What is anomalous?”

Each layer adds meaning. Each layer is traceable back to the data.

Probes

Automated diagnostic tests. Like lab tests for a hospital’s data.

10
probe types
24
active probes
3
categories
financial · data quality · compliance
Every probe outputs: finding_id, severity, entity_type, entity_id, money_at_risk, evidence.
Every probe is YAML-defined, version-controlled, and auditable.

Assessments

Aggregate findings from multiple probes into a single health score per entity.

Material Overall
All material probes
Material Health
I/O, trend, pricing, shelf-life, margin
Material Compliance
Regulatory & traceability
Billing Quality
Duplicates, orphans, integrity
Case Financial Integrity
Revenue leakage, CC mismatch

A material flagged by 3 probes with CHF 100K at risk ≠ one flagged by 1 probe with CHF 10K. Assessments capture that.

Hypotheses

Natural-language business questions, evaluated against probe evidence.

  • REVO Materials used but not billed?
  • DUPL Same event billed twice?
  • PHAN Billing for non-existent cases?
  • STAL Catalogue out of date?
  • COMA Costs on the wrong desk?
  • COGA Controlled substances traceable?
  • XILE Materials crossing sites untracked?
  • GENO Overpaying for generics?
  • IOIM More going in than coming out?
4
verdicts
confirmed · plausible · not observed · insufficient
Same hypotheses across hospitals. Same question, different data, different verdicts.

Diagnoses

Why is a confirmed hypothesis true? Structured root-cause analysis.

CategoryDescription
process_failureBroken or incomplete business process
system_failureIT system malfunction or integration gap
data_qualityStale, missing, or inconsistent master data
behavioralHuman behavior patterns (workarounds, skipped steps)
structuralOrganizational or contractual misalignment
externalExternal factors (supplier, regulatory)

8 diagnoses defined. Each produces: root cause + confidence + explanation + recommendation in DE / FR / EN.

Action Lists

The layer that closes the loop. Currently planned, not yet implemented.

Detect
Assess
Hypothesize
Diagnose
Act
Verify
Action types: Investigate, Correct, Monitor, Accept, Suppress.
Resolution tracking: finding disposition over time.

Today nuMetrix diagnoses. Humans decide and act. Tomorrow, the loop closes.

Walking Through an Example

Revenue Leakage — one finding, five layers

  1. 1 Probeprobe_revenue_leakage finds 54,830 usage events without matching billing.
  2. 2 Assessmentassessment_case_financial_integrity scores 6,661 cases as medium risk.
  3. 3 HypothesisREVO “Materials used but not billed?” → Confirmed (score 0.67).
  4. 4 Diagnosisdiag_billing_workflow_gap → process_failure, billing interface gaps.
  5. 5 Action — “Review billing interface logs for affected cost centers.”

From symptom to recommendation. Every step traceable.

Tri-lingual by Default

Deutsch
Hypothesen, Befunde,
Diagnosen, Empfehlungen
Français
Hypothèses, résultats,
diagnostics, recommandations
English
Hypotheses, findings,
diagnoses, recommendations
  • Every finding interpretation, hypothesis statement, diagnosis explanation, and recommendation in DE / FR / EN.
  • Explorer supports locale switching. PDF reports generated per language.
  • Not a translation layer. Tri-lingual from day one.

The Mindset

The engineering discipline that makes results trustworthy

Seven Principles

  • No silent filtering — invalid rows are flagged, not dropped
  • Quality is queryable — data quality is a finding, not a footnote
  • Every number is traceable — finding → probe → entity → source row
  • Findings, not opinions — severity and money_at_risk, not “good” or “bad”
  • Layer responsibilities must not leak — Bronze / Silver / Gold each have one job
  • Gold is the product contract — everything downstream codes against Gold
  • Privacy by design — all IDs are pseudonymised tokens

Auditable Probes

probes/*.yaml
probecompile.py
dbt SQL
Findings
  • YAML-defined, version-controlled, compiled to SQL.
  • Every probe has: probe_id, version, clear question, defined thresholds.
  • 10 probe types: balance, duplicate, mandatory_item, ratio, trend, temporal_sequence, distribution_outlier, silver_audit, entity_filter, hand_written.
An auditor can read the probe definition, understand what it checks, verify the SQL, and trace every finding back to source data.

Calibrated, Not Just Tested

Synthetic Tenants
4 tenants with calibrated defect rates.
Known seeds, known injection rates.
Deterministic — same seed = same data.

Precision / recall measurement against known defects.
Real Data
1 tenant — Swiss regional hospital.
68K episodes, 2.3M billing events, CHF 33M.

Validating probes against production data.
Synthetic tenants prove the probes can find defects. Real data proves they do.

The Explorer

Not a dashboard. An investigation tool.

  • Data-driven dimensions — auto-discovers entities from schema, no hardcoding
  • Probe findings catalogue — browse all findings with tri-lingual interpretation
  • Entity detail pages — drill into any case, material, or cost center with related facts
  • Taxonomy browser — cost center hierarchies, ATC drug codes, MIGEL codes
  • Drill anywhere — hypothesis → evidence chain → probes → findings → entities
SvelteKit app. DE / FR / EN locale switching. Reads DuckDB read-only — no lock contention.

Architecture

Modern technology. Stable scaffolding.

The Stack

dbt + DuckDB
Pipeline & warehouse
In-process, no server
SvelteKit
Explorer app
Investigation interface
Dagster
Orchestration
Automated rebuild
Evidence.dev
Static BI dashboard
Cross-hospital view
Python
Compilers, validators
Data generation
YAML + JSON
All domain logic
Declarative
No cloud dependency. Runs on a laptop. Ships as a static site or desktop app (Tauri).

AI as Subject Matter Expert

What AI brought to nuMetrix:

  • ERP data formats — OPALE CSV schemas, SAP MM tables, Navision conventions
  • Operational knowledge — movement types, DRG billing rules, I/O coefficients
  • Medical & regulatory — implant traceability, controlled substance law, MiGEL codes, KVG obligations
No hospital consulting engagement. No six-month discovery phase.
AI brought the domain knowledge. The framework made it actionable.
AI is the multiplier. The framework is the foundation.
Without the scaffolding, AI is hallucination. Without AI, the scaffolding takes years to fill.

The Road Ahead

What’s built. What’s next. Where this goes.

What’s Built

5
tenants
4 synthetic + 1 real
3
source systems
24 + 5
probes + assessments
9
hypotheses
8
diagnoses
172
automated tests
3
PDF report types
DE / FR / EN
SvelteKit app
DE / FR / EN

Proven on real hospital data: 68K episodes, 2.3M billing events, CHF 33M material flow.

What’s Next

  1. 1 Action lists — Close the loop from detection to resolution. Finding disposition tracking.
  2. 2 Temporal modeling — SCD Type 2 snapshots for historical accuracy. Track changes over time.
  3. 3 Configurable probes — Apply to specific material groups, price ranges, cost centers.
  4. 4 Forward compiler — Natural language → probe YAML. Describe a check in words, get a probe.
  5. 5 Cloud deployment — Cloudflare Pages + DuckDB-WASM. Zero-server analytics.
  6. 6 Automated intake — SFTP / upload endpoint. From manual CSV drops to scheduled pipeline.

A System
That Earns Trust

nuMetrix doesn’t replace human judgement.
It provides the evidence base for it.

Every finding is traceable. Every probe is auditable.
Every root cause has a recommendation.

nuMetrix — February 2026

nuMetrix