IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_RDS_ChoiceHospitalizationXml]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_RDS_ChoiceHospitalizationXml]
GO
--SET ANSI_NULLS ON
--GO
--SET QUOTED_IDENTIFIER ON
--GO
---- =============================================
---- Author:		Vitacore (с)
---- Create date: 2014-11-07
---- Description:	Выгрузка информации о госпитализации
---- =============================================
--CREATE PROCEDURE [dbo].[sp_RDS_ChoiceHospitalizationXml]
--	@LpuCode varchar(max) = null,
--	@Xml xml = null,
--	@IsNew bit = 1,
--	@ID uniqueidentifier = null,
--	@HospType int = 0
--AS
--BEGIN
--IF (@HospType = 3)
--BEGIN
--exec [dbo].[sp_RDS_PregnantHospitalizationXml] @LpuCode,@ID,@IsNew
--END
--if(exists (select * from [AKUZ].T_MOVEMENT mov where mov.MovementID = @ID and mov.Mkb is not null))
--BEGIN
--exec [dbo].[sp_RDS_HospitalisationXml] @LpuCode,@Xml,@IsNew,@ID
--END

--END