ClinIQ — eICR → FHIR R4 with Gemma 4
Paste an electronic Initial Case Report narrative and watch a three-tier pipeline emit a FHIR R4 Bundle of reportable conditions, labs, and medications. Most cases never invoke the LLM.
Tier 1 — Deterministic (5 ms): regex over inline (SNOMED 12345) and
CDA-XML <code code="…"> attributes.
Tier 2 — RAG fast-path (80 ms): curated CDC NNDSS / WHO IDSR database
with NegEx filter. No LLM.
Tier 3 — Gemma 4 agent: invoked only when (1) and (2) miss. Native
function calling — the agent calls (1) and (2) as tools and validates its
own output. Bounded at 6 turns.
Bundle is structurally validated against fhir.resources.R4B — judges get
a binary ✓ R4-valid signal next to every extraction.
Pick one to populate the input box. Mix of all three pipeline tiers.
Invokes Gemma 4 in-process on the Space's ZeroGPU H200 when deterministic + RAG miss. Each invocation consumes a few seconds of ZeroGPU quota.
Backend: Agent backend unavailable: CLINIQ_DISABLE_AGENT=1
Per-code provenance
system | code | display | tier | conf | source_text | alias / url |
|---|---|---|---|---|---|---|
Bench: F1 = 1.000 over 35 cases (combined-27 + adv4, Python pipeline) · 35/35 perfect, 0 FP · 35/35 R4-valid · Same code as the iOS app's offline pipeline.