| 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: |
| 9 | SELECT * 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. |
| 13 | the ParentID can be found by using the following code: |
| 14 | \\ \\ ** SELECT * FROM [i2b2ClinDataIntegration].[dbo].OntologyCode where [OntologyID] = 99;** \\ \\ |
| 15 | replace 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 |
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. |