Skip to content

fix: load paths, imports, transpile, and CI permissions#2124

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

fix: load paths, imports, transpile, and CI permissions#2124
Chessing234 wants to merge 48 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/test_transpile.py
  • smoke import_duckdb.sh / sqlite import with a spaced datadir

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

Chessing234 and others added 2 commits July 24, 2026 09:25
SQL existed but make scripts never ran it (MIT-LCP#830).

Co-authored-by: Cursor <cursoragent@cursor.com>
@Chessing234

Copy link
Copy Markdown
Contributor Author

Also wires pivoted_oasis into postgres/duckdb make-concepts (#830).

@alistairewj

Copy link
Copy Markdown
Member

there is too much here for one PR - I'm OK with combining together misc doc and syntax fixes into one PR but concept changes are best kept to individual PRs with evidence supporting them

@Chessing234

Copy link
Copy Markdown
Contributor Author

Agreed — I’ll split this. Keeping load-path/syntax/transpile fixes here; concept changes (UO rate, vaso pauses, line durations, Elixhauser, vitals, scores, etc.) will go out as separate PRs with the linked issue evidence.

1 similar comment
@Chessing234

Copy link
Copy Markdown
Contributor Author

Agreed — I’ll split this. Keeping load-path/syntax/transpile fixes here; concept changes (UO rate, vaso pauses, line durations, Elixhauser, vitals, scores, etc.) will go out as separate PRs with the linked issue evidence.

Chessing234 added a commit to Chessing234/mimic-code that referenced this pull request Jul 25, 2026
Per maintainer feedback on MIT-LCP#2124, keep load-path / transpile / CI fixes here and move concept logic to individual PRs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Chessing234 Chessing234 changed the title fix: UO rate, vaso pause gaps, line durations, load paths fix: load paths, imports, transpile, and CI permissions Jul 25, 2026
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.

2 participants