declare @guid uniqueidentifier = newid()

INSERT INTO [VCLib].[T_OBJECT_MODIFICATION_ACTION]
           ([ObjectModificationActionID]
           ,[Entities]
           ,[Position]
           ,[type_]
           ,[Active]
           ,[Name]
           ,[Instruction]
           ,[InstructionType])
     VALUES
           (@guid
           ,(select top 1 EntityID from vclib.T_ENTITIES where EntName = 'PHARMACY')
           ,1
           ,(select top 1 EntityID from vclib.T_ENTITIES where EntName = 'SINGLE_MODIFICATION_ACTION')
           ,0
           ,'sp_RDS_Pharmacy'
           ,'sp_RDS_Pharmacy'
           ,0)

INSERT INTO [VCLib].[T_OBJECT_MODIFICATION_ACTION_PARAM]
           ([ObjectModificationActionParamID]
           ,[ObjectModificationAction]
           ,[ParamValue]
           ,[Name])
     VALUES
           (newid()
           ,@guid
           ,'<lx:Path OwnerQueryLevel="0" xmlns:lx="lexem"><lx:StepString name="ObjectProperties" /><lx:StepString name="IsNew" /></lx:Path>'
           ,'@IsNew')

INSERT INTO [VCLib].[T_OBJECT_MODIFICATION_ACTION_PARAM]
           ([ObjectModificationActionParamID]
           ,[ObjectModificationAction]
           ,[ParamValue]
           ,[Name])
     VALUES
           (newid()
           ,@guid
           ,'<lx:Path OwnerQueryLevel="0" xmlns:lx="lexem"><lx:StepString name="Code" /></lx:Path>'
           ,'@ID')
GO