• No results found

Setfinder Query – Temp Table Properties

In document i2b2 Installation Guide (Page 168-178)

CRC Properties Configuration

Step 11: CRC properties: Configure the optional “performance” properties

10.4.4.2.5 Setfinder Query – Temp Table Properties

A simple setfinder query is one that does not use a temp table during the querying process. The ability to not use a temp table will speed up the process of running a query against your database. The maximum number of items that can be in a query without using a temp table is defined in the CRC setfinder query without using temp table section of the crc.properties file.

1. In the crc.properties file scroll to the section called CRC setfinder query without using temp table.

2. Edit the default value to reflect the maximum number of items that can be in a query before using the temp table.

CRC setfinder query without using temp table edu.harvard.i2b2.crc.setfinderquery.skiptemptable.maxconcept=40

3. Save your changes. You can close the file if you do not want to edit any more of the optional properties defined in the next few sections.

10.4.5 Data Source Configuration

Step 12: Configure the data sources

The CRC cell needs to communicate with your i2b2 database and in order to do this it needs to know where the tables for the demodata and reside. Therefore the and in the cell configuration process is to configure the data sources for the CRC Cell. This

hivedata twelfth final step

information is configured in the crc-ds.xml file.

Things to keep in mind when configuring your datasources:

The demodata and hivedata tables were created during the chapter on Data Installation.

The CRCBootStrapDS points to the data source for your CRC_DB_LOOKUP table which is a hivedata table.

The <user-name> and <password> need to match the database user you set up for your hivedata. In the i2b2 demo database this is i2b2hive and demouser.

The QueryToolDemoDS points to the data source for your demodata tables.

The <user-name> and <password> need to match the database user you set up for your demodata. In the i2b2 demo database this is i2b2demodata and demouser.

The <connection_url> needs to have the following:

The correct JDBC information for your type of database.

The correct location of the database containing your crcdata or hivedata tables. (These may or may not reside in the same location)

Both the <driver-class> and <driver> need to accurately reflect the type of database you are connecting to.

Steps to configure data sources

The following steps define how to configure your data sources for the CRC Cell. These steps include example configurations for Oracle, PostreSQL and SQL Server.

1. The crc-ds.xml file is located in the following directory:

YOUR_I2B2_SRC_DIR\edu.harvard.i2b2.crc\etc\jboss

2. Open the crc-ds.xml file to configure your data sources. (see examples shown below)

Oracle Database

<datasource jta="false" jndi-name="java:/CRCBootStrapDS"

<datasource jta="false" jndi-name="java:/CRCBootStrapDS"

<datasource jta="false" jndi-name="java:/CRCBootStrapDS"

3. If your environment has multiple projects pointing to different data sources then copy the <datasource> section for each project data source.

4. Update the jndi-name and pool-name to reflect the name of the second project . Example: A second project called Demo2 would have the following entry:

Second Data Source Configuration

<datasource jta="false" jndi-name="java:/QueryToolDemoDS"

The above example is for an Oracle database. If your database is SQL Server or PostgreSQL then you will need to copy the

<datasource> section for your type database connection. Do not use this one as it will not work.

5. Save the changes and close the file.

10.5 Deployment

The deployment process at this stage of the installation will install the Data Repository (CRC) Cell on the JBoss Web Server.

Deploy edu.harvard.i2b2.crc

The following steps will walk you through the deployment process. The commands on a Windows Server may differ slightly on a Linux Machine and will be noted when appropriate.

Step 1: Change working directory

The first step in the deployment process is to change your working directory to the location of your edu.harvard.i2b2.crc.

Change Directory Command CD YOUR_I2B2_SRC_DIR\edu.harvard.i2b2.crc

Important

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".

Linux Path: use a forward slash.

Windows Path: use a backward slash.

EXAMPLES:

Linux Command: CD /opt/i2b2/edu.harvard.i2b2.crc Windows Command: CD C:\opt\i2b2\edu.harvard.i2b2.crc

Step 2: Deploy edu.harvard.i2b2.crc

