IF NOT EXISTS (SELECT * FROM sys.columns where object_id = OBJECT_ID(N'[AKUZ].[T_PHYSIOTHERAPY_PRESCRIBED_PROCEDURE]') and name = 'PhysicalTherapyReferral')
begin
ALTER TABLE AKUZ.T_PHYSIOTHERAPY_PRESCRIBED_PROCEDURE ADD "physicaltherapyreferral" uuid NULL;
ALTER TABLE AKUZ.T_PHYSIOTHERAPY_PRESCRIBED_PROCEDURE ADD CONSTRAINT FK_T_PHYSICAL_THERAPY_REFERRAL_T_PHYSIOTHERAPY_PRESCRI_9010B7AE
FOREIGN KEY("physicaltherapyreferral") REFERENCES AKUZ.T_PHYSICAL_THERAPY_REFERRAL (MedicalRecordID);
end



