 -- ---------------
 
 -- subject_id
-CALL PROC_DROP_FOREIGN_KEY('DIAGNOSES_ICD', 'diagnoses_icd_fk_subject_id')
+CALL PROC_DROP_FOREIGN_KEY('DIAGNOSES_ICD', 'diagnoses_icd_fk_subject_id');
 ALTER TABLE DIAGNOSES_ICD
 ADD CONSTRAINT diagnoses_icd_fk_subject_id
   FOREIGN KEY (SUBJECT_ID)
   REFERENCES PATIENTS(SUBJECT_ID);
 
 -- hadm_id
-CALL PROC_DROP_FOREIGN_KEY('DIAGNOSES_ICD', 'diagnoses_icd_fk_hadm_id')
+CALL PROC_DROP_FOREIGN_KEY('DIAGNOSES_ICD', 'diagnoses_icd_fk_hadm_id');
 ALTER TABLE DIAGNOSES_ICD
 ADD CONSTRAINT diagnoses_icd_fk_hadm_id
   FOREIGN KEY (HADM_ID)

-- ----------------

-- subject_id
CALL PROC_DROP_FOREIGN_KEY('PROCEDURES_ICD', 'procedures_icd_fk_subject_id')
ALTER TABLE PROCEDURES_ICD
ADD CONSTRAINT procedures_icd_fk_subject_id
  FOREIGN KEY (SUBJECT_ID)
  REFERENCES PATIENTS(SUBJECT_ID);

-- hadm_id
CALL PROC_DROP_FOREIGN_KEY('PROCEDURES_ICD', 'procedures_icd_fk_hadm_id')
ALTER TABLE PROCEDURES_ICD
ADD CONSTRAINT procedures_icd_fk_hadm_id
  FOREIGN KEY (HADM_ID)

-- ---------------

-- subject_id
CALL PROC_DROP_FOREIGN_KEY('ICUSTAYS', 'icustays_fk_subject_id');
ALTER TABLE ICUSTAYS
ADD CONSTRAINT icustays_fk_subject_id
  FOREIGN KEY (SUBJECT_ID)
  REFERENCES PATIENTS(SUBJECT_ID);

-- hadm_id
CALL PROC_DROP_FOREIGN_KEY('ICUSTAYS', 'icustays_fk_hadm_id');
ALTER TABLE ICUSTAYS
ADD CONSTRAINT icustays_fk_hadm_id
  FOREIGN KEY (HADM_ID)
