IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[EMDR].[T_EHR_ELEMENT_INFO]') AND name = N'IX_EHR_ELEMENT_INFO_Id_EhrInfo')
drop index IX_EHR_ELEMENT_INFO_Id_EhrInfo on emdr.t_ehr_element_info
GO

delete from vclib.T_HOLDER_PARAMETER
where Holder = (select top 1 HolderId from vclib.T_HOLDER where Name = 'EhrValidationHolder')
GO

delete from vclib.T_HOLDER
where Name = 'EhrValidationHolder'
GO