DECLARE @Id Int                               
SELECT @Id = Id From sysobjects Where Name = 'PISReceivedPrescriptionDetail'
IF not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'PatientInstruction')
Alter Table PISReceivedPrescriptionDetail ADD PatientInstruction Nvarchar(MAX) NULL

IF not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'SiteCode')
Alter Table PISReceivedPrescriptionDetail ADD SiteCode Varchar(20) NULL

IF not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'SiteTerm')
Alter Table PISReceivedPrescriptionDetail ADD SiteTerm Nvarchar(MAX) NULL