if not exists(select * from sys.indexes i where i.[object_id] = OBJECT_ID('EHR.T_EHR_RUS_BR9AP1S2QB', 'U') and i.name = 'IX_EHR_RUS_BR9AP1S2QB_CodeEHR')
CREATE NONCLUSTERED INDEX [IX_EHR_RUS_BR9AP1S2QB_CodeEHR] ON [EHR].[T_EHR_RUS_BR9AP1S2QB] ([CodeEHR]) WITH (MAXDOP = 0, SORT_IN_TEMPDB = ON)
