OMOP
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview of CRC Data Installation

The crcdata tables are part of the Data Repository (CRC) Cell. The following outlines the steps that will be taken during this stage of the

...

installation.

Step 1:   Change your working directory

Step 2:

...

   Set the database properties for the crcdata 

Step 3:

...

   Create the Data Repository (CRC) tables, indexes and sequences

Step 4:

...

   Create the stored procedures

Step 5:

...

   Load sample data into the tables

Step 6:

...

   Create the OMOP views

 

...

During the CRC Data Installation we will be working with the crcdata directory. Within this directory are the files we will be editing to define the database properties, create the crcdata tables and load the sample data provided with the i2b2 on OMOP data package.

...

 

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleChange Directory Command

indent
Level1

CD YOUR_I2B2_DATA_DIR\i2b2_omop_data\{oracle|sqlserver}\CRCdata

 

...

Excerpt
html-text
<div class="i2b2-panel">
        <table class="i2b2-important">
            <colgroup>
                <col width="24">
                <col>
            </colgroup>
            <tbody>
                <tr>
                    <th>
                        <img src="https://community.i2b2.org/wiki/download/attachments/14091764/icon_important.png" width="16" height="16" align="absmiddle" alt="important" border="0">
                    </th>
                    <th>
                        <b>Important</b>
                    </th>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>The change directory command shown above is written for Windows. The command itself is the same for both Linux and Windows with the only exceptions being the slashes in the path name and Linux does not include the "drive".
					<br>
					<ul>
						<li><i>Linux Path:</i> use a forward slash.</li>
						<li><i>Windows Path:</i> use a backward slash.</li>
					</ul>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

...

indent
Level2

Windows Command:  CD C:\opt\data\i2b2_omop_data\oracle\CRCdata

indent
Level2

Linux Command:  CD /opt/data/i2b2_omop_data/oracle/CRCdata

 

...

 

Excerpt

As stated earlier each i2b2 database schema has a corresponding directory that contains the data files for installing the data. Each of these directories has a file called db.properties and it needs to be updated with your environment variables.

Steps for setting database properties

Assumptions:

  • You are logged into the command line application for your environment. (Linux: Terminal or Shell Windows: Command Prompt).
  • You have already changed your working directory to the one that is appropriate for this installation.

Instructions:

1. At the command prompt type the following:

 

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleLinux Command

      open db.properties

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleWindows Command

      db.properties

 

2. The db.properties file will open. Set the following properties for the DBMS at your site:

 

html-text
<div class="i2b2-panel">
    <table class="i2b2-important">
        <colgroup>
            <col width="24">
            <col>
        </colgroup>
        <tbody>
            <tr>
                <td>
                    <img src="https://community.i2b2.org/wiki/download/attachments/14091764/icon_important.png" width="16" height="16" align="absmiddle" alt="info" border="0">
                </td>
                <td>
                    <b>Important</b>
                    <br>For the purpose of this document, when you set the database properties make sure you set the user to <b>i2b2demodata</b> and the project to <b>demo</b>.
                </td>
            </tr>
        </tbody>
    </table>
</div>

...

borderColor#ccc
bgColor#ffffff
titleBGColor#E5DFEC
borderStylesolid
titleDatabase Properties File

Oracle Database

db.type=oracle

db.username=i2b2demodata

db.password=demouser

db.server=LocationOfYourDatabase:1521:xe

db.driver=oracle.jdbc.driver.OracleDriver

db.url=jdbc:oracle:thin:@LocationOfYourDatabase:1521:xe

db.project=omop

PostgreSQL Database

db.type=postgresql

db.username=i2b2demodata

db.password=demouser

db.driver=org.postgresql.Driver

db.url=jdbc:postgresql://LocationOfYourDatabase/i2b2?searchpath=i2b2demodata

db.project=omop

SQL Server Database

db.type=sqlserver

 db.username=i2b2demodata

 db.password=demouser

 db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

 db.url=jdbc:sqlserver://LocationOfYourDatabase:1433;database=demo

 db.project=omop

 

