Health Ontology Mapper
Space shortcuts
Space Tools

 

 

 

 

 

 

 

 

 

Path Translator

Installation Document - 1.0

 

 

 

 

 

Table of Contents

 

Table of Contents

Document Version History

Pre-requisites for Path Translator

Path Translator Install and Execution Instructions

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Document Version History

 

Date

Version

Description

Author(s)

07/15/2011

1.0

Initial version

Prakash Lakshminarayanan

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pre-requisites for Path Translator

 

  • Sun JDK 1.5

http://java.sun.com/javase/downloads/index_jdk5.jsp

 

 

Path Translator Install and Execution Instructions

 

  • The Path Translator translates individual terms in the input Concept Path to unique 3 character terms and returns a path that is deterministic.  Basically, for a given concept path the resultant path is always the same.  Also, the resultant path is guaranteed to be collision free as long as individual terms in the input Concept Path does not exceed 255 chars.  To install Path Translator download the executable (PathTranslator.jar) from Released Builds section (available under Released Builds and Documentation).      

 

  • Extract the executable onto a local folder using the following command:

jar xvf PathTranslator.jar

 

  • Configure the logger properties in log4j.properties (found under extraction folder).

 

  • Execute the Path Translator (from the extraction directory) by passing in a Concept Path as the parameter.  If the concept path contains space, enclose it within double-quotes and remove any trailing backslashes.  And if you run into class not found issues set the class-path to current directory.   

java com.ucsf.mapper.common.ConceptPathTranslator <concept_path>

 

  • Alternatively, if you do not want to log the output you may directly execute the Path Translator jar from the extraction folder as shown below.   Restrictions mentioned above for concept path containing spaces apply in this scenario too.

java -jar PathTranslator.jar <concept_path>

 

  • On successful execution the Path Translator displays the translated path consisting of 3 character terms. 

 

  • The Path Translator could also be invoked from other Java programs by placing the jar file in your class-path and invoking the translatePath method of the ConceptPathTranslator class as shown:

 

import com.ucsf.mapper.common.ConceptPathTranslator;

 

public class PathTranslatorTest {

 

/**

* @param args

*/

public static void main(String[] args) {

ConceptPathTranslator cptTranslator = new ConceptPathTranslator();

String conceptPath = "\\i2b2\\Diagnoses\\Symptoms, signs, and ill-defined conditions (780-799)\\Nonspecific abnormal findings (790-796)\\(792) Nonspecific abnormal findin~\\(792-3) Nonspecific abnormal find~\\" ;

String translatedPath = cptTranslator.translatePath(conceptPath);

System. out .println( "Translated Path: " + translatedPath);

 

}

 

}

 

  • The output of the above program is as shown:

Translated Path: \ASi\AV3\EjD\D4R\Bw0\BnG\