org.apache.ctakes.dictionary.lookup.ae
Class UmlsToSnomedConsumerImpl
java.lang.Object
org.apache.ctakes.dictionary.lookup.ae.BaseLookupConsumerImpl
org.apache.ctakes.dictionary.lookup.ae.UmlsToSnomedConsumerImpl
- All Implemented Interfaces:
- LookupConsumer
- Direct Known Subclasses:
- UmlsToSnomedDbConsumerImpl, UmlsToSnomedLuceneConsumerImpl
public abstract class UmlsToSnomedConsumerImpl
- extends BaseLookupConsumerImpl
- implements LookupConsumer
Implementation that takes UMLS dictionary lookup hits and stores as NamedEntity
objects only the ones that have a SNOMED synonym.
Override abstract method getSnomedCodes
and implement
looking up the CUI->SNOMED mappings
- Author:
- Mayo Clinic
Field Summary |
protected java.util.Properties |
props
|
Method Summary |
void |
consumeHits(org.apache.uima.jcas.JCas jcas,
java.util.Iterator lhItr)
Consumes the hits produced by the LookupAnnotator. |
protected abstract java.util.Set |
getSnomedCodes(java.lang.String umlsCode)
Searches for the Snomed codes that are synonyms of the UMLS concept with CUI umlsCode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
props
protected java.util.Properties props
UmlsToSnomedConsumerImpl
public UmlsToSnomedConsumerImpl(org.apache.uima.UimaContext aCtx,
java.util.Properties properties)
throws java.lang.Exception
- Throws:
java.lang.Exception
getSnomedCodes
protected abstract java.util.Set getSnomedCodes(java.lang.String umlsCode)
throws java.sql.SQLException,
DictionaryException
- Searches for the Snomed codes that are synonyms of the UMLS concept with CUI
umlsCode
- Parameters:
umlsCode
-
- Returns:
- Set of SNOMED codes for the given UMLS CUI.
- Throws:
SQLException,
- DictionaryException
java.sql.SQLException
DictionaryException
consumeHits
public void consumeHits(org.apache.uima.jcas.JCas jcas,
java.util.Iterator lhItr)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
- Description copied from interface:
LookupConsumer
- Consumes the hits produced by the LookupAnnotator. This typically means
iterating over the hits and storing what's necessary to the JCas
- Specified by:
consumeHits
in interface LookupConsumer
- Specified by:
consumeHits
in class BaseLookupConsumerImpl
- Parameters:
jcas
- CAS for storing datalhItr
- Iterator over LookupHit objects. These objects contain data
about the annotation span plus any associated metadata.
- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException