Skip to content

Commit 17aeb3d

Browse files
authored
Merge pull request MIT-LCP#2014 from Chessing234/fix/pivoted-height-coalesce-h2
Fix MIMIC-III pivoted height FULL OUTER JOIN coalescing h1 instead of h2
2 parents 38e37fa + 6df86e5 commit 17aeb3d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mimic-iii/concepts/pivot/pivoted_height.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ WITH ht_in AS
5252
, ht_stg0 AS
5353
(
5454
SELECT
55-
COALESCE(h1.subject_id, h1.subject_id) as subject_id
56-
, COALESCE(h1.charttime, h1.charttime) AS charttime
55+
COALESCE(h1.subject_id, h2.subject_id) as subject_id
56+
, COALESCE(h1.charttime, h2.charttime) AS charttime
5757
, COALESCE(h1.height, h2.height) as height
5858
FROM ht_cm h1
5959
FULL OUTER JOIN ht_in h2

0 commit comments

Comments
 (0)