ctakes-rest-service icon indicating copy to clipboard operation
ctakes-rest-service copied to clipboard

Question: Where to run custom dictionary creator tool after getting ctakes rest service up and running?

Open jbliss1234 opened this issue 6 years ago • 8 comments

I am very new to Ctakes and Java. I created a brand new ubuntu 18.04 VM and was able to follow the instructions to get the Ctakes rest service up.

However, I am now trying to follow Matthew's video to add custom dictionary for ICD codes, but I am not exactly sure where to find the runDictionaryCreator.sh from. I see the file in .../ctakes-rest-service/ctakes-codebase-area/trunk/ctakes-distribution/src/main/bin, but running the script from here throws this error:

Error: Could not find or load main class org.apache.ctakes.gui.dictionary.DictionaryCreator
Caused by: java.lang.ClassNotFoundException: org.apache.ctakes.gui.dictionary.DictionaryCreator

jbliss1234 avatar Jan 15 '19 07:01 jbliss1234

Hi @jbliss1234, what version of Java are you running?

MatthewVita avatar Jan 16 '19 23:01 MatthewVita

I followed the instructions and installed default_jre. The version I have is:

openjdk version "10.0.2" 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

jbliss1234 avatar Jan 17 '19 18:01 jbliss1234

@jbliss1234 try it with jdk 1.8

MatthewVita avatar Jan 21 '19 00:01 MatthewVita

After uninstalling default-jdk and all traces of java, I installed Oracle Jdk 1.8, however the issue remains the same:

Error: Could not find or load main class org.apache.ctakes.gui.dictionary.DictionaryCreator Caused by: java.lang.ClassNotFoundException: org.apache.ctakes.gui.dictionary.DictionaryCreator

BTW, my Rest service continues to work fine; there is no issue with the service itself, except it returns Snomed codes instead of ICD codes that I want.

Also, I have a feeling that a step might be missing from the README, such as we don’t setup CTAKES_HOME environment variable….but I am not sure.

I wonder if it's possible to point the REST service at an already existing user installation of CTAKES instead of building ctakes from source?

jbliss1234 avatar Jan 21 '19 17:01 jbliss1234

@MatthewVita , any thoughts on how to configure a custom ICD10 dictionary after installing ctakes-rest-service?

jbliss1234 avatar Jan 26 '19 04:01 jbliss1234

Hi @jbliss1234,

As with the scripts here: https://github.com/GoTeamEpsilon/ctakes-rest-service/tree/master/sno_rx_16ab_db, you'll need to add a 9th one with the ICD10 script schema and data.

Look out for things like (example):

CREATE TABLE ICD10PCS(CUI BIGINT,ICD10PCS VARCHAR(48))
CREATE INDEX IDX_ICD10PCS ON ICD10PCS(CUI)

You can also update the first script with just the schema information and add the 9th file with just data.

MatthewVita avatar Jan 29 '19 00:01 MatthewVita

@MatthewVita This is not working. I created a new table as you suggested and inserted a couple of rows, one of which was for cui 11849 (diabetes). I then restarted both mysql and tomcat, and then tested the ctakes rest service with the text "patient is diagnosed with diabetes". The service returned the snomedct_us codes, but nothing regarding icd10pcs..

jbliss1234 avatar Feb 28 '19 18:02 jbliss1234

@jbliss1234 Any luck with adding ICD10 as Table and loading data?

premanandmanimaran avatar Dec 11 '19 10:12 premanandmanimaran