From 54fc00fd48b5990bd8f741c451f337381445629d Mon Sep 17 00:00:00 2001 From: Kenji Otsuka Date: Sat, 29 Jul 2023 07:15:47 +0900 Subject: [PATCH 1/2] Change width of INPUTEVENTS_MV ORDERCOMPONENTTYPEDESCRIPTION to 200, and its comment on MySQL SQL. MIMIC-III web page https://mimic.mit.edu/docs/iii/tables/inputevents_mv/ says its width is 200. According to my calculation, the maximum length of its data was 100, so changed the comment on MySQL SQL file. --- mimic-iii/buildmimic/mysql/1-define.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mimic-iii/buildmimic/mysql/1-define.sql b/mimic-iii/buildmimic/mysql/1-define.sql index f8a9d6eab..d83ab4b4c 100644 --- a/mimic-iii/buildmimic/mysql/1-define.sql +++ b/mimic-iii/buildmimic/mysql/1-define.sql @@ -581,7 +581,7 @@ CREATE TABLE INPUTEVENTS_MV ( -- rows=3618991 LINKORDERID MEDIUMINT UNSIGNED NOT NULL, ORDERCATEGORYNAME VARCHAR(100) NOT NULL, -- max=24 SECONDARYORDERCATEGORYNAME VARCHAR(100), -- max=24 - ORDERCOMPONENTTYPEDESCRIPTION VARCHAR(20) NOT NULL, -- max=57 + ORDERCOMPONENTTYPEDESCRIPTION VARCHAR(200) NOT NULL, -- max=100 ORDERCATEGORYDESCRIPTION VARCHAR(50) NOT NULL, -- max=14 PATIENTWEIGHT DECIMAL(22, 10) NOT NULL, TOTALAMOUNT DECIMAL(22, 10), From 10a0864d254bd09b00bcd03ab0186d7f302027cd Mon Sep 17 00:00:00 2001 From: Kenji Otsuka Date: Sat, 29 Jul 2023 10:15:09 +0900 Subject: [PATCH 2/2] Make CHARTEVENTS VALUENUM colum wide. CHARTEVENTS VALUENUM column was set to DECIMAL(22, 10) but that data has to be truncated when it is inserted, because the actual data contains 7 integer part digits and 23 or less than decimal places at most. Then I made the column DECIMAL(30, 23). --- mimic-iii/buildmimic/mysql/1-define.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mimic-iii/buildmimic/mysql/1-define.sql b/mimic-iii/buildmimic/mysql/1-define.sql index d83ab4b4c..054d659d3 100644 --- a/mimic-iii/buildmimic/mysql/1-define.sql +++ b/mimic-iii/buildmimic/mysql/1-define.sql @@ -179,7 +179,7 @@ CREATE TABLE CHARTEVENTS ( -- rows=263201375 STORETIME DATETIME, CGID SMALLINT UNSIGNED, VALUE TEXT, -- max=91 - VALUENUM DECIMAL(22, 10), + VALUENUM DECIMAL(30, 23), VALUEUOM VARCHAR(50), -- max=17 WARNING TINYINT UNSIGNED, ERROR TINYINT UNSIGNED,