File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
mimic-iv/concepts/firstday Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 1313WITH gcs_final AS
1414(
1515 SELECT
16- gcs.*
16+ ie .subject_id , ie .stay_id
17+ , g .gcs
18+ , g .gcs_motor
19+ , g .gcs_verbal
20+ , g .gcs_eyes
21+ , g .gcs_unable
1722 -- This sorts the data by GCS
1823 -- rn = 1 is the the lowest total GCS value
1924 , ROW_NUMBER () OVER
2025 (
21- PARTITION BY gcs .stay_id
22- ORDER BY gcs .GCS
26+ PARTITION BY g .stay_id
27+ ORDER BY g .GCS
2328 ) as gcs_seq
24- FROM ` physionet-data.mimiciv_derived.gcs` gcs
29+ FROM ` physionet-data.mimiciv_icu.icustays` ie
30+ -- Only get data for the first 24 hours
31+ LEFT JOIN ` physionet-data.mimiciv_derived.gcs` g
32+ ON ie .stay_id = g .stay_id
33+ AND g .charttime >= DATETIME_SUB(ie .intime , INTERVAL ' 6' HOUR)
34+ AND g .charttime <= DATETIME_ADD(ie .intime , INTERVAL ' 1' DAY)
2535)
2636SELECT
2737 ie .subject_id
You can’t perform that action at this time.
0 commit comments