 --  Load Data for Table ADMISSIONS
 --------------------------------------------------------
 
-\set admissions_csv :mimic_data_dir 'ADMISSIONS_DATA_TABLE.csv'
+\set admissions_csv :mimic_data_dir 'ADMISSIONS.csv'
 COPY ADMISSIONS FROM :'admissions_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table CALLOUT
 --------------------------------------------------------
 
-\set callout_csv :mimic_data_dir 'CALLOUT_DATA_TABLE.csv'
+\set callout_csv :mimic_data_dir 'CALLOUT.csv'
 COPY CALLOUT FROM :'callout_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table CAREGIVERS
 --------------------------------------------------------
 
-\set caregivers_csv :mimic_data_dir 'CAREGIVERS_DATA_TABLE.csv'
+\set caregivers_csv :mimic_data_dir 'CAREGIVERS.csv'
 COPY CAREGIVERS FROM :'caregivers_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table CHARTEVENTS
 --------------------------------------------------------
 
-\set chartevents_csv :mimic_data_dir 'CHARTEVENTS_DATA_TABLE.csv'
+\set chartevents_csv :mimic_data_dir 'CHARTEVENTS.csv'
 COPY CHARTEVENTS FROM :'chartevents_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table CPTEVENTS
 --------------------------------------------------------
 
-\set cptevents_csv :mimic_data_dir 'CPTEVENTS_DATA_TABLE.csv'
+\set cptevents_csv :mimic_data_dir 'CPTEVENTS.csv'
 COPY CPTEVENTS FROM :'cptevents_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table DATETIMEEVENTS
 --------------------------------------------------------
 
-\set datetimeevents_csv :mimic_data_dir 'DATETIMEEVENTS_DATA_TABLE.csv'
+\set datetimeevents_csv :mimic_data_dir 'DATETIMEEVENTS.csv'
 COPY DATETIMEEVENTS FROM :'datetimeevents_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table DIAGNOSES_ICD
 --------------------------------------------------------
 
-\set diagnoses_icd_csv :mimic_data_dir 'DIAGNOSES_ICD_DATA_TABLE.csv'
+\set diagnoses_icd_csv :mimic_data_dir 'DIAGNOSES_ICD.csv'
 COPY DIAGNOSES_ICD FROM :'diagnoses_icd_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table DRGCODES
 --------------------------------------------------------
 
-\set drgcodes_csv :mimic_data_dir 'DRGCODES_DATA_TABLE.csv'
+\set drgcodes_csv :mimic_data_dir 'DRGCODES.csv'
 COPY DRGCODES FROM :'drgcodes_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table D_CPT
 --------------------------------------------------------
 
-\set d_cpt_csv :mimic_data_dir 'D_CPT_DATA_TABLE.csv'
+\set d_cpt_csv :mimic_data_dir 'D_CPT.csv'
 COPY D_CPT FROM :'d_cpt_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table D_ICD_DIAGNOSES
 --------------------------------------------------------
 
-\set d_icd_diagnoses_csv :mimic_data_dir 'D_ICD_DIAGNOSES_DATA_TABLE.csv'
+\set d_icd_diagnoses_csv :mimic_data_dir 'D_ICD_DIAGNOSES.csv'
 COPY D_ICD_DIAGNOSES FROM :'d_icd_diagnoses_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table D_ICD_PROCEDURES
 --------------------------------------------------------
 
-\set d_icd_procedures_csv :mimic_data_dir 'D_ICD_PROCEDURES_DATA_TABLE.csv'
+\set d_icd_procedures_csv :mimic_data_dir 'D_ICD_PROCEDURES.csv'
 COPY D_ICD_PROCEDURES FROM :'d_icd_procedures_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table D_ITEMS
 --------------------------------------------------------
 
-\set d_items_csv :mimic_data_dir 'D_ITEMS_DATA_TABLE.csv'
+\set d_items_csv :mimic_data_dir 'D_ITEMS.csv'
 COPY D_ITEMS FROM :'d_items_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table D_LABITEMS
 --------------------------------------------------------
 
