fix: UO rate, vaso pause gaps, line durations, load paths#2124
fix: UO rate, vaso pause gaps, line durations, load paths#2124Chessing234 wants to merge 46 commits into
Conversation
Match kdigo_uo so BigQuery truncation and Postgres fractional diffs no longer diverge on the 6/12h rate windows (MIT-LCP#1549). Co-authored-by: Cursor <cursoragent@cursor.com>
Passwords with quotes and unusual user/db names broke the CREATE USER / DATABASE statements. Co-authored-by: Cursor <cursoragent@cursor.com>
Stop pandas DtypeWarning on chartevents/datetimeevents/ inputevents_cv/noteevents during chunked import (MIT-LCP#1237). Co-authored-by: Cursor <cursoragent@cursor.com>
sqlglot rejects 'D/C''d' as adjacent string literals, breaking BigQuery→postgres/duckdb transpile of this concept. Co-authored-by: Cursor <cursoragent@cursor.com>
|
sqlfluff lint step itself passed; the job fail is the annotate action (permissions on fork PRs). |
BigQuery rejects timestamp subtraction with interval compares; use DATETIME_DIFF(..., HOUR) like the rest of the concepts. Co-authored-by: Cursor <cursoragent@cursor.com>
|
also folded in the neuroblock DATETIME_DIFF gap check from #2079. |
$$1 expands to the shell PID, so the version arg was never validated. Co-authored-by: Cursor <cursoragent@cursor.com>
WHERE ce.rn = 1 dropped charttimes with devices but no flow. Co-authored-by: Cursor <cursoragent@cursor.com>
|
also: vitalsign CCO/Arctic Sun temps (#1358); Charlson age bands; o2_delivery keep device-only rows. |
Grouping by linkorderid with min/max start/end treated pauses as continuous infusion (MIT-LCP#1808). Keep per-row intervals and merge only overlapping ones. Co-authored-by: Cursor <cursoragent@cursor.com>
Collapse overlapping procedureevents_mv rows so duration tables no longer emit nested intervals (MIT-LCP#371). Co-authored-by: Cursor <cursoragent@cursor.com>
WHERE seq_num = 1 contradicted the header (and Quan); padded CHAR codes also failed unpadded BETWEEN ranges (MIT-LCP#1077). Co-authored-by: Cursor <cursoragent@cursor.com>
Primary-only filtering skipped secondary codes that DRG exclusions need; RTRIM matches padded ICD-9 storage (MIT-LCP#1077). Co-authored-by: Cursor <cursoragent@cursor.com>
Padded codes break exact and prefix matches the same way as AHRQ (MIT-LCP#1077). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Also fixed Elixhauser: exclude primary in no_drg, include all diagnoses for DRG version, and RTRIM ICD-9 codes (#1077). |
That cutpoint is mmol/L; on MIMIC BUN (mg/dL) it scored normal values as 1 (MIT-LCP#1065). Co-authored-by: Cursor <cursoragent@cursor.com>
Pretty-format column cutting mis-parses table names when rebuilding derived. Co-authored-by: Cursor <cursoragent@cursor.com>
PARSE_DATETIME on a NULL-concatenated string failed rows without a time. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Also fixed LODS BUN 7.50 mg/dL band (#1065), make_concepts drop via bq CSV ls, and null-safe echo charttime parse. |
MONTH previously KeyError'd in _SECONDS_PER_UNIT; emit year*12+month. Co-authored-by: Cursor <cursoragent@cursor.com>
Same itemids as IV vitalsign (MIT-LCP#1358): 226329, 227632, 227634. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
added: DATETIME_DIFF MONTH transpile, CCO/Arctic Sun temps in III vitals + aline_vitals. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
SAPS 1984 publishes mmol/L cutpoints; MIMIC labs are mg/dL. Apply PhysioNet Challenge 2012 conversions (glucose x18, BUN x2.8). Co-authored-by: Cursor <cursoragent@cursor.com>
|
added: echo height PARSE null-guard, aline-aws CCO/Arctic temps, SAPS glucose/BUN mg/dL conversion. |
pivoted_oasis reads mimiciii_derived.icustay_hours; make-concepts never created it (or its icustay_times dependency). Co-authored-by: Cursor <cursoragent@cursor.com>
|
also: make-concepts now builds icustay_times/hours (for pivoted_oasis), arterial/central line durations, and neuroblock_dose. |
Summary
elixhauser_ahrq_v37_no_drg.sql#1077); LODS BUN 7.50 removed (lods.sql BUN value #1065)Test plan