3. Save the changes and close the file.

html-text
<div class="i2b2-panel">
    <table class="i2b2-tip">
        <colgroup>
            <col width="24">
            <col>
        </colgroup>
        <tbody>
            <tr>
                <td>
                    <img src="https://community.i2b2.org/wiki/download/attachments/14091764/icon_tip.png" width="16" height="16" align="absmiddle" alt="info" border="0">
                </td>
                <td>
                    <b>Tip</b>
                    <br>To save yourself steps, DO NOT close your Command Prompt window as you will be continuing to use it throughout the remainder of the installation.
                </td>
            </tr>
        </tbody>
    </table>
</div>

 

...

The third step in the crcdata installation process is to create the crcdata tables, indexes and sequences by running the following command:

...

 

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleLinux Run Command

indent
Level1

ant -f data_build.xml create_crcdata_tables

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleWindows Run Command

indent
Level1

%ANT_HOME%\bin\ant.bat -f data_build.xml create_crcdata_tables

 

 

html-text
<div class="i2b2-panel">
    <table class="i2b2-note">
        <colgroup>
            <col width="24">
            <col>
        </colgroup>
        <tbody>
            <tr>
                <td>
                    <img src="https://community.i2b2.org/wiki/download/attachments/14091764/icon_note.png" width="16" height="16" align="absmiddle" alt="info" border="0">
                </td>
                <td>
                    <b>Note</b>
                    <br>If the command %ANT_HOME% does not work it may be because you did not set your environment variables <i>(For more information, see the Requirements Chapter in the i2b2 Installation Guide)</i>. If you do not wish to set this variable then you will need to replace %ANT_HOME% with the full path to your Ant directory.
                </td>
            </tr>
        </tbody>
    </table>
</div>
 

 

 

...

The fourth step in the crcdata installation process is to create the stored procedures for the tables

...

 

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleLinux Run Command

indent
Level1

ant -f data_build.xml create_procedures

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleWindows Run Command

indent
Level1

%ANT_HOME%\bin\ant.bat -f data_build.xml create_procedures

html-text
<div class="i2b2-panel">
    <table class="i2b2-note">
        <colgroup>
            <col width="24">
            <col>
        </colgroup>
        <tbody>
            <tr>
                <td>
                    <img src="https://community.i2b2.org/wiki/download/attachments/14091764/icon_note.png" width="16" height="16" align="absmiddle" alt="info" border="0">
                </td>
                <td>
                    <b>Note</b>
                    <br>If the command %ANT_HOME% does not work it may be because you did not set your environment variables <i>(For more information, see the Requirements Chapter in the i2b2 Installation Guide)</i>. If you do not wish to set this variable then you will need to replace %ANT_HOME% with the full path to your Ant directory.
                </td>
            </tr>
        </tbody>
    </table>
</div>

 

...

The fifth in the Crcdata installation process is to load the data into the tables by running the following command:

...

 

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleLinux Run Command

indent
Level1

ant -f data_build.xml db_load_crc_data

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleWindows Run Command

indent
Level1

%ANT_HOME%\bin\ant.bat -f data_build.xml db_load_crc_data

html-text
<div class="i2b2-panel">
    <table class="i2b2-note">
        <colgroup>
            <col width="24">
            <col>
        </colgroup>
        <tbody>
            <tr>
                <td>
                    <img src="https://community.i2b2.org/wiki/download/attachments/14091764/icon_note.png" width="16" height="16" align="absmiddle" alt="info" border="0">
                </td>
                <td>
                    <b>Note</b>
                    <br>The loading of the Crcdata may take an extended period of time (over several hours) due to the amount of sample data provided.
                </td>
            </tr>
        </tbody>
    </table>
</div>

 

...

The sixth and final step in the crcdata installation process is to create the OMOP view by running the following command:

...

 

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleLinux Run Command

indent
Level1

ant -f data_build.xml create_omop_views

Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleWindows Run Command

indent
Level1

%ANT_HOME%\bin\ant.bat -f data_build.xml create_omop_views