Closed marceliwac closed 1 year ago
For your convenience, here is a temporary patch of changes that make the scripts in mimic-iv/concepts/postgres usable again.
I think this is all fixed now, so I will close it, but feel free to reopen if I missed something. Thanks for raising the issue!
Prerequisites
Description
There are few problems with the conversion to postgres using the convert_bigquery_to_postgres.sh which render the created SQL scripts partially broken (some scripts fail while others proceed).
That results in the following:
https://github.com/MIT-LCP/mimic-code/blob/892c21cec2a5ea046d432148d2e8d5e16d2781f4/mimic-iv/concepts/demographics/icustay_detail.sql#L19
being replaced to:
https://github.com/MIT-LCP/mimic-code/blob/892c21cec2a5ea046d432148d2e8d5e16d2781f4/mimic-iv/concepts/postgres/demographics/icustay_detail.sql#L21
instead of:
YEAR
,MONTH
etc.) for the function call to DATETIME with its quotemark-encapsulated counterparts. This is currently done for DATETIME_DIFF and DATETIME_TRUNC, but not DATETIME, which is needed by Postgres.That results in the following:
https://github.com/MIT-LCP/mimic-code/blob/892c21cec2a5ea046d432148d2e8d5e16d2781f4/mimic-iv/concepts/demographics/icustay_detail.sql#L9
being replaced to:
https://github.com/MIT-LCP/mimic-code/blob/892c21cec2a5ea046d432148d2e8d5e16d2781f4/mimic-iv/concepts/postgres/demographics/icustay_detail.sql#L11
instead of:
mimic_icu.chartevents
instead ofmimiciv_icu.chartevents
.