Changes between Initial Version and Version 1 of i2b2 LCBRU Customisations


Ignore:
Timestamp:
04/03/13 12:33:21 (11 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • i2b2 LCBRU Customisations

    v1 v1  
     1= Customisations made to i2b2
     2
     3== 1. Remove primary key from Observation Fact table in Data database
     4
     5=== Rationale
     6
     7The 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.
     8
     9=== Applied To
     10
     11The customisation has been applied to the following i2b2 instances:
     12
     13* i2b2_b1_data
     14
     15=== Customisation
     16
     17To apply the customisation, run the following SQL in the i2b2 data database:
     18
     19{{{
     20#!sql
     21ALTER TABLE [dbo].[Observation_Fact] DROP CONSTRAINT [OBSERVATION_FACT_PK]
     22GO
     23}}}
     24
     25=== Roll Back
     26
     27To roll back the customisation, run the following SQL in the i2b2 data database:
     28
     29{{{
     30#!sql
     31ALTER TABLE [dbo].[Observation_Fact] ADD  CONSTRAINT [OBSERVATION_FACT_PK] PRIMARY KEY NONCLUSTERED
     32(
     33        [Encounter_Num] ASC,
     34        [Concept_Cd] ASC,
     35        [Provider_Id] ASC,
     36        [Start_Date] ASC,
     37        [Modifier_Cd] ASC
     38)
     39GO
     40}}}