if exists(select* from sys.indexes i where i.[object_id] = OBJECT_ID('AKUZ.T_MEDICAL_EPISODE', 'U') and i.name = 'IX_MEDICAL_EPISODE_AmbulanceEvent')
	drop index IX_MEDICAL_EPISODE_AmbulanceEvent on AKUZ.[T_MEDICAL_EPISODE];
go
CREATE NONCLUSTERED INDEX [IX_MEDICAL_EPISODE_AmbulanceEvent] ON [AKUZ].[T_MEDICAL_EPISODE] ([AmbulanceEvent]) WITH (FILLFACTOR=95, MAXDOP = 0, SORT_IN_TEMPDB = ON)

if exists(select* from sys.indexes i where i.[object_id] = OBJECT_ID('AKUZ.T_MEDICAL_EPISODE', 'U') and i.name = 'IX_MEDICAL_EPISODE_OutcomeRecord')
	drop index IX_MEDICAL_EPISODE_OutcomeRecord on AKUZ.[T_MEDICAL_EPISODE];
go
CREATE NONCLUSTERED INDEX [IX_MEDICAL_EPISODE_OutcomeRecord] ON [AKUZ].[T_MEDICAL_EPISODE] ([OutcomeRecord]) WITH (FILLFACTOR=95, MAXDOP = 0, SORT_IN_TEMPDB = ON)