Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mimic-iv/concepts/measurement/height.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ WITH ht_in AS (
-- merge cm/height, only take 1 value per charted row
, ht_stg0 AS (
SELECT
COALESCE(h1.subject_id, h1.subject_id) AS subject_id
, COALESCE(h1.stay_id, h1.stay_id) AS stay_id
, COALESCE(h1.charttime, h1.charttime) AS charttime
COALESCE(h1.subject_id, h2.subject_id) AS subject_id
, COALESCE(h1.stay_id, h2.stay_id) AS stay_id
, COALESCE(h1.charttime, h2.charttime) AS charttime
, COALESCE(h1.height, h2.height) AS height
FROM ht_cm h1
FULL OUTER JOIN ht_in h2
Expand Down
6 changes: 3 additions & 3 deletions mimic-iv/concepts_duckdb/measurement/height.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ WITH ht_in AS (
NOT c.valuenum IS NULL AND c.itemid = 226730
), ht_stg0 AS (
SELECT
COALESCE(h1.subject_id, h1.subject_id) AS subject_id,
COALESCE(h1.stay_id, h1.stay_id) AS stay_id,
COALESCE(h1.charttime, h1.charttime) AS charttime,
COALESCE(h1.subject_id, h2.subject_id) AS subject_id,
COALESCE(h1.stay_id, h2.stay_id) AS stay_id,
COALESCE(h1.charttime, h2.charttime) AS charttime,
COALESCE(h1.height, h2.height) AS height
FROM ht_cm AS h1
FULL OUTER JOIN ht_in AS h2
Expand Down
6 changes: 3 additions & 3 deletions mimic-iv/concepts_postgres/measurement/height.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ WITH ht_in AS (
NOT c.valuenum IS NULL AND /* Height cm */ c.itemid = 226730
), ht_stg0 AS (
SELECT
COALESCE(h1.subject_id, h1.subject_id) AS subject_id,
COALESCE(h1.stay_id, h1.stay_id) AS stay_id,
COALESCE(h1.charttime, h1.charttime) AS charttime,
COALESCE(h1.subject_id, h2.subject_id) AS subject_id,
COALESCE(h1.stay_id, h2.stay_id) AS stay_id,
COALESCE(h1.charttime, h2.charttime) AS charttime,
COALESCE(h1.height, h2.height) AS height
FROM ht_cm AS h1
FULL OUTER JOIN ht_in AS h2
Expand Down