wiki:i2b2 LCBRU Customisations

Version 1 (modified by Richard Bramley, 12 years ago) ( diff )

--

Customisations made to i2b2

1. Remove primary key from Observation Fact table in Data database

Rationale

The primary key creates a unique constraint on Encounter_Num, Concept_Cd, Provider_Id, Start_Date & Modifier_Code. However, we have genuine data that is duplicated on these fields. For example, a repeat test on the same sample where the first was inconclusive.

Applied To

The customisation has been applied to the following i2b2 instances:

  • i2b2_b1_data

Customisation

To apply the customisation, run the following SQL in the i2b2 data database:

ALTER TABLE [dbo].[Observation_Fact] DROP CONSTRAINT [OBSERVATION_FACT_PK]
GO

Roll Back

To roll back the customisation, run the following SQL in the i2b2 data database:

ALTER TABLE [dbo].[Observation_Fact] ADD  CONSTRAINT [OBSERVATION_FACT_PK] PRIMARY KEY NONCLUSTERED 
(
        [Encounter_Num] ASC,
        [Concept_Cd] ASC,
        [Provider_Id] ASC,
        [Start_Date] ASC,
        [Modifier_Cd] ASC
)
GO
Note: See TracWiki for help on using the wiki.