Health Ontology Mapper
Space shortcuts
Space Tools

 

 

 

 

 

 

 

 

 

Health Ontology Mapper Installation Document (1.3)

 

 

 

 

 

Table of Contents

 

Table of Contents

Document Version History

OntoMapper Installation Instructions

Mapping Interpreter Install and Execution Instructions

Installing HOM in a SQL Server Environment

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Document Version History

 

Date

Version

Description

Author(s)

12/10/2009

1.0

Initial version

Prakash Lakshminarayanan

02/09/2010

1.1

Updated for RxNorm

Prakash Lakshminarayanan

03/01/2010

1.2

Updated with SQL DB conversion notes

Elishema Fishman (UW)

03/03/2010

1.3

Updated with DB table detail for RxNorm

Prakash Lakshminarayanan

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OntoMapper Installation Instructions

 

  • Download OntoMapper source from Recom SVN repository:

http://svn.recomdata.com/osr/OntologyMapper/trunk/IDR

 

  • Create I2B2-OntoMapper schema per your database environment.

  http://wiki.recomdata.com/download/attachments/3866908/IDR_Schema_v1.5.gif

 

Execute the following scripts for Sybase IQ:

http://wiki.recomdata.com/download/attachments/3866908/I2B2DEMODATA_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/I2B2METADATA_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/I2B2WORKDATA_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/I2B2HIVE_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/Alter_I2B2DEMODATA_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/Alter_I2B2METADATA_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/I2B2_Metadata_Insert_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/OntoMapper_Metadata_Insert_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/Pharmacy_Cpt_IQ.sql

http://wiki.recomdata.com/download/attachments/3866908/Pharmacy_Obs_IQ.sql

 

Execute the following scripts for Oracle:

http://wiki.recomdata.com/download/attachments/3866908/I2B2DEMODATA_Oracle.sql

http://wiki.recomdata.com/download/attachments/3866908/I2B2METADATA_Oracle.sql

http://wiki.recomdata.com/download/attachments/3866908/I2B2WORKDATA_Oracle.sql

http://wiki.recomdata.com/download/attachments/3866908/I2B2HIVE_Oracle.sql

http://wiki.recomdata.com/download/attachments/3866908/Alter_I2B2DEMODATA_Oracle.sql

http://wiki.recomdata.com/download/attachments/3866908/I2B2_Metadata_Insert_Oracle.sql

http://wiki.recomdata.com/download/attachments/3866908/OntoMapper_Metadata_Insert_Oracle.sql

http://wiki.recomdata.com/download/attachments/3866908/Pharmacy_Cpt_Oracle.sql

http://wiki.recomdata.com/download/attachments/3866908/Pharmacy_Obs_Oracle.sql

 

  • Configure dataSource properties per your environment in applicationContext.xml.  Both ‘dataSource’ and ‘i2b2MetadataDataSource’ needs to be modified.

WebContent\WEB-INF\applicationContext.xml

 

  • Change the file (IRB & IACUC Approval file) upload folder in upload.properties per your environment.

src\upload.properties

 

  • Configure the logger properties in log4j.properties.

src\log4j.properties

 

  • Build the OntoMapper application by executing the ANT build file buildIDR.xml located under the root directory.

ant -f buildIDR.xml

 

http://localhost:8080/IDR/jsp/Login.jsf

 

Mapping Interpreter Install and Execution Instructions

 

  • Configure the database properties per your environment in mapper.properties found under the root directory.  User credentials for i2b2demodata and i2b2metadata schema need to be configured.

 

  • Change the file (mapper instance xml file) upload folder property (UPLOAD_DIR) in mapper.properties per your environment.

 

  • Configure the logger properties in log4j.properties.

src\log4j.properties

 

  • Configure the RxNormMapper.xml file found under xml folder.  The ‘sourceConceptPath’ and ‘expression’ tags in RxNormMapper.xml file need to be configured as shown prior to execution.  The ‘expression’ tag can also be configured with a different drug name and its corresponding ‘sourceConceptPath’.  Per the RxNorm data load scripts (Pharmacy_xx_xx.sql) mentioned above the concept path for any drug can be located by looking up the CONCEPT_PATH column against the drug name mentioned in the NAME_CHAR column. These columns are referenced from   CONCEPT_DIMENSION table available in the i2b2demodata schema.  When changing concept paths the ‘name’ tag under ‘provenance’ needs to be updated with a new name for the map. 

  < inputSet >

    < sourceConceptSet >

< sourceConceptPath > \00Pharmacy\000000000P\0013118446\

</ sourceConceptPath >

    </ sourceConceptSet >

  </ inputSet >

 

  < scriptlet language = "RxNorm" >

< column sourceColumn = "tval_char" targetColumn = "tval_char" sourceType = "string" targetType = "string" >

  < expression > protease </ expression >

  </ column >

  </ scriptlet >

 

  • Build the Mapping Interpreter by executing the ANT build file build.xml found under the root directory.

ant -f build.xml

 

  • Execute the generated Mapper.jar (found under the root directory) by passing requisite parameters.  The Mapping Interpreter takes an xml file (mapper instance file) as input.

java -jar Mapper.jar file=xml\RxNormMapper.xml

 

  • Once a mapper instance file is executed it could be re-run by supplying its id found in MAP_DIMENSION table of I2B2DEMODATA schema.

java -jar Mapper.jar id=1

 

  • To execute the mapper for all the drugs in database use RxNormMapperBulk.xml file (found under xml folder) after configuring ‘sourceConceptPath’ as shown (per the included Pharmacy data scripts).  For other data sources the root node of the drug concept paths in CONCEPT_DIMENSION table (i2b2demodata schema) needs to be mentioned here.  Also ensure that wildcard character ‘*’ is used in ‘expression’ tag for bulk execution.

< sourceConceptPath > \00Pharmacy\ </ sourceConceptPath >

 

 


Installing HOM in a SQL Server Environment

 

The HOM project offers two schemas, Sybase and a backported version of an Oracle database.  If installing i2b2 in a Sybase environment, the HOM schemas do not need to be altered. 

The Sybase and SQL Server tables are quite similar, and therefore require few changes to the schema set.   For this reason, it is recommended to install the Sybase version schemas that are shipped with HOM in a SQL server environment.  ( Note : It is assumed that all the type changes were initially updated when converting to the Sybase schema from the Oracle version.)

 

When converting to SQL Server, the following changes must be made to the Sybase schema:

  • Groupings : Parentheses must be added intermittently.
  • Index updates : In Sybase one can index an arbitrary number of column values.  In SQL server there is a MAX index of 15, so an arbitrary index is not possible.   Because there is no way to translate this change in indexes these optimizations are no longer possible, and there may be unknown ramifications.
  • Translation to large variable length strings :  In Sybase, the value for VAR CHAR is 8192, which is outside the range of acceptable values in SQL Server.  In the SQL Server schema, the VAR CHAR value must be switched to MAX, around 9600 (may be hardware dependent).    
  • Sequences disparities : Sybase uses an auto-increment feature for Sequences, while SQL Server uses Identity.  This must be switched manually in the schema.

 

Noteworthy concerns:

  • i2b2 ships with SQL server and Oracle, but after these changes have been made i2b2 will be running the Sybase version of schemas.   The various updates to the schema set may result in various type differences (e.g., a 20 bit integer in the original version may result in a 32 or 16 bit integer in the Sybase version).   These potential misalignments are not completely understood; though, it is presumed that these misalignments were thoughtfully considered and discussed before implementation.  
    • Result : You may potentially notice an impact to data imports, if you were to pull in data from the original SQL Server schema because the amount of data inside of the system makes it difficult to determine the variation in data types and precision. 

 

  • The XML_ Result _ ID column of the QT_XML_Result table in the i2b2demodata schema failed to import.  This resulted in the failed import of the entire table.   Further investigation revealed that these tables are not used, so this issue is unimportant.   (NOTE: this could be unique to the UW environment, but it may be an issue that is fundamental to Sybase and SQL Server)  

 

  • When installing HOM, be sure to check the version being installed, since version 1.1 of the schema doesn’t include all patches and alterations.