Query the MIMIC-IV demo store
This page runs trajectory queries in the execution store on the server, against a store built on this machine from the open MIMIC-IV demo (100 patients). It shows aggregate counts only: no patient identifiers, times, values or per-patient rows leave the server. Counts alone are not disclosure control: there is no small-cell suppression, and a run of queries that differ slightly can isolate one patient's value. That is acceptable only because the demo is open data; the server refuses any store that does not hold the open demo's patients. Steps are source item classes (rows of the MIMIC d_items dictionary, labelled with its public terms) and their dictionary categories. They are not clinical concepts and have not been reviewed by a clinician. Nothing here is a clinical claim.
← all mockups · Define a trajectory (synthetic cohort, matched in this browser and the engine) · roadmap · design: decision D29 in docs/decisions/engine-increment-log.md
The store
Asking the server for its store…
Examples
Each loads a complete query into the builder below and runs it. Edit anything afterwards.
1 · Index period
Every patient gets their own period, placed by one rule from the store's coverage table, which records each ICU stay as a period (from its icustays in-time to its out-time, widened where the stay's own records fall just outside it). The rule runs on the server; no period is sent to this page.
A patient with no ICU stay gets no period and is counted as no index period. The scope also decides which excluded records can make a result not comparable: only those it admits (D18), so anywhere in the record gives more of them.
2 · Steps
Each step is one item class (a d_items row, such as Heart Rate · 220045) or a whole dictionary category. Chart items are point measurements with a recorded value and unit; input items are infusion segments with a start and an end, and carry no value here. A value condition is matched exactly, in the unit the store holds, letter for letter: no unit conversion (D28).
3 · Timing constraints
Starts between bounds the time from the earlier step's start to the later step's start; leave the latest gap empty for no limit, and use a negative earliest gap to allow the later step to start before. Happens while needs an infusion item as its first step: the later step must start after the infusion starts and no later than the grace after it stops.
4 · Run
Relaxations are tried cheapest first, at most one per step or constraint, up to the budget; the first set that gives a match is reported, with its cost.
Results
Run a query or load an example.
Why most results are not comparable
The store admits only rows it can represent: chart events with a numeric value and a unit, and continuous infusion segments. In the demo that is 150,051 of 668,862 chart rows and 10,980 of 20,404 input rows. Every other row is kept as an excluded record, with its item class and time but no value. When an excluded row of a step's item falls where the step could bind, it might have matched, so the store does not claim none: it says not comparable, and a relaxed match becomes unresolved, with the relaxed match noted beside it (decision D18). A value condition does not help, because an excluded row has no value and might have met any threshold (D28). This is what a source that admits about a quarter of its rows can rule out. It is not a defect to tune away.
What this page does not do
- It does not replace Define a trajectory. That page still resolves candidates in the browser on the synthetic cohort. This page sits beside it (stage 1 of three); the roadmap lists what the store must learn before it can sit under that page (stage 2): Nth occurrences, "at least N times within", rises and falls relative to earlier values, and more.
- Occurrences are any, first or last; first and last pick among the events that meet the step's value condition.
- Absence ("no X between A and B") and alternatives ("A or B") cannot be expressed.
- The store has one snapshot of a 100-patient open demo. It does not cover full MIMIC-IV. The server checks the store's content, the demo's own 100 patients, not just its label, and refuses anything else. Credentialed data would need real disclosure control (suppression, noise, query auditing), which is not built.