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
β’ Clinic Room Equipment (
β’ Experimental Sandbox Sensitivity Filter (
β’ 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 (
1.
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:
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
DocumentReferenceandDiagnosticReportto collapse syndication copies while keeping everymemberUuid. - Result: Removes ~81% of raw JSON wrapper overhead before any clinical record is touched (e.g., Maurice
~1.35Mraw JSON tokens β251,641full 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
Groupedmode they are compactly folded; at an ultra-tight1kmicro-budget, any active items that exceed the1,024-token ceiling are explicitly indexed in[2] Completeness ManifestforTier 0recovery. - Progressive Folding (
Groupedmode): Escalates fromTier 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, andread_clinical_notequery the full uncondensedTier 0chart in memory when a question asks about trimmed history.