tmills / ctakes-docker

Apache License 2.0
23 stars 18 forks source link

other dictionaries support #17

Closed MatthewVita closed 6 years ago

MatthewVita commented 6 years ago

@tmills I'm very close, but I'm getting this error:

Caused by: java.io.FileNotFoundException: No File exists at org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab.xml,org/apache/ctakes/dictionary/lookup/fast/icd10.xml

When I just have one or the other, it works. I'm thinking there's a bug at play here. If you agree, should I report it to the dev mailing list?

Thanks, Matthew

tmills commented 6 years ago

Are you trying to use both dictionaries? If so, then I think the way you do that is to create a single lookup descriptor file with multiple entries (rather than trying to load two of them).

On Wed, Sep 6, 2017 at 11:36 PM Matthew Vita notifications@github.com wrote:

@tmills https://github.com/tmills I'm very close, but I'm getting this error:

Caused by: java.io.FileNotFoundException: No File exists at org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab.xml,org/apache/ctakes/dictionary/lookup/fast/icd10.xml

When I just have one or the other, it works. I'm thinking there's a bug at play here. If you agree, should I report it to the dev mailing list?

Thanks, Matthew

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/tmills/ctakes-docker/pull/17#issuecomment-327674648, or mute the thread https://github.com/notifications/unsubscribe-auth/AAN3Db-0vBMQUspmg5yFbETyPbGVTS3zks5sf2S3gaJpZM4PPPi7 .

MatthewVita commented 6 years ago

@tmills,

Brilliant.

The following works for me:

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<lookupSpecification>
<dictionaries>
   <dictionary>
      <name>sno_rx_16abTerms</name>
      <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.UmlsJdbcRareWordDictionary</implementationName>
      <properties>
         <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
         <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab"/>
         <property key="jdbcUser" value="sa"/>
         <property key="jdbcPass" value=""/>
         <property key="rareWordTable" value="cui_terms"/>
         <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser"/>
         <property key="umlsVendor" value="NLM-6515182895"/>
         <property key="umlsUser" value="CHANGE_ME"/>
         <property key="umlsPass" value="CHANGE_ME"/>
      </properties>
   </dictionary>

   <dictionary>
      <name>icd10Terms</name>
      <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.UmlsJdbcRareWordDictionary</implementationName>
      <properties>
         <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
         <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/icd10/icd10"/>
         <property key="jdbcUser" value="sa"/>
         <property key="jdbcPass" value=""/>
         <property key="rareWordTable" value="cui_terms"/>
         <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser"/>
         <property key="umlsVendor" value="NLM-6515182895"/>
         <property key="umlsUser" value="CHANGE_ME"/>
         <property key="umlsPass" value="CHANGE_ME"/>
      </properties>
   </dictionary>
</dictionaries>

<conceptFactories>
   <conceptFactory>
      <name>sno_rx_16abConcepts</name>
      <implementationName>org.apache.ctakes.dictionary.lookup2.concept.UmlsJdbcConceptFactory</implementationName>
      <properties>
         <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
         <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab"/>
         <property key="jdbcUser" value="sa"/>
         <property key="jdbcPass" value=""/>
         <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser"/>
         <property key="umlsVendor" value="NLM-6515182895"/>
         <property key="umlsUser" value="CHANGE_ME"/>
         <property key="umlsPass" value="CHANGE_ME"/>
         <property key="tuiTable" value="tui"/>
         <property key="prefTermTable" value="prefTerm"/>
         <property key="rxnormTable" value="long"/>
         <property key="snomedct_usTable" value="long"/>
      </properties>
   </conceptFactory>

   <conceptFactory>
      <name>icd10Concepts</name>
      <implementationName>org.apache.ctakes.dictionary.lookup2.concept.UmlsJdbcConceptFactory</implementationName>
      <properties>
         <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
         <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/icd10/icd10"/>
         <property key="jdbcUser" value="sa"/>
         <property key="jdbcPass" value=""/>
         <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser"/>
         <property key="umlsVendor" value="NLM-6515182895"/>
         <property key="umlsUser" value="CHANGE_ME"/>
         <property key="umlsPass" value="CHANGE_ME"/>
         <property key="tuiTable" value="tui"/>
         <property key="prefTermTable" value="prefTerm"/>
         <property key="icd10cmTable" value="text"/>
         <property key="icd10amaeTable" value="text"/>
         <property key="icd10amTable" value="text"/>
         <property key="srcTable" value="text"/>
         <property key="icd10Table" value="text"/>
         <property key="icd10aeTable" value="text"/>
         <property key="icd10pcsTable" value="text"/>
      </properties>
   </conceptFactory>
</conceptFactories>

<dictionaryConceptPairs>
   <dictionaryConceptPair>
      <name>sno_rx_16abPair</name>
      <dictionaryName>sno_rx_16abTerms</dictionaryName>
      <conceptFactoryName>sno_rx_16abConcepts</conceptFactoryName>
   </dictionaryConceptPair>

   <dictionaryConceptPair>
      <name>icd10Pair</name>
      <dictionaryName>icd10Terms</dictionaryName>
      <conceptFactoryName>icd10Concepts</conceptFactoryName>
   </dictionaryConceptPair>
</dictionaryConceptPairs>

<rareWordConsumer>
   <name>Term Consumer</name>
   <implementationName>org.apache.ctakes.dictionary.lookup2.consumer.DefaultTermConsumer</implementationName>
   <properties>
     <property key="codingScheme" value="sno_rx_16ab"/>
     <property key="codingScheme" value="icd10"/>
   </properties>
</rareWordConsumer>
</lookupSpecification>

Will format the XML (this will serve as an example), document the process, and update the PR.

Thanks, Matthew

MatthewVita commented 6 years ago

Okay @tmills I think this is ready. I tested it with CVD and it is outputting SNOMED/RXNORM and ICD10 data!

MatthewVita commented 6 years ago

@tmills Okay, I just resolve the conflicts with master. I think this is ready to go.

tmills commented 6 years ago

sorry for the delay

MatthewVita commented 6 years ago

Not a problem at all, sir!

Thank you for the help, review, and merge!