Skip to content

fix: UO rate, vaso pause gaps, line durations, load paths#2124

Open
Chessing234 wants to merge 46 commits into
MIT-LCP:mainfrom
Chessing234:fix/uo-rate-sqlite-create-user
Open

fix: UO rate, vaso pause gaps, line durations, load paths#2124
Chessing234 wants to merge 46 commits into
MIT-LCP:mainfrom
Chessing234:fix/uo-rate-sqlite-create-user

Conversation

@Chessing234

@Chessing234 Chessing234 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • pytest tests/ (404 passed)
  • CI: syntax, equivalence, sqlfluff, transpile

Chessing234 and others added 4 commits July 23, 2026 12:22
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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

also folded in the neuroblock DATETIME_DIFF gap check from #2079.

@Chessing234 Chessing234 changed the title fix: urine output rate parity, sqlite dtypes, create_user escaping fix: urine output rate parity, sqlite dtypes, create_user, neuroblock Jul 23, 2026
$$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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

also: vitalsign CCO/Arctic Sun temps (#1358); Charlson age bands; o2_delivery keep device-only rows.

Chessing234 and others added 2 commits July 23, 2026 15:01
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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

Also fixed MetaVision pause gaps in vaso durations (#1808) and overlapping arterial/central line intervals (#371).

@Chessing234 Chessing234 changed the title fix: UO rate, charlson C4A, sqlite/duckdb load paths, SOFA CV fix: UO rate, vaso pause gaps, line durations, load paths Jul 23, 2026
Chessing234 and others added 3 commits July 23, 2026 15:14
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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

Also fixed Elixhauser: exclude primary in no_drg, include all diagnoses for DRG version, and RTRIM ICD-9 codes (#1077).

Chessing234 and others added 3 commits July 23, 2026 15:24
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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

Also fixed LODS BUN 7.50 mg/dL band (#1065), make_concepts drop via bq CSV ls, and null-safe echo charttime parse.

Chessing234 and others added 3 commits July 23, 2026 15:35
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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

added: DATETIME_DIFF MONTH transpile, CCO/Arctic Sun temps in III vitals + aline_vitals.

Chessing234 and others added 3 commits July 23, 2026 15:46
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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

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>
@Chessing234

Copy link
Copy Markdown
Contributor Author

also: make-concepts now builds icustay_times/hours (for pivoted_oasis), arterial/central line durations, and neuroblock_dose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant