CREATE TABLE [dbo].[claim_events]
(
[evt_event_code] [dbo].[ais_code_medium] NOT NULL,
[evt_category_code] [dbo].[ais_code_short] NULL,
[evt_sequence_code] [dbo].[ais_code_short] NULL,
[evt_name] [nvarchar] (64) COLLATE French_CI_AS NULL,
[evt_date_start] [datetime] NULL,
[evt_date_end] [datetime] NULL,
[evt_description] [nvarchar] (1024) COLLATE French_CI_AS NULL,
[evt_place_occurrence] [nvarchar] (256) COLLATE French_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[claim_events] ADD CONSTRAINT [CK__claim_events_evt_event_code__string_pk] CHECK ((len(ltrim(rtrim([evt_event_code])))>(0) AND charindex('*',[evt_event_code])=(0) AND charindex('%',[evt_event_code])=(0)))
GO
ALTER TABLE [dbo].[claim_events] ADD CONSTRAINT [PK_claim_events] PRIMARY KEY CLUSTERED  ([evt_event_code]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[claim_events] ADD CONSTRAINT [FK_claim_events_nm_claims_events_categories] FOREIGN KEY ([evt_category_code]) REFERENCES [dbo].[nm_claims_events_categories] ([evtcat_category_code])
GO
ALTER TABLE [dbo].[claim_events] ADD CONSTRAINT [FK_claim_events_sq_sequences] FOREIGN KEY ([evt_sequence_code]) REFERENCES [dbo].[sq_sequences] ([seq_sequence_code])
GO
