 DROP TABLE IF EXISTS mimic_ed.edstays CASCADE;
 CREATE TABLE mimic_ed.edstays
 (
-  subject_id INT NOT NULL,
-  hadm_id INT,
-  stay_id INT NOT NULL,
+  subject_id INTEGER NOT NULL,
+  hadm_id INTEGER,
+  stay_id INTEGER NOT NULL,
   intime TIMESTAMP(0) NOT NULL,
-  outtime TIMESTAMP(0) NOT NULL
+  outtime TIMESTAMP(0) NOT NULL,
+  gender VARCHAR(1) NOT NULL,
+  race VARCHAR(60),
+  arrival_transport VARCHAR(50) NOT NULL,
+  disposition VARCHAR(255)
 ) ;
 
 --------------------------------------------------------

DROP TABLE IF EXISTS mimic_ed.triage CASCADE;
CREATE TABLE mimic_ed.triage
(
  subject_id INT NOT NULL,
  stay_id INT NOT NULL,
  temperature DOUBLE PRECISION,
  heartrate DOUBLE PRECISION,
  resprate DOUBLE PRECISION,
  o2sat DOUBLE PRECISION,
  sbp DOUBLE PRECISION,
  dbp DOUBLE PRECISION,
  pain DOUBLE PRECISION,
  acuity DOUBLE PRECISION,
  chiefcomplaint VARCHAR(255)
) ;


DROP TABLE IF EXISTS mimic_ed.medrecon CASCADE;
CREATE TABLE mimic_ed.medrecon
(
  subject_id INTEGER NOT NULL,
  stay_id INTEGER NOT NULL,
  charttime TIMESTAMP(0),
  name VARCHAR(255),
  gsn VARCHAR(10),
  ndc VARCHAR(12),
  etc_rn SMALLINT,
  etccode VARCHAR(8),
  etcdescription VARCHAR(255)
) ;
