alter table IF EXISTS "PatientMedicationHeader"
add column IF NOT EXISTS "AdmissionId" integer,
add CONSTRAINT "PatientMedicationHeader" FOREIGN KEY ("AdmissionId")
 REFERENCES public."Admission" ("AdmissionId") MATCH SIMPLE;
---------------------------------------
alter table IF EXISTS "PatientLabHeader"
add column IF NOT EXISTS "AdmissionId" integer,
add CONSTRAINT "PatientLabHeader_AdmissionId_fkey" FOREIGN KEY ("AdmissionId")
 REFERENCES public."Admission" ("AdmissionId") MATCH SIMPLE;