ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1704909 - in /ctakes/trunk/ctakes-dictionary-lookup-fast/src: main/java/org/apache/ctakes/dictionary/lookup2/concept/ main/java/org/apache/ctakes/dictionary/lookup2/consumer/ main/java/org/apache/ctakes/dictionary/lookup2/dictionary/ main/...
Date Wed, 23 Sep 2015 18:00:15 GMT
Author: seanfinan
Date: Wed Sep 23 18:00:14 2015
New Revision: 1704909

URL: http://svn.apache.org/viewvc?rev=1704909&view=rev
Log:
CTAKES-378 Added flexibility to use any cui-[type] concept table in a jdbc db.  Involved a
fair amount of refactoring.

Added:
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/DefaultConcept.java
      - copied, changed from r1703273, ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java
Removed:
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/ConceptCode.java
Modified:
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/JdbcConceptFactory.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/MemConceptFactory.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/consumer/DefaultTermConsumer.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/JdbcRareWordDictionary.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/DefaultDictionarySpec.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/ae/TestDictionaryLoadResources.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/resources/org/apache/ctakes/dictionary/lookup/fast/TestcTakesHsql.xml

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java
Wed Sep 23 18:00:14 2015
@@ -5,13 +5,11 @@ import org.apache.ctakes.dictionary.look
 import org.apache.ctakes.dictionary.lookup2.util.LookupUtil;
 import org.apache.ctakes.dictionary.lookup2.util.TuiCodeUtil;
 import org.apache.ctakes.dictionary.lookup2.util.collection.CollectionMap;
-import org.apache.ctakes.dictionary.lookup2.util.collection.EnumSetMap;
+import org.apache.ctakes.dictionary.lookup2.util.collection.HashSetMap;
 import org.apache.log4j.Logger;
 import org.apache.uima.UimaContext;
 
 import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -40,11 +38,11 @@ final public class BsvConceptFactory imp
       final Collection<CuiTuiTerm> cuiTuiTerms = parseBsvFile( bsvFilePath );
       final Map<Long, Concept> conceptMap = new HashMap<>( cuiTuiTerms.size()
);
       for ( CuiTuiTerm cuiTuiTerm : cuiTuiTerms ) {
-         final CollectionMap<ConceptCode, String, ? extends Collection<String>>
codes
-               = new EnumSetMap<>( ConceptCode.class );
-         codes.placeValue( ConceptCode.TUI, TuiCodeUtil.getAsTui( cuiTuiTerm.getTui() ) );
+         final CollectionMap<String, String, ? extends Collection<String>> codes
+               = new HashSetMap<>();
+         codes.placeValue( Concept.TUI, TuiCodeUtil.getAsTui( cuiTuiTerm.getTui() ) );
          conceptMap.put( CuiCodeUtil.getInstance().getCuiCode( cuiTuiTerm.getCui() ),
-               new Concept( cuiTuiTerm.getCui(), cuiTuiTerm.getPrefTerm(), codes ) );
+               new DefaultConcept( cuiTuiTerm.getCui(), cuiTuiTerm.getPrefTerm(), codes )
);
       }
       _delegateFactory = new MemConceptFactory( name, conceptMap );
    }
@@ -116,7 +114,7 @@ final public class BsvConceptFactory imp
                // Add to the dictionary
                cuiTuiTerms.add( cuiTuiTerm );
             } else {
-               LOGGER.warn( "Bad BSV line " + line + " in " + bsvFilePath);
+               LOGGER.warn( "Bad BSV line " + line + " in " + bsvFilePath );
             }
             line = reader.readLine();
          }
