DECLARE @Id INT;                               
SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugH';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'ExtraObligationCeiling' )
    ALTER TABLE dbo.TmpDrugH ADD  ExtraObligationCeiling MONEY  DEFAULT(0) NULL;

SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugH';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'CoveredAmount' )
    ALTER TABLE dbo.TmpDrugH ADD  CoveredAmount MONEY  DEFAULT(0) NULL;

SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugH';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'FirstCoverAmount' )
    ALTER TABLE dbo.TmpDrugH ADD  FirstCoverAmount MONEY  DEFAULT(0) NULL;

SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugH';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'FranchiseAmount' )
    ALTER TABLE dbo.TmpDrugH ADD  FranchiseAmount MONEY  DEFAULT(0) NULL;

SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugH';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'NonInsuredExpense' )
    ALTER TABLE dbo.TmpDrugH ADD  NonInsuredExpense MONEY  DEFAULT(0) NULL;

SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugH';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'TotalAmount' )
    ALTER TABLE dbo.TmpDrugH ADD  TotalAmount MONEY  DEFAULT(0) NULL;

SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugH';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'PatientAmount' )
    ALTER TABLE dbo.TmpDrugH ADD  PatientAmount MONEY  DEFAULT(0) NULL;



SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugHavaleh';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'IsIRIObligation' )
    ALTER TABLE dbo.TmpDrugHavaleh ADD  IsIRIObligation BIT  DEFAULT(0) NULL;

SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'tmpDrugHavaleh';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'IRIStatus' )
    ALTER TABLE dbo.TmpDrugHavaleh ADD  IRIStatus TINYINT DEFAULT(0) NULL;
