
-- dependencies
.print 'demographics/icustay_times.sql'
.read demographics/icustay_times.sql
.print 'demographics/icustay_hourly.sql'
.read demographics/icustay_hourly.sql
.print 'demographics/weight_durations.sql'
.read demographics/weight_durations.sql
.print 'measurement/urine_output.sql'
.read measurement/urine_output.sql
.print 'organfailure/kdigo_uo.sql'
.read organfailure/kdigo_uo.sql

-- demographics
.print 'demographics/age.sql'
.read demographics/age.sql
.print 'demographics/icustay_detail.sql'
.read demographics/icustay_detail.sql

-- measurement
.print 'measurement/bg.sql'
.read measurement/bg.sql
.print 'measurement/blood_differential.sql'
.read measurement/blood_differential.sql
.print 'measurement/cardiac_marker.sql'
.read measurement/cardiac_marker.sql
.print 'measurement/chemistry.sql'
.read measurement/chemistry.sql
.print 'measurement/coagulation.sql'
.read measurement/coagulation.sql
.print 'measurement/complete_blood_count.sql'
.read measurement/complete_blood_count.sql
.print 'measurement/creatinine_baseline.sql'
.read measurement/creatinine_baseline.sql
.print 'measurement/enzyme.sql'
.read measurement/enzyme.sql
.print 'measurement/gcs.sql'
.read measurement/gcs.sql
.print 'measurement/height.sql'
.read measurement/height.sql
.print 'measurement/icp.sql'
.read measurement/icp.sql
.print 'measurement/inflammation.sql'
.read measurement/inflammation.sql
.print 'measurement/oxygen_delivery.sql'
.read measurement/oxygen_delivery.sql
.print 'measurement/rhythm.sql'
.read measurement/rhythm.sql
.print 'measurement/urine_output_rate.sql'
.read measurement/urine_output_rate.sql
.print 'measurement/ventilator_setting.sql'
.read measurement/ventilator_setting.sql
.print 'measurement/vitalsign.sql'
.read measurement/vitalsign.sql

-- comorbidity
.print 'comorbidity/charlson.sql'
.read comorbidity/charlson.sql

-- medication
.print 'medication/acei.sql'
.read medication/acei.sql
.print 'medication/antibiotic.sql'
.read medication/antibiotic.sql
.print 'medication/dobutamine.sql'
.read medication/dobutamine.sql
.print 'medication/dopamine.sql'
.read medication/dopamine.sql
.print 'medication/epinephrine.sql'
.read medication/epinephrine.sql
.print 'medication/milrinone.sql'
.read medication/milrinone.sql
.print 'medication/neuroblock.sql'
.read medication/neuroblock.sql
.print 'medication/norepinephrine.sql'
.read medication/norepinephrine.sql
.print 'medication/nsaid.sql'
.read medication/nsaid.sql
.print 'medication/phenylephrine.sql'
.read medication/phenylephrine.sql
.print 'medication/vasopressin.sql'
.read medication/vasopressin.sql

-- treatment
.print 'treatment/crrt.sql'
.read treatment/crrt.sql
.print 'treatment/invasive_line.sql'
.read treatment/invasive_line.sql
.print 'treatment/rrt.sql'
.read treatment/rrt.sql
.print 'treatment/ventilation.sql'
.read treatment/ventilation.sql

-- firstday
.print 'firstday/first_day_bg.sql'
.read firstday/first_day_bg.sql
.print 'firstday/first_day_bg_art.sql'
.read firstday/first_day_bg_art.sql
.print 'firstday/first_day_gcs.sql'
.read firstday/first_day_gcs.sql
.print 'firstday/first_day_height.sql'
.read firstday/first_day_height.sql
.print 'firstday/first_day_lab.sql'
.read firstday/first_day_lab.sql
.print 'firstday/first_day_rrt.sql'
.read firstday/first_day_rrt.sql
.print 'firstday/first_day_urine_output.sql'
.read firstday/first_day_urine_output.sql
.print 'firstday/first_day_vitalsign.sql'
.read firstday/first_day_vitalsign.sql
.print 'firstday/first_day_weight.sql'
.read firstday/first_day_weight.sql

-- organfailure
.print 'organfailure/kdigo_creatinine.sql'
.read organfailure/kdigo_creatinine.sql
.print 'organfailure/meld.sql'
.read organfailure/meld.sql

-- score
.print 'score/apsiii.sql'
.read score/apsiii.sql
.print 'score/lods.sql'
.read score/lods.sql
.print 'score/oasis.sql'
.read score/oasis.sql
.print 'score/sapsii.sql'
.read score/sapsii.sql
.print 'score/sirs.sql'
.read score/sirs.sql
.print 'score/sofa.sql'
.read score/sofa.sql

-- sepsis
.print 'sepsis/suspicion_of_infection.sql'
.read sepsis/suspicion_of_infection.sql

-- final tables which were dependent on one or more prior tables
.print 'organfailure/kdigo_stages.sql'
.read organfailure/kdigo_stages.sql
.print 'firstday/first_day_sofa.sql'
.read firstday/first_day_sofa.sql
.print 'sepsis/sepsis3.sql'
.read sepsis/sepsis3.sql
.print 'medication/vasoactive_agent.sql'
.read medication/vasoactive_agent.sql
.print 'medication/norepinephrine_equivalent_dose.sql'
.read medication/norepinephrine_equivalent_dose.sql