@@ -148,8 +146,9 @@ final public class BsvConceptFactory imp
       final String cui = columns[ cuiIndex ];
       // default for an empty tui column is tui 0 = unknown
       final String tui = (columns[ tuiIndex ].trim().isEmpty()) ? "T000" : columns[ tuiIndex
].trim();
-      final String term = (termIndex < 0 || columns[ termIndex ].trim().isEmpty()) ? ""
: columns[ termIndex ].trim();
-      return new CuiTuiTerm( cui, tui, term );
+      final String preferredTerm = (termIndex < 0 || columns[ termIndex ].trim().isEmpty())
? "" : columns[ termIndex ]
+            .trim();
+      return new CuiTuiTerm( cui, tui, preferredTerm );
    }
 
    static public class CuiTuiTerm {

Copied: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/DefaultConcept.java
(from r1703273, ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java)
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/DefaultConcept.java?p2=ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/DefaultConcept.java&p1=ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java&r1=1703273&r2=1704909&rev=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/DefaultConcept.java
Wed Sep 23 18:00:14 2015
@@ -2,7 +2,7 @@ package org.apache.ctakes.dictionary.loo
 
 import org.apache.ctakes.dictionary.lookup2.util.SemanticUtil;
 import org.apache.ctakes.dictionary.lookup2.util.collection.CollectionMap;
-import org.apache.ctakes.dictionary.lookup2.util.collection.EnumSetMap;
+import org.apache.ctakes.dictionary.lookup2.util.collection.HashSetMap;
 import org.apache.ctakes.dictionary.lookup2.util.collection.ImmutableCollectionMap;
 import org.apache.ctakes.typesystem.type.constants.CONST;
 
@@ -17,32 +17,42 @@ import java.util.HashSet;
  * Date: 11/20/13
  */
 @Immutable
-final public class Concept {
-
-   static public final String PREFERRED_TERM_UNKNOWN = "Unknown Preferred Term";
+final public class DefaultConcept implements Concept {
 
    final private String _cui;
    final private String _preferredText;
-   final private CollectionMap<ConceptCode, String, ? extends Collection<String>>
_codes;
+   final private CollectionMap<String, String, ? extends Collection<String>>
_codes;
    final private Collection<Integer> _ctakesSemantics;
 
    final private int _hashcode;
 
-   public Concept( final String cui ) {
+   /**
+    * @param cui -
+    */
+   public DefaultConcept( final String cui ) {
       this( cui, "" );
    }
 
-   public Concept( final String cui, final String preferredText ) {
-      this( cui, preferredText, new EnumSetMap<ConceptCode, String>( ConceptCode.class
) );
+   /**
+    * @param cui           -
+    * @param preferredText -
+    */
+   public DefaultConcept( final String cui, final String preferredText ) {
+      this( cui, preferredText, new HashSetMap<String, String>() );
    }
 
-   public Concept( final String cui, final String preferredText,
-                   final CollectionMap<ConceptCode, String, ? extends Collection<String>>
codes ) {
+   /**
+    * @param cui           -
+    * @param preferredText -
+    * @param codes         collection of coding scheme names and this concept's codes for
those schemes
+    */
+   public DefaultConcept( final String cui, final String preferredText,
+                          final CollectionMap<String, String, ? extends Collection<String>>
codes ) {
       _cui = cui;
       _preferredText = preferredText;
       _codes = new ImmutableCollectionMap<>( codes );
       final Collection<Integer> ctakesSemantics = new HashSet<>();
-      for ( String tui : getCodes( ConceptCode.TUI ) ) {
+      for ( String tui : getCodes( TUI ) ) {
          // Attempt to obtain one or more valid type ids from the tuis of the term
          ctakesSemantics.add( SemanticUtil.getTuiSemanticGroupId( tui ) );
       }
@@ -53,10 +63,18 @@ final public class Concept {
       _hashcode = cui.hashCode();
    }
 
+   /**
+    * {@inheritDoc}
+    */
+   @Override
    public String getCui() {
       return _cui;
    }
 
+   /**
+    * {@inheritDoc}
+    */
+   @Override
    public String getPreferredText() {
       if ( _preferredText != null ) {
          return _preferredText;
@@ -64,17 +82,34 @@ final public class Concept {
       return PREFERRED_TERM_UNKNOWN;
    }
 
-   public Collection<String> getCodes( final ConceptCode codeType ) {
+   /**
+    * {@inheritDoc}
+    */
+   @Override
+   public Collection<String> getCodeNames() {
+      return _codes.keySet();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   @Override
+   public Collection<String> getCodes( final String codeType ) {
       return _codes.getCollection( codeType );
    }
 
    /**
-    * @return the type of term that exists in the dictionary: Anatomical Site, Disease/Disorder,
Drug, etc.
+    * {@inheritDoc}
     */
+   @Override
    public Collection<Integer> getCtakesSemantics() {
       return _ctakesSemantics;
    }
 
+   /**
+    * {@inheritDoc}
+    */
+   @Override
    public boolean isEmpty() {
       return (_preferredText == null || _preferredText.isEmpty()) && _codes.isEmpty();
    }
@@ -85,7 +120,7 @@ final public class Concept {
     */
    @Override
    public boolean equals( final Object value ) {
-      return value instanceof Concept && _cui.equals( ((Concept)value)._cui );
+      return value instanceof Concept && _cui.equals( ((DefaultConcept)value)._cui
);
    }
 
    /**

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/JdbcConceptFactory.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/JdbcConceptFactory.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/JdbcConceptFactory.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/JdbcConceptFactory.java
Wed Sep 23 18:00:14 2015
@@ -4,19 +4,14 @@ import org.apache.ctakes.dictionary.look
 import org.apache.ctakes.dictionary.lookup2.util.JdbcConnectionFactory;
 import org.apache.ctakes.dictionary.lookup2.util.TuiCodeUtil;
 import org.apache.ctakes.dictionary.lookup2.util.collection.CollectionMap;
-import org.apache.ctakes.dictionary.lookup2.util.collection.EnumSetMap;
+import org.apache.ctakes.dictionary.lookup2.util.collection.HashSetMap;
 import org.apache.log4j.Logger;
 import org.apache.uima.UimaContext;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Properties;
+import java.sql.*;
+import java.util.*;
 
-import static org.apache.ctakes.dictionary.lookup2.concept.ConceptCode.*;
+import static org.apache.ctakes.dictionary.lookup2.util.JdbcConnectionFactory.*;
 
 /**
  * Author: SPF
@@ -25,30 +20,89 @@ import static org.apache.ctakes.dictiona
  */
 public class JdbcConceptFactory extends AbstractConceptFactory {
 
-
    // LOG4J logger based on class name
    static final private Logger LOGGER = Logger.getLogger( "JdbcConceptFactory" );
 
+   static private final String TABLE_KEY_SUFFIX = "TABLE";
+   static private final String INT_CLASS = "INT";
+   static private final String LONG_CLASS = "LONG";
+   static private final String TEXT_CLASS = "TEXT";
+   static private final String TUI_CLASS = Concept.TUI;
+   static private final String PREFTERM_CLASS = Concept.PREFTERM;
+
+
+   private final Collection<ConceptTableInfo> _conceptTableInfos;
+
+
+   static private class ConceptTableInfo {
+      //      private final String __tableName;
+      private final String __conceptName;
+      private final String __classType;
+      private final PreparedStatement __preparedStatement;
+
+      private ConceptTableInfo( final String tableName, final String conceptName, final String
classType,
+                                final PreparedStatement preparedStatement ) {
+//         __tableName = tableName;
+         __conceptName = conceptName;
+         __classType = classType;
+         __preparedStatement = preparedStatement;
+      }
+   }
+
+
+   // TODO  In a future release (2 from now = 3.2.5) these -correction- methods should be
removed
+
+   /**
+    * Older tables were declared by type and name.  Now they are declared by table name and
value class type.
+    *
+    * @param tableName older values, actually table type declaration (snomedtable, icd9table,
icd10table)
+    * @return snomedcttable for snomedtable, icd9cmtable and icd10pcstable, otherwise the
provided table name
+    */
+   static private String adjustOldTableName( final String tableName ) {
+      if ( tableName.equalsIgnoreCase( "SNOMEDTABLE" ) ) {
+         return "SNOMEDCTTABLE";
+      } else if ( tableName.equalsIgnoreCase( "ICD9TABLE" ) ) {
+         return "ICD9CMTABLE";
+      } else if ( tableName.equalsIgnoreCase( "ICD10TABLE" ) ) {
+         return "ICD10PCSTABLE";
+      }
+      return tableName;
+   }
 
-   // TODO move to Constants class
-   static private final String JDBC_DRIVER = "jdbcDriver";
-   static private final String JDBC_URL = "jdbcUrl";
-   static private final String JDBC_USER = "jdbcUser";
-   static private final String JDBC_PASS = "jdbcPass";
-   static private final String TUI_TABLE = "tuiTable";
-   static private final String PREF_TERM_TABLE = "prefTermTable";
-   static private final String SNOMED_TABLE = "snomedTable";
-   static private final String RXNORM_TABLE = "rxnormTable";
-   static private final String ICD9_TABLE = "icd9Table";
-   static private final String ICD10_TABLE = "icd10Table";
-
-
-   private PreparedStatement _selectTuiCall;
-   private PreparedStatement _selectPrefTermCall;
-   private PreparedStatement _selectSnomedCall;
-   private PreparedStatement _selectRxNormCall;
-   private PreparedStatement _selectIcd9Call;
-   private PreparedStatement _selectIcd10Call;
+   /**
+    * Older tables were declared by type and name.  Now they are declared by table name and
value class type.
+    *
+    * @param typeOrOldName older values, actually table names (snomedct, rxnorm, icd9cm,
icd10pcs)
+    * @return long for snomedct, text for rxnorm, icd9cm and icd10pcs, otherwise the provided
value class type
+    */
+   static private String adjustOldTableClass( final String typeOrOldName ) {
+      if ( typeOrOldName.equalsIgnoreCase( "SNOMEDCT" ) ) {
+         return LONG_CLASS;
+      } else if ( typeOrOldName.equalsIgnoreCase( "RXNORM" )
+                  || typeOrOldName.equalsIgnoreCase( "ICD9CM" )
+                  || typeOrOldName.equalsIgnoreCase( "ICD10PCS" ) ) {
+         return TEXT_CLASS;
+      }
+      return typeOrOldName;
+   }
+
+
+   /**
+    * @param properties properties that may or may not contain "*Table" key
+    * @return map of table names and table value types
+    */
+   static private Map<String, String> getConceptTables( final Properties properties
) {
+      final Collection<String> keys = properties.stringPropertyNames();
+      final Map<String, String> conceptTables = new HashMap<>();
+      for ( String key : keys ) {
+         final String keyName = key.trim().toUpperCase();
+         if ( !keyName.endsWith( TABLE_KEY_SUFFIX ) ) {
+            continue;
+         }
+         conceptTables.put( adjustOldTableName( keyName ), adjustOldTableClass( properties.getProperty(
key ) ) );
+      }
+      return conceptTables;
+   }
 
 
    public JdbcConceptFactory( final String name, final UimaContext uimaContext, final Properties
properties )
@@ -56,32 +110,23 @@ public class JdbcConceptFactory extends
       this( name,
             properties.getProperty( JDBC_DRIVER ), properties.getProperty( JDBC_URL ),
             properties.getProperty( JDBC_USER ), properties.getProperty( JDBC_PASS ),
-            properties.getProperty( TUI_TABLE ), properties.getProperty( PREF_TERM_TABLE
),
-            properties.getProperty( SNOMED_TABLE ), properties.getProperty( RXNORM_TABLE
),
-            properties.getProperty( ICD9_TABLE ), properties.getProperty( ICD10_TABLE ) );
+            getConceptTables( properties ) );
    }
 
    public JdbcConceptFactory( final String name,
                               final String jdbcDriver, final String jdbcUrl,
                               final String jdbcUser, final String jdbcPass,
-                              final String tuiName, final String prefTermName,
-                              final String snomedName, final String rxnormName,
-                              final String icd9Name, final String icd10Name )
+                              final Map<String, String> conceptTables )
          throws SQLException {
       super( name );
       boolean connected = false;
       try {
          // DO NOT use try with resources here.
          // Try with resources uses a closable and closes it when exiting the try block
-         final Connection connection = JdbcConnectionFactory.getInstance()
-               .getConnection( jdbcDriver, jdbcUrl, jdbcUser, jdbcPass );
+         final Connection connection
+               = JdbcConnectionFactory.getInstance().getConnection( jdbcDriver, jdbcUrl,
jdbcUser, jdbcPass );
          connected = connection != null;
-         _selectTuiCall = createSelectCall( connection, tuiName );
-         _selectPrefTermCall = createSelectCall( connection, prefTermName );
-         _selectSnomedCall = createSelectCall( connection, snomedName );
-         _selectRxNormCall = createSelectCall( connection, rxnormName );
-         _selectIcd9Call = createSelectCall( connection, icd9Name );
-         _selectIcd10Call = createSelectCall( connection, icd10Name );
+         _conceptTableInfos = createTableInfos( connection, conceptTables );
       } catch ( SQLException sqlE ) {
          if ( !connected ) {
             LOGGER.error( "Could not Connect to Concept Factory " + name );
@@ -92,41 +137,56 @@ public class JdbcConceptFactory extends
       }
    }
 
-
    /**
     * {@inheritDoc}
     */
    @Override
    public Concept createConcept( final Long cuiCode ) {
-      final String prefTerm = (_selectPrefTermCall == null) ? null : getPreferredTerm( cuiCode
);
-      final CollectionMap<ConceptCode, String, ? extends Collection<String>>
codes
-            = new EnumSetMap<>( ConceptCode.class );
-      if ( _selectTuiCall != null ) {
-         codes.addAllValues( TUI, getTuis( cuiCode ) );
-      }
-      if ( _selectSnomedCall != null ) {
-         codes.addAllValues( SNOMEDCT, getLongCodes( _selectSnomedCall, cuiCode ) );
-      }
-      if ( _selectRxNormCall != null ) {
-         codes.addAllValues( RXNORM, getLongCodes( _selectRxNormCall, cuiCode ) );
-      }
-      if ( _selectIcd9Call != null ) {
-         codes.addAllValues( ICD9CM, getStringCodes( _selectIcd9Call, cuiCode ) );
-      }
-      if ( _selectIcd10Call != null ) {
-         codes.addAllValues( ICD10PCS, getStringCodes( _selectIcd10Call, cuiCode ) );
+      final CollectionMap<String, String, ? extends Collection<String>> codes
= new HashSetMap<>();
+      String prefTerm = null;
+      for ( ConceptTableInfo conceptTableInfo : _conceptTableInfos ) {
+         switch ( conceptTableInfo.__classType ) {
+            case TUI_CLASS: {
+               codes.addAllValues( conceptTableInfo.__conceptName,
+                     getTuiCodes( conceptTableInfo.__preparedStatement, cuiCode ) );
+               break;
+            }
+            case PREFTERM_CLASS: {
+               prefTerm = getPreferredTerm( conceptTableInfo.__preparedStatement, cuiCode
);
+               break;
+            }
+            case INT_CLASS: {
+               codes.addAllValues( conceptTableInfo.__conceptName,
+                     getIntegerCodes( conceptTableInfo.__preparedStatement, cuiCode ) );
+               break;
+            }
+            case LONG_CLASS: {
+               codes.addAllValues( conceptTableInfo.__conceptName,
+                     getLongCodes( conceptTableInfo.__preparedStatement, cuiCode ) );
+               break;
+            }
+            case TEXT_CLASS: {
+               codes.addAllValues( conceptTableInfo.__conceptName,
+                     getStringCodes( conceptTableInfo.__preparedStatement, cuiCode ) );
+               break;
+            }
+         }
       }
-      return new Concept( CuiCodeUtil.getInstance().getAsCui( cuiCode ), prefTerm, codes
);
+      return new DefaultConcept( CuiCodeUtil.getInstance().getAsCui( cuiCode ), prefTerm,
codes );
    }
 
-
-   private Collection<String> getTuis( final Long cuiCode ) {
-      final Collection<String> tuis = new HashSet<>();
+   /**
+    * @param selectCall jdbc selection call
+    * @param cuiCode    cui of interest
+    * @return collection of tuis that are related to cui as obtained with the selectCall
+    */
+   static private Collection<String> getTuiCodes( PreparedStatement selectCall, final
Long cuiCode ) {
+      final Collection<String> codes = new HashSet<>();
       try {
-         fillSelectCall( _selectTuiCall, cuiCode );
-         final ResultSet resultSet = _selectTuiCall.executeQuery();
+         fillSelectCall( selectCall, cuiCode );
+         final ResultSet resultSet = selectCall.executeQuery();
          while ( resultSet.next() ) {
-            tuis.add( TuiCodeUtil.getAsTui( resultSet.getInt( 2 ) ) );
+            codes.add( TuiCodeUtil.getAsTui( resultSet.getInt( 2 ) ) );
          }
          // Though the ResultSet interface documentation states that there are automatic
closures,
          // it is up to the driver to implement this behavior ...  historically some drivers
have not done so
@@ -134,14 +194,19 @@ public class JdbcConceptFactory extends
       } catch ( SQLException e ) {
          LOGGER.error( e.getMessage() );
       }
-      return tuis;
+      return codes;
    }
 
-   private String getPreferredTerm( final Long cuiCode ) {
+   /**
+    * @param selectCall jdbc selection call
+    * @param cuiCode    cui of interest
+    * @return preferred term for the cui as obtained with the selectCall
+    */
+   static private String getPreferredTerm( PreparedStatement selectCall, final Long cuiCode
) {
       String preferredName = "";
       try {
-         fillSelectCall( _selectPrefTermCall, cuiCode );
-         final ResultSet resultSet = _selectPrefTermCall.executeQuery();
+         fillSelectCall( selectCall, cuiCode );
+         final ResultSet resultSet = selectCall.executeQuery();
          if ( resultSet.next() ) {
             preferredName = resultSet.getString( 2 );
          }
@@ -154,8 +219,34 @@ public class JdbcConceptFactory extends
       return preferredName;
    }
 
+   /**
+    * @param selectCall jdbc selection call
+    * @param cuiCode    cui of interest
+    * @return collection of ints (as strings) that are related to cui as obtained with the
selectCall
+    */
+   static private Collection<String> getIntegerCodes( PreparedStatement selectCall,
final Long cuiCode ) {
+      final Collection<String> codes = new HashSet<>();
+      try {
+         fillSelectCall( selectCall, cuiCode );
+         final ResultSet resultSet = selectCall.executeQuery();
+         while ( resultSet.next() ) {
+            codes.add( Integer.toString( resultSet.getInt( 2 ) ) );
+         }
+         // Though the ResultSet interface documentation states that there are automatic
closures,
+         // it is up to the driver to implement this behavior ...  historically some drivers
have not done so
+         resultSet.close();
+      } catch ( SQLException e ) {
+         LOGGER.error( e.getMessage() );
+      }
+      return codes;
+   }
 
-   private Collection<String> getLongCodes( PreparedStatement selectCall, final Long
cuiCode ) {
+   /**
+    * @param selectCall jdbc selection call
+    * @param cuiCode    cui of interest
+    * @return collection of longs (as strings) that are related to cui as obtained with the
selectCall
+    */
+   static private Collection<String> getLongCodes( PreparedStatement selectCall, final
Long cuiCode ) {
       final Collection<String> codes = new HashSet<>();
       try {
          fillSelectCall( selectCall, cuiCode );
@@ -172,8 +263,12 @@ public class JdbcConceptFactory extends
       return codes;
    }
 
-
-   private Collection<String> getStringCodes( PreparedStatement selectCall, final Long
cuiCode ) {
+   /**
+    * @param selectCall jdbc selection call
+    * @param cuiCode    cui of interest
+    * @return collection of strings that are related to cui as obtained with the selectCall
+    */
+   static private Collection<String> getStringCodes( PreparedStatement selectCall,
final Long cuiCode ) {
       final Collection<String> codes = new HashSet<>();
       try {
          fillSelectCall( selectCall, cuiCode );
@@ -191,19 +286,70 @@ public class JdbcConceptFactory extends
    }
 
    /**
-    * @param tableName -
-    * @throws SQLException if the {@code PreparedStatement} could not be created or changed
+    * Creates table information objects with table name, concept name, jdbc prepared statement
call
+    * @param connection -
+    * @param conceptTables map of table names to table value types
+    * @return table information objects with table name, concept name, jdbc prepared statement
call
+    * @throws SQLException
     */
-   private PreparedStatement createSelectCall( final Connection connection, final String
tableName )
+   static private Collection<ConceptTableInfo> createTableInfos( final Connection connection,
+                                                                 final Map<String,String>
conceptTables )
          throws SQLException {
-      if ( tableName == null || tableName.isEmpty() || tableName.equalsIgnoreCase( "null"
) ) {
-         return null;
+      if ( conceptTables == null || conceptTables.isEmpty() ) {
+         return Collections.emptyList();
       }
-      final String lookupSql = "SELECT * FROM " + tableName + " WHERE CUI = ?";
-      return connection.prepareStatement( lookupSql );
+      final Collection<String> dbTablesNames = getDbTableNames( connection );
+      final Collection<ConceptTableInfo> tableInfos = new ArrayList<>();
+      for ( Map.Entry<String, String> conceptTable : conceptTables.entrySet() ) {
+         String tableName = conceptTable.getKey().trim().toUpperCase();
+         if ( !tableName.endsWith( TABLE_KEY_SUFFIX ) || tableName.length() < 6 ) {
+            LOGGER.error( "Cannot have a concept table named " + tableName );
+            continue;
+         }
+         if ( !dbTablesNames.contains( tableName ) ) {
+            tableName = tableName.substring( 0, tableName.length() - 5 );
+            if ( !dbTablesNames.contains( tableName ) ) {
+               LOGGER.error( "Table " + tableName + TABLE_KEY_SUFFIX
+                             + " and/or " + tableName + " not found in Database" );
+               continue;
+            }
+         }
+         final String tableClass = conceptTable.getValue().trim().toUpperCase();
+         if ( tableClass.isEmpty()
+              || (!tableClass.equals( TUI_CLASS ) && !tableClass.equals( PREFTERM_CLASS
)
+                  && !tableClass.equals( INT_CLASS ) && !tableClass.equals(
LONG_CLASS )
+                  && !tableClass.equals( TEXT_CLASS )) ) {
+            LOGGER.error( "Cannot have a concept table with class " + tableClass );
+            continue;
+         }
+         String conceptName = conceptTable.getKey().trim();
+         conceptName = conceptName.substring( 0, conceptName.length() - 5 );
+         final String lookupSql = "SELECT * FROM " + tableName + " WHERE CUI = ?";
+         final PreparedStatement statement = connection.prepareStatement( lookupSql );
+         tableInfos.add( new ConceptTableInfo( tableName, conceptName, tableClass, statement
) );
+         LOGGER.info( "Connected to concept table " + tableName + " with class " + tableClass
);
+      }
+      return tableInfos;
+   }
+
+   /**
+    * @param connection -
+    * @return all table names in the database
+    * @throws SQLException if something goes wrong
+    */
+   static private Collection<String> getDbTableNames( final Connection connection )
throws SQLException {
+      final DatabaseMetaData metadata = connection.getMetaData();
+      final ResultSet resultSet = metadata.getTables( null, null, "%", null );
+      final Collection<String> tableNames = new ArrayList<>();
+      while ( resultSet.next() ) {
+         tableNames.add( resultSet.getString( "TABLE_NAME" ).toUpperCase() );
+      }
+      resultSet.close();
+      return tableNames;
    }
 
 
+
    /**
     * @param cuiCode -
     * @throws SQLException if the {@code PreparedStatement} could not be created or changed

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/MemConceptFactory.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/MemConceptFactory.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/MemConceptFactory.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/MemConceptFactory.java
Wed Sep 23 18:00:14 2015
@@ -27,7 +27,7 @@ final public class MemConceptFactory ext
    public Concept createConcept( final Long cuiCode ) {
       Concept concept = _conceptMap.get( cuiCode );
       if ( concept == null ) {
-         concept = new Concept( CuiCodeUtil.getInstance().getAsCui( cuiCode ) );
+         concept = new DefaultConcept( CuiCodeUtil.getInstance().getAsCui( cuiCode ) );
          _conceptMap.put( cuiCode, concept );
       }
       return concept;

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/consumer/DefaultTermConsumer.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/consumer/DefaultTermConsumer.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/consumer/DefaultTermConsumer.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/consumer/DefaultTermConsumer.java
Wed Sep 23 18:00:14 2015
@@ -19,7 +19,6 @@
 package org.apache.ctakes.dictionary.lookup2.consumer;
 
 import org.apache.ctakes.dictionary.lookup2.concept.Concept;
-import org.apache.ctakes.dictionary.lookup2.concept.ConceptCode;
 import org.apache.ctakes.dictionary.lookup2.textspan.TextSpan;
 import org.apache.ctakes.dictionary.lookup2.util.CuiCodeUtil;
 import org.apache.ctakes.dictionary.lookup2.util.SemanticUtil;
@@ -65,8 +64,8 @@ final public class DefaultTermConsumer e
          for ( Map.Entry<TextSpan, ? extends Collection<Long>> spanCuis : textSpanCuis
) {
             umlsConceptList.clear();
             for ( Long cuiCode : spanCuis.getValue() ) {
-               umlsConceptList
-                     .addAll( createUmlsConcepts( jcas, defaultScheme, cTakesSemantic, cuiCode,
cuiConcepts ) );
+               umlsConceptList.addAll(
+                     createUmlsConcepts( jcas, defaultScheme, cTakesSemantic, cuiCode, cuiConcepts
) );
             }
             final FSArray conceptArr = new FSArray( jcas, umlsConceptList.size() );
             int arrIdx = 0;
@@ -124,7 +123,7 @@ final public class DefaultTermConsumer e
       }
       final Collection<UmlsConcept> umlsConcepts = new HashSet<>();
       for ( Concept concept : concepts ) {
-         final Collection<String> tuis = concept.getCodes( ConceptCode.TUI );
+         final Collection<String> tuis = concept.getCodes( Concept.TUI );
          if ( !tuis.isEmpty() ) {
             for ( String tui : tuis ) {
                // the concept could have tuis outside this cTakes semantic group
@@ -142,22 +141,22 @@ final public class DefaultTermConsumer e
    static private Collection<UmlsConcept> createUmlsConcepts( final JCas jcas, final
String defaultScheme,
                                                               final String tui, final Concept
concept ) {
       final Collection<UmlsConcept> concepts = new ArrayList<>();
-      for ( ConceptCode secondaryScheme : ConceptCode.values() ) {
-         if ( secondaryScheme == ConceptCode.TUI ) {
+      for ( String codeName : concept.getCodeNames() ) {
+         if ( codeName.equals( Concept.TUI ) ) {
             continue;
          }
-         final Collection<String> codes = concept.getCodes( secondaryScheme );
+         final Collection<String> codes = concept.getCodes( codeName );
          if ( codes == null || codes.isEmpty() ) {
             continue;
          }
          for ( String code : codes ) {
-            concepts.add( createUmlsConcept( jcas, secondaryScheme.name(), concept.getCui(),
tui,
+            concepts.add( createUmlsConcept( jcas, codeName, concept.getCui(), tui,
                   concept.getPreferredText(), code ) );
          }
       }
       if ( concepts.isEmpty() ) {
-         concepts.add( createUmlsConcept( jcas, defaultScheme, concept.getCui(), tui, concept
-               .getPreferredText(), null ) );
+         concepts.add( createUmlsConcept( jcas, defaultScheme, concept.getCui(), tui,
+               concept.getPreferredText(), null ) );
       }
       return concepts;
    }

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java
Wed Sep 23 18:00:14 2015
@@ -27,8 +27,6 @@ import org.apache.log4j.Logger;
 import org.apache.uima.UimaContext;
 
 import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -54,7 +52,7 @@ final public class BsvRareWordDictionary
 
    static private final String BSV_FILE_PATH = "bsvPath";
 
-   private RareWordDictionary _delegateDictionary;
+   final private RareWordDictionary _delegateDictionary;
 
 
    public BsvRareWordDictionary( final String name, final UimaContext uimaContext, final
Properties properties ) {
@@ -63,11 +61,6 @@ final public class BsvRareWordDictionary
 
 
    public BsvRareWordDictionary( final String name, final String bsvFilePath ) {
-//      this( name, new File( bsvFilePath ) );
-//   }
-//
-//   public BsvRareWordDictionary( final String name, final File bsvFile ) {
-//      final Collection<CuiTerm> cuiTerms = parseBsvFile( bsvFile );
       final Collection<CuiTerm> cuiTerms = parseBsvFile( bsvFilePath );
       final CollectionMap<String, RareWordTerm, ? extends Collection<RareWordTerm>>
rareWordTermMap
             = RareWordTermMapCreator.createRareWordTermMap( cuiTerms );
@@ -115,12 +108,10 @@ final public class BsvRareWordDictionary
     * </p>
     * If the TUI column is omitted then the entityId for the dictionary is used as the TUI
     * <p/>
-    * //    * @param bsvFile file containing term rows and bsv columns
     *
     * @param bsvFilePath path to file containing term rows and bsv columns
     * @return collection of all valid terms read from the bsv file
     */
-//   static private Collection<CuiTerm> parseBsvFile( final File bsvFile ) {
    static private Collection<CuiTerm> parseBsvFile( final String bsvFilePath ) {
       InputStream bsvFile = null;
       try {

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/JdbcRareWordDictionary.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/JdbcRareWordDictionary.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/JdbcRareWordDictionary.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/JdbcRareWordDictionary.java
Wed Sep 23 18:00:14 2015
@@ -32,6 +32,8 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
+import static org.apache.ctakes.dictionary.lookup2.util.JdbcConnectionFactory.*;
+
 /**
  * Preferred dictionary to use for large collections of terms.
  * Column indices within the database are constant and not configurable: CUI TUI RINDEX TCOUNT
TEXT RWORD
@@ -59,12 +61,7 @@ final public class JdbcRareWordDictionar
    static final private Logger LOGGER = Logger.getLogger( "JdbcRareWordDictionary" );
 
 
-   // TODO move to Constants class
-   static private final String JDBC_DRIVER = "jdbcDriver";
-   static private final String JDBC_URL = "jdbcUrl";
-   static private final String JDBC_USER = "jdbcUser";
-   static private final String JDBC_PASS = "jdbcPass";
-   static private final String RARE_WORD_TABLE = "rareWordTable";
+   static public final String RARE_WORD_TABLE = "rareWordTable";
 
 
    private PreparedStatement _selectTermCall;
@@ -102,6 +99,7 @@ final public class JdbcRareWordDictionar
          }
          throw sqlE;
       }
+      LOGGER.info( "Connected to cui and term table " + tableName.toUpperCase() );
    }
 
 

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/DefaultDictionarySpec.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/DefaultDictionarySpec.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/DefaultDictionarySpec.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/DefaultDictionarySpec.java
Wed Sep 23 18:00:14 2015
@@ -20,6 +20,7 @@ package org.apache.ctakes.dictionary.loo
 
 import org.apache.ctakes.dictionary.lookup2.concept.Concept;
 import org.apache.ctakes.dictionary.lookup2.concept.ConceptFactory;
+import org.apache.ctakes.dictionary.lookup2.concept.DefaultConcept;
 import org.apache.ctakes.dictionary.lookup2.consumer.TermConsumer;
 import org.apache.ctakes.dictionary.lookup2.dictionary.RareWordDictionary;
 import org.apache.ctakes.dictionary.lookup2.term.RareWordTerm;
@@ -56,7 +57,7 @@ final public class DefaultDictionarySpec
       }
 
       public Concept createConcept( final Long cuiCode ) {
-         return new Concept( CuiCodeUtil.getInstance().getAsCui( cuiCode ) );
+         return new DefaultConcept( CuiCodeUtil.getInstance().getAsCui( cuiCode ) );
       }
 
       public Map<Long, Concept> createConcepts( final Collection<Long> cuiCodes
) {

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java
Wed Sep 23 18:00:14 2015
@@ -21,6 +21,11 @@ import java.util.*;
 public enum JdbcConnectionFactory {
    INSTANCE;
 
+   static public final String JDBC_DRIVER = "jdbcDriver";
+   static public final String JDBC_URL = "jdbcUrl";
+   static public final String JDBC_USER = "jdbcUser";
+   static public final String JDBC_PASS = "jdbcPass";
+
    static final private Logger LOGGER = Logger.getLogger( "JdbcConnectionFactory" );
    static final private Logger DOT_LOGGER = Logger.getLogger( "ProgressAppender" );
    static final private Logger EOL_LOGGER = Logger.getLogger( "ProgressDone" );

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
Wed Sep 23 18:00:14 2015
@@ -45,18 +45,18 @@ public enum UmlsUserApprover {
       return INSTANCE;
    }
 
+   // properties, matches new
+   public final static String URL_PARAM = "umlsUrl";
+   public final static String VENDOR_PARAM = "umlsVendor";
+   public final static String USER_PARAM = "umlsUser";
+   public final static String PASS_PARAM = "umlsPass";
+
    // environment, matches old
    private final static String UMLSADDR_PARAM = "ctakes.umlsaddr";
    private final static String UMLSVENDOR_PARAM = "ctakes.umlsvendor";
    final static String UMLSUSER_PARAM = "ctakes.umlsuser";
    final static String UMLSPW_PARAM = "ctakes.umlspw";
 
-   // properties, matches new
-   private final static String URL_PARAM = "umlsUrl";
-   private final static String VENDOR_PARAM = "umlsVendor";
-   private final static String USER_PARAM = "umlsUser";
-   private final static String PASS_PARAM = "umlsPass";
-
    static final private Logger LOGGER = Logger.getLogger( "UmlsUserApprover" );
    static final private Logger DOT_LOGGER = Logger.getLogger( "ProgressAppender" );
    static final private Logger EOL_LOGGER = Logger.getLogger( "ProgressDone" );

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/ae/TestDictionaryLoadResources.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/ae/TestDictionaryLoadResources.java?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/ae/TestDictionaryLoadResources.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/ae/TestDictionaryLoadResources.java
Wed Sep 23 18:00:14 2015
@@ -15,7 +15,7 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.fail;
 
 
-public class TestDictionaryLoadResources {
+final public class TestDictionaryLoadResources {
 
    static private final Logger LOGGER = Logger.getLogger( "TestDictionaryLoadResources" );
 

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/resources/org/apache/ctakes/dictionary/lookup/fast/TestcTakesHsql.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/resources/org/apache/ctakes/dictionary/lookup/fast/TestcTakesHsql.xml?rev=1704909&r1=1704908&r2=1704909&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/resources/org/apache/ctakes/dictionary/lookup/fast/TestcTakesHsql.xml
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/resources/org/apache/ctakes/dictionary/lookup/fast/TestcTakesHsql.xml
Wed Sep 23 18:00:14 2015
@@ -61,7 +61,7 @@
             <!-- Optional tables for optional term info.
             Uncommenting these lines alone may not persist term information;
             persistence depends upon the TermConsumer.  -->
-            <property key="snomedTable" value="snomedct"/>
+            <property key="snomedctTable" value="long"/>
             <property key="rxnormTable" value="rxnorm"/>
             <!--<property key="icd9Table" value="icd9cm"/>-->
             <!--<property key="icd10Table" value="icd10pcs"/>-->
@@ -92,8 +92,8 @@
       <!--<implementationName>org.apache.ctakes.dictionary.lookup2.consumer.PrecisionTermConsumer</implementationName>-->
       <!--<implementationName>org.apache.ctakes.dictionary.lookup2.consumer.SemanticCleanupTermConsumer</implementationName>-->
       <properties>
-          <!-- Depending upon the consumer, the value of codingScheme may or may not be
used.  With the packaged consumers,
-          codingScheme is a default value used only for cuis that do not have secondary codes
(snomed, rxnorm, etc.)  -->
+         <!-- Depending upon the consumer, the value of codingScheme may or may not be
used.  With the packaged consumers,
+         codingScheme is a default value used only for cuis that do not have secondary codes
(snomed, rxnorm, etc.)  -->
          <property key="codingScheme" value="CTAKES"/>
       </properties>
    </rareWordConsumer>




Mime
View raw message