-\set d_labitems_csv :mimic_data_dir 'D_LABITEMS_DATA_TABLE.csv'
+\set d_labitems_csv :mimic_data_dir 'D_LABITEMS.csv'
 COPY D_LABITEMS FROM :'d_labitems_csv' DELIMITER ',' CSV HEADER;
 
 --------------------------------------------------------
 --  Load Data for Table ICUSTAYS
 --------------------------------------------------------
 
-\set icustays_csv :mimic_data_dir 'ICUSTAYS_DATA_TABLE.csv'
+\set icustays_csv :mimic_data_dir 'ICUSTAYS.csv'
 COPY ICUSTAYS FROM :'icustays_csv' DELIMITER ',' CSV HEADER;
 
 

--  Load Data for Table INPUTEVENTS_CV
--------------------------------------------------------

\set inputevents_cv_csv :mimic_data_dir 'INPUTEVENTS_CV_DATA_TABLE.csv'
COPY INPUTEVENTS_CV FROM :'inputevents_cv_csv' WITH DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table INPUTEVENTS_MV
--------------------------------------------------------

\set inputevents_mv_csv :mimic_data_dir 'INPUTEVENTS_MV_DATA_TABLE.csv'
COPY INPUTEVENTS_MV FROM :'inputevents_mv_csv' DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table LABEVENTS
--------------------------------------------------------

\set labevents_csv :mimic_data_dir 'LABEVENTS_DATA_TABLE.csv'
COPY LABEVENTS FROM :'labevents_csv' DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table MICROBIOLOGYEVENTS
--------------------------------------------------------

\set microbiologyevents_csv :mimic_data_dir 'MICROBIOLOGYEVENTS_DATA_TABLE.csv'
COPY MICROBIOLOGYEVENTS FROM :'microbiologyevents_csv' DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table NOTEEVENTS
--------------------------------------------------------

\set noteevents_csv :mimic_data_dir 'NOTEEVENTS_DATA_TABLE.csv'
COPY NOTEEVENTS FROM :'noteevents_csv' DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table OUTPUTEVENTS
--------------------------------------------------------

\set outputevents_csv :mimic_data_dir 'OUTPUTEVENTS_DATA_TABLE.csv'
COPY OUTPUTEVENTS FROM :'outputevents_csv' WITH DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table PATIENTS
--------------------------------------------------------

\set patients_csv :mimic_data_dir 'PATIENTS_DATA_TABLE.csv'
COPY PATIENTS FROM :'patients_csv' DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table PRESCRIPTIONS
--------------------------------------------------------

\set prescriptions_csv :mimic_data_dir 'PRESCRIPTIONS_DATA_TABLE.csv'
COPY PRESCRIPTIONS FROM :'prescriptions_csv' DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table PROCEDUREEVENTS_MV
--------------------------------------------------------

\set procedureevents_mv_csv :mimic_data_dir 'PROCEDUREEVENTS_MV_DATA_TABLE.csv'
COPY PROCEDUREEVENTS_MV FROM :'procedureevents_mv_csv' WITH DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table PROCEDURES_ICD
--------------------------------------------------------

\set procedures_icd_csv :mimic_data_dir 'PROCEDURES_ICD_DATA_TABLE.csv'
COPY PROCEDURES_ICD FROM :'procedures_icd_csv' DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table SERVICES
--------------------------------------------------------

\set services_csv :mimic_data_dir 'SERVICES_DATA_TABLE.csv'
COPY SERVICES FROM :'services_csv' DELIMITER ',' CSV HEADER;

--------------------------------------------------------
--  Load Data for Table TRANSFERS
--------------------------------------------------------

\set transfers_csv :mimic_data_dir 'TRANSFERS_DATA_TABLE.csv'
COPY TRANSFERS FROM :'transfers_csv' DELIMITER ',' CSV HEADER;


-- -- Example command for importing from a CSV to a table
-- COPY admissions
--     FROM '/path/to/file/ADMISSIONS.csv'
--     DELIMITER ','
--     CSV HEADER;

