ctakes-rest-service
ctakes-rest-service copied to clipboard
Question: Where to run custom dictionary creator tool after getting ctakes rest service up and running?
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
Hi @jbliss1234, what version of Java are you running?
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 try it with jdk 1.8
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?
@MatthewVita , any thoughts on how to configure a custom ICD10 dictionary after installing ctakes-rest-service?
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 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 Any luck with adding ICD10 as Table and loading data?