Changes between Version 10 and Version 11 of i2b2 HowTo Create a Project


Ignore:
Timestamp:
03/01/16 12:19:52 (9 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • i2b2 HowTo Create a Project

    v10 v11  
    140140}}}
    141141
     142=== 5. Create Additional Indexes
    142143
    143 === 5. Create the ontology
     144{{{
     145IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Encounter_Mapping]') AND name = N'ENCOUNTER_MAPPING_PK')
     146ALTER TABLE [dbo].[Encounter_Mapping] DROP CONSTRAINT [ENCOUNTER_MAPPING_PK]
     147GO
     148
     149IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Encounter_Mapping]') AND name = N'IX_Encounter_Mapping')
     150DROP INDEX [IX_Encounter_Mapping] ON [dbo].[Encounter_Mapping] WITH ( ONLINE = OFF )
     151GO
     152
     153CREATE UNIQUE NONCLUSTERED INDEX [IX_Encounter_Mapping] ON [dbo].[Encounter_Mapping]
     154(
     155        [ENCOUNTER_NUM] ASC,
     156        [ENCOUNTER_IDE_SOURCE] ASC
     157       
     158       
     159       
     160       
     161)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
     162GO
     163
     164IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Patient_Mapping]') AND name = N'IX_Patient_Mapping')
     165DROP INDEX [IX_Patient_Mapping] ON [dbo].[Patient_Mapping] WITH ( ONLINE = OFF )
     166GO
     167
     168IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Patient_Mapping]') AND name = N'PATIENT_MAPPING_PK')
     169ALTER TABLE [dbo].[Patient_Mapping] DROP CONSTRAINT [PATIENT_MAPPING_PK]
     170GO
     171
     172
     173IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Patient_Mapping]') AND name = N'IX_Patient_Mapping_1')
     174DROP INDEX [IX_Patient_Mapping_1] ON [dbo].[Patient_Mapping] WITH ( ONLINE = OFF )
     175GO
     176
     177CREATE NONCLUSTERED INDEX [IX_Patient_Mapping_1] ON [dbo].[Patient_Mapping]
     178(
     179        [PATIENT_IDE] ASC,
     180        [PATIENT_IDE_SOURCE] ASC
     181)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
     182GO
     183
     184
     185IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Observation_Fact]') AND name = N'OBSERVATION_FACT_PK')
     186ALTER TABLE [dbo].[Observation_Fact] DROP CONSTRAINT [OBSERVATION_FACT_PK]
     187GO
     188}}}
     189
     190=== 6. Create the ontology
    144191
    145192See: [[i2b2 HowTo Create an Ontology]]