DECLARE @Id Int                               
SELECT @Id = Id From sysobjects Where Name = 'PISReceivedPrescription'
IF not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'PreviousSenderId')
  Alter Table PISReceivedPrescription Add PreviousSenderId UNIQUEIDENTIFIER  NULL 


