if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AddIHIOPrescription]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[AddIHIOPrescription]


IF NOT EXISTS
(
    SELECT COLUMN_NAME
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'IHIOPrescriptionDetail'
          AND COLUMN_NAME = 'IsBulk'
)
    ALTER TABLE IHIOPrescriptionDetail ADD IsBulk BIT DEFAULT (0);
