Changes between Version 2 and Version 3 of i2b2 HowTo Create Concept Codes in an Ontology


Ignore:
Timestamp:
08/30/16 14:39:56 (8 years ago)
Author:
dan.lawday
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • i2b2 HowTo Create Concept Codes in an Ontology

    v2 v3  
    33Once you have created an Ontology you can create the codes (which go in the concept_cd column in the facts table).
    44To do this you run the following code (I'll detail the input in a mo).
     5\\ \\ **execute dbo.CreateOntologyCode @OntologyID = 99, @ParentID = 7777777, @Name = 'ethnicity',@SourceSystem = 'DREAM_RedCap',@SourceCode = 'ethnicity';** \\ \\
     6
     7
     8- @OntologyID, this is 1 for GenvascCiviCRM, 27 for Gem BRICCS REDCap, the full list can be found by using:
     9SELECT *  FROM [i2b2ClinDataIntegration].[dbo].Ontology;
     10
     11
     12- @ParentID, this needs must be a container node (top level is possible however if there is a hierarchy then don't add all the codes to the top level, instead create the child container nodes as needed and then add the codes to them).\\ Note that all the codes will be Leaf nodes, this indicates that is will be containing data and that no other codes will hang off them.
     13the ParentID can be found by using the following code:
     14\\ \\ ** SELECT *  FROM [i2b2ClinDataIntegration].[dbo].OntologyCode                                    where [OntologyID] = 99;** \\ \\
     15replace 99 with your ontology (49 for example is Dream).
     16
     17- @Name, this is what you are going to be calling the code by from now on
    518\\
     19- @SourceSystem
    620\\
    7 **execute dbo.CreateOntologyCode @OntologyID = 99, @ParentID = 7777777, @Name = 'ethnicity',@SourceSystem = 'DREAM_RedCap',@SourceCode = 'ethnicity';**
    8 \\
    9 - OntologyID, this is 1 for GenvascCiviCRM, 27 for Gem BRICCS REDCap, the full list can be found by using:
    10 SELECT *  FROM [i2b2ClinDataIntegration].[dbo].Ontology;
    11 - ParentID, this needs must be a container node (top level is possible however if there is a hierarchy then don't add all the codes to the top level, instead create the child container nodes as needed and then add the codes to them).\\ Note that all the codes will be Leaf nodes, this indicates that is will be containing data and that no other codes will hang off them.
    12 the ParentID can be found by using the following code: \\
    13 SELECT *  FROM [i2b2ClinDataIntegration].[dbo].OntologyCode                                     where [OntologyID] = 99;
    14 replace 99 with your ontology (49 for example is Dream).
     21- @SourceCode, this is what the incomming field name is in the source system database (and may not be a helpfully named field, which is why we have the @Name field which gives us a chance to change it to something better.
    1522
    1623Below is a abstract for the dream ontology as way of example:\\