The goal of this solution is to provide a JSON-based REST service to process unstructured clinical text through a smart natural language processing system in a fast, accurate, and easy to setup way.
(Based on Ubuntu 18)
- Install Java 8 and MySQL 5.7 (reference)
 
sudo apt-get update
sudo apt-get install default-jdk
sudo apt-get install mysql-server
mysqladmin -u root password passThe above sets the root password to pass. You can also use custom configurations and specify them in ./ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/customDictionary.xml.
Note: This repo assumes you installed MySQL on the default port 3066
- 
Install Tomcat 8 using the detailed instructions here)
 - 
Install Maven 3.5, Subversion, and Git.
 
sudo apt-get install maven
sudo apt-get install subversion
sudo apt-get install git- Git clone this repository: 
git clone https://github.com/GoTeamEpsilon/ctakes-rest-service.git. - Load in all SQL scripts in 
./sno_rx_16ab_db. This process may take several hours. 
cd ./sno_rx_16ab_db
for fname in *.sql; do sudo mysql -u root < $fname; done
cd ..cdinto the repository and run the following to pull down cTAKES:
mkdir ctakes-codebase-area
cd ctakes-codebase-area
svn export 'https://svn.apache.org/repos/asf/ctakes/trunk'
- Build the appropriate cTAKES modules with the following:
 
cd trunk/ctakes-distribution
mvn install -Dmaven.test.skip=true
cd ../ctakes-assertion-zoner
mvn install -Dmaven.test.skip=true
- Navigate back to the main codebase and build:
 
cd ../../../ctakes-web-rest
mvn install
- Deploy the War file:
 
sudo mv target/ctakes-web-rest.war /opt/tomcat/latest/webapps/
# useful for debugging (uncomment):
# tail -f /opt/tomcat/latest/logs/catalina.out
- 
Access the URL
http://localhost:8080/ctakes-web-rest/index.jspfor testing the REST service. This should return a default index page. - 
Test the installation by issuting a POST request to
http://localhost:8080/ctakes-web-rest/service/analyze?pipeline=Default. You can do this using a client like Postman (remember to use the POST method and RAW response). 
Apache License, Version 2.0