The second and final step in the deployment process is to run the Ant script to deploy edu.harvard.i2b2.server.crc.

Select the command line that is appropriate for your environment.

Linux Run Command ant -f master_build.xml clean build-all deploy

Windows Run Command

%ANT_HOME%\bin\ant.bat -f master_build.xml clean build-all deploy

Note

If the commands ant or %ANT_HOME% do not work it may be because you did not set your environment variables as suggested in the Requirements Chapter. 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.

Provided there were no problems running the script you will see Build Successful when the script finishes and the edu.harvard.i2b2.crc has been deployed.

10.6 Start Services

Start JBoss

Once the cell has been deployed the JBoss Server has to be running in order to use the i2b2. The process of starting your JBoss Server

depends on your environment and the appropriate steps have been outlined in one of the following sections.

If your JBoss is running as a Linux Service please proceed to the section on this page titled Start JBoss Linux Service. If your JBoss is running as a Windows Service please proceed to the section on this page titled Start JBoss Windows Service.

Start JBoss Linux Service

The following steps will walk you through the process of starting your JBoss server via a Linux service.

Note

These steps are written as if your JBoss Server is running as a Linux service. If you have not setup your JBoss to run as a Linux service and would like to do so please see Run JBoss as a Linux Service in the Requirements Chapter.

1. Open the terminal on your server.

2. Enter the following command to start JBoss.

Stop JBoss Command /etc/init.d/jboss start

3. The script to start JBoss will run.

Start JBoss Windows Service

The following steps will walk you through the process of starting your JBoss server via a windows service.

Note

These steps are written as if your JBoss Server is running as a Windows service. If you have not setup your JBoss to run as a Windows service and would like to do so please see Run JBoss Web Server as a Windows Service in the Requirements

. Chapter

1. Go to your Administrative Tools directory a. Click on Start and select Control Panel.

b. In the Control Panel click on System and Security. c. Click on Administrative Tools

2. Double click on Services to display a list of local services installed on your server.

3. Scroll to the service called JBoss Application Server 7.0.0.Final.

Important

The actual name that appears in the list of services depends on what you entered in the service.bat file for the SVCDISP setting.

4. Using the mouse, right click on the name of the service to display the pop-up menu.

5. Select Start to start the service.

6. A window will open displaying the progress.

7. The progress window will close once the service has started running.

10.7 Update CRC Cell Data in i2b2 Admin

Now that you have installed the CRC cell the next step is to update the cell data in the i2b2 Administration Module. The following steps will guide you through the process of editing existing cell data.

Important

In the Data Installation chapter, the cell data for the required i2b2 core cells was loaded into the cell data table when installing the Pmdata.

By default the cells are configured to work with the i2b2 demo database. This means localhost and port 9090 are part of the cell’s address.

You will need to edit the cells data if you changed any of default settings.

You can skip this step if you did not change the default settings.

To be safe you may want to review the default settings at least once to determine if anything is different in your environment.

Edit Existing Cell Data

1. Log into the i2b2 Administration Module.

http://localhost/admin

2. Click on Manage Cells located in the navigation panel on the left.

3. The Manage Cells page will display in the panel on the right.

4. In the left navigation panel, click on Data Repository to display the edit page.

5. Modify the Cell URL to the IP or domain name that the CRC cell is located.

6. Click on Save to file the changes in the table.

The i2b2 Web Client and Workbench will now be able to connect to the CRC cell. For additional setup information regarding projects, users, parameters, etc. please see the chapter titled Initial Setup

10.8 Update Path in CRC Tables

Important

You only need to update the QT_BREAKDOWN_PATH table if you loaded your own metadata during the Data Installation process.

If you loaded the data that is supplied in the metadata and crcdata (demodata) packages then no changes are necessary.

If you loaded your own metadata then you need to change the entries in the VALUE column of the

QT_BREAKDOWN_PATH table to point to the metadata key (TABLE_CD\FULLNAME) for your analysis breakdowns.

In document i2b2 Installation Guide (Page 168-178)