IF  NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[EHR].[T_EHR_RUS_BR9AP1S2QB]') AND name = N'ix_EHR_RUS_BR9AP1S2QB_CodeEHR')
CREATE NONCLUSTERED INDEX [ix_EHR_RUS_BR9AP1S2QB_CodeEHR] ON [EHR].[T_EHR_RUS_BR9AP1S2QB] ([CodeEHR])
GO