--{5.8.1.7}  
----------------------  
-- $Change: xxxxx $  
-- $DateTime: 2013/04/19 23:42:00 $  
-- $Author: bdowling $  
----------------------  

IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[event_interoperability]') AND type in (N'U')) 
CREATE TABLE [dbo].[event_interoperability](
      [event_id] [uniqueidentifier] NOT NULL,
	  [encounter_id] [uniqueidentifier] NULL,
      [external_system_id] [varchar](100) NULL,
      [external_enterprise_id] [varchar](100) NULL,
      [external_practice_id] [varchar](100) NULL,
      [external_patient_id] [varchar](100) NULL,
      [external_user_id] [varchar](100) NULL,
      [message] [varchar](4000) NULL,
CONSTRAINT [PK_event_interoperability] PRIMARY KEY CLUSTERED 
(
      [event_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [NEXTGEN_INDEX_1]
) ON [NEXTGEN_INDEX_1]
