wiki:i2b2 LCBRU Customisations

i2b2 LCBRU Customisations

Tags: 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

2. New versions of data load stored procedures

Rationale

The procedures that come with i2b2 are broken, but are used by the i2b2 mapped importer. Ideally I will write the process into the mapped importer.

The procedures are named the same as the original i2b2 stored procedures, but with the suffix _LCBRU.

Error: Macro BackLinks(None) failed
'Environment' object has no attribute 'get_db_cnx'

Last modified 8 years ago Last modified on 12/10/15 09:55:07
Note: See TracWiki for help on using the wiki.