WAHS Explorer

WA Health Summary β€” Patient Chart Explorer (OpenClinAI Sandbox)

πŸ‘€ β€” 8k β€’ Lossless 🟒 Hub Profile:
Select a patient above to inspect their original FHIR R4 chart.

Original FHIR R4 Resources

0 entries
Type Clinical Item Date Source Clinic

Selected Resource

Condensation Levers

Non-Destructive
Clinical Knowledge Mode (KB vs. Raw Chart)
Decoupled Knowledge Lever (Applies to Any Selected Model):
β€’ 🧠 + 4-Layer Clinical KB: Injects deterministic pre-condensation clinical audit findings (RxNorm brand/generic duplicates, KDIGO/ADA stage mismatches, note "hold/stop" vs. active medication orders, and immunization schedules) alongside the condensed chart (~+400–900 tok).
β€’ πŸ“„ Raw Chart Only: Passes only the condensed FHIR chart ledger with zero KB hints so you can evaluate the model's standalone clinical reasoning at any token budget.
1. Size Limit (Token Budget)
Progressive Context Allocation (256k β†’ 1k):
β€’ 256k / 128k (Max-Window Stress Test & Decadal ICU/HIE History): Expands up to the full 128k–256k ceiling of Gemma 4 12B/26B and Qwen 3 (e.g., Maurice expands to 128.3k tok at 128k and 252.0k tok at 256k) so you can directly test huge-context attention dilution and latency vs. compact budgets.
β€’ 64k / 32k (Full Longitudinal Ledger): Fits 100% of normalized clinical records for multi-year charts (including US Core & MIMIC-IV/Synthea cohorts) with zero or minimal clinical records trimmed.
β€’ 16k / 8k (Recommended Limit Window): Retains 100% of active conditions, meds, allergies, implants, clinical notes, and multi-year lab trajectories inside the 16k–24k model Recommended Limit.
β€’ 4k / 2k / 1k (Compact Visit / Emergency IPS Capsule): Prioritizes the mandatory IPS Safety Core first; when connected to Med Agent Hub, any trimmed items needed for your question are dynamically recovered from Tier 0 via conditional overflow lookup.
2. Condensation Approach
Two Provenance-Preserving Modes:
β€’ Lossless (Verbatim): Renders each extracted clinical resource as its own timestamped [N] line with zero semantic foldingβ€”ideal when you have a 32k–64k window or want exact per-visit records.
β€’ Grouped (Fold Renewals): Uses the 5-Tier Progressive Folding Ladder (Tier 0 Full Ledger β†’ Tier 1 Renewal-Folded β†’ Tier 2 24m Horizon β†’ Tier 3 IPS + Lab Trajectories β†’ Tier 4 IPS Micro-Capsule) to fold stopped medication renewals into single [first..last, N renewals] spans and compress multi-year lab panels into First β†’ Peak/Trough β†’ Latest trajectory lines, preserving all underlying memberUuids.
3. Optional Prep Filters
Stage 0 Structural Hygiene & Privacy Segmentation:
β€’ Auto-Cleaned Wrapper Bloat: Strips FHIR JSON syntax overhead, administrative Claim/ExplanationOfBenefit billing records, and byte-identical SHA-256 Base64 note duplicates before token counting (~97% token reduction with zero clinical facts lost).
β€’ Clinic Room Equipment (Device): Hides facility hardware (Hospital bed, Examination table, Dental x-ray) while always keeping patient implants (ICD, Mechanical valve, Coronary stent).
β€’ Experimental Sandbox Sensitivity Filter (42 CFR Part 2 / WA MHMDA): An OpenClinAI sandbox experiment (separate from WAHS's native IPS + SMART Health Link sharing) that withholds sensitive substance-use, behavioral health, and domestic safety findings and logs the redaction count in [Privacy Manifest].
Auto-cleaned: 0 billing claims & 0 duplicate Base64 note wrappers excluded.
4. Kept vs. Trimmed & Overflow Recovery
How Out-of-Budget Records Stay Available:
Even when a tight budget (1k–8k) trims older routine labs or visits from the prompt:
1. [2] Completeness Manifest: Line [2] of the ledger tells the LLM the exact count of omitted items per section (budget_overflow_omitted: lab_observation=N) so it never confuses a trimmed test with "never performed."
2. Pre-Condensation 4-Layer KB Audit: RxNorm duplicate checks, KDIGO/ADA stage conflicts, and note "hold/stop" vs. active medication checks run on 100% of the uncondensed chart before trimming.
3. On-Demand Overflow Lookup Tools: search_chart_entries, get_lab_history, and read_clinical_note query the full uncondensed Tier 0 chart in memory whenever a question asks about deep history.

Condensed Chart

β€”
πŸ” How Full-Chart Condensation & Out-of-Budget Recovery Works (3-Stage Pipeline) IPS Safety Core + Overflow Lookup
Raw FHIR R4 exports (such as Maurice Auer's 18.4 MB / 7,099-entry bundle, ~1.35M raw JSON tokens / 251,641 extracted clinical tokens) exceed standard single-shot LLM windows because of JSON syntax verbosity, billing claims, duplicate Base64 clinical notes, and years of repeated lab/medication entries. The WAHS Explorer condenses any chart to fit your chosen budget (256k down to 1k) while keeping 100% of the chart accessible through three coordinated stages:

1️⃣ Stage 1: Non-Destructive Structural Extraction

  • Strips non-clinical bloat: Removes Claim, ExplanationOfBenefit, and transport lookup wrappers.
  • Deduplicates Base64 notes: Hashes decoded UTF-8 clinical notes (SHA-256) across DocumentReference and DiagnosticReport to collapse syndication copies while keeping every memberUuid.
  • Result: Removes ~81% of raw JSON wrapper overhead before any clinical record is touched (e.g., Maurice ~1.35M raw JSON tokens β†’ 251,641 full extracted clinical tokens).

2️⃣ Stage 2: Priority IPS Safety Core + 5-Tier Folding

  • Priority IPS Safety Core: Allergies, Active Conditions, Active Medications, Implants, and Conflict-Flagged Notes are prioritized ahead of historical labs and visits. In Grouped mode they are compactly folded; at an ultra-tight 1k micro-budget, any active items that exceed the 1,024-token ceiling are explicitly indexed in [2] Completeness Manifest for Tier 0 recovery.
  • Progressive Folding (Grouped mode): Escalates from Tier 0 (Full Ledger, 64k–256k) β†’ Tier 1 (Renewal-Folded, 32k) β†’ Tier 2 (24m Horizon, 16k) β†’ Tier 3 (Lab Trajectories, 8k) β†’ Tier 4 (IPS Micro-Capsule, 1k–4k).

3️⃣ Stage 3: Out-of-Budget Recovery Guarantees

  • [2] Completeness Manifest: Line [2] explicitly declares omitted historical counts (budget_overflow_omitted: lab_observation=N) so the LLM never hallucinates a negative finding.
  • Full-Chart Pre-Audit: The 4-Layer Clinical KB audits 100% of the uncondensed chart first and pins any detected conflict into the prompt.
  • On-Demand Overflow Tools: search_chart_entries, get_lab_history, and read_clinical_note query the full uncondensed Tier 0 chart in memory when a question asks about trimmed history.