diff --git a/mimic-iv-ed/buildmimic/mysql/validate.sql b/mimic-iv-ed/buildmimic/mysql/validate.sql index d0108f685..7a04c6a35 100644 --- a/mimic-iv-ed/buildmimic/mysql/validate.sql +++ b/mimic-iv-ed/buildmimic/mysql/validate.sql @@ -1,5 +1,5 @@ -- Validate the MIMIC-IV-ED tables built correctly by checking against known row counts. --- This check uses the MIMIC-IV-ED Demo, which is a subset of MIMIC-IV-ED. +-- Tested against MIMIC-IV-ED v2.2. SELECT CASE WHEN exp.row_count = obs.row_count @@ -10,12 +10,12 @@ SELECT , obs.row_count AS obs , exp.tbl as table_name FROM ( - SELECT 'edstays' AS tbl, 447712 AS row_count UNION ALL - SELECT 'diagnosis' AS tbl, 946692 AS row_count UNION ALL - SELECT 'medrecon' AS tbl, 3143791 AS row_count UNION ALL - SELECT 'pyxis' AS tbl, 1670590 AS row_count UNION ALL - SELECT 'triage' AS tbl, 447712 AS row_count UNION ALL - SELECT 'vitalsign' AS tbl, 1646976 AS row_count + SELECT 'edstays' AS tbl, 425087 AS row_count UNION ALL + SELECT 'diagnosis' AS tbl, 899050 AS row_count UNION ALL + SELECT 'medrecon' AS tbl, 2987342 AS row_count UNION ALL + SELECT 'pyxis' AS tbl, 1586053 AS row_count UNION ALL + SELECT 'triage' AS tbl, 425087 AS row_count UNION ALL + SELECT 'vitalsign' AS tbl, 1564610 AS row_count ) exp INNER JOIN ( SELECT 'edstays' AS tbl, COUNT(*) AS row_count FROM edstays UNION ALL diff --git a/mimic-iv-ed/buildmimic/postgres/validate.sql b/mimic-iv-ed/buildmimic/postgres/validate.sql index ed0333d93..bd81fcab4 100644 --- a/mimic-iv-ed/buildmimic/postgres/validate.sql +++ b/mimic-iv-ed/buildmimic/postgres/validate.sql @@ -1,12 +1,13 @@ --- Validate the MIMIC-IV tables built correctly by checking against known row counts. +-- Validate the MIMIC-IV-ED tables built correctly by checking against known row counts. +-- Tested against MIMIC-IV-ED v2.2. WITH expected AS ( - SELECT 'edstays' AS tbl, 447712 AS row_count UNION ALL - SELECT 'diagnosis' AS tbl, 946692 AS row_count UNION ALL - SELECT 'medrecon' AS tbl, 3143791 AS row_count UNION ALL - SELECT 'pyxis' AS tbl, 1670590 AS row_count UNION ALL - SELECT 'triage' AS tbl, 447712 AS row_count UNION ALL - SELECT 'vitalsign' AS tbl, 1646976 AS row_count + SELECT 'edstays' AS tbl, 425087 AS row_count UNION ALL + SELECT 'diagnosis' AS tbl, 899050 AS row_count UNION ALL + SELECT 'medrecon' AS tbl, 2987342 AS row_count UNION ALL + SELECT 'pyxis' AS tbl, 1586053 AS row_count UNION ALL + SELECT 'triage' AS tbl, 425087 AS row_count UNION ALL + SELECT 'vitalsign' AS tbl, 1564610 AS row_count ) , observed as (