Git Product home page Git Product logo

quick-ctakes's Introduction

🚀 QTakes - Apache cTAKES™ on Quarkus

quick-ctakes Twitter Follow

Apache cTAKES™ is a natural language processing system for the extraction of information from electronic medical record clinical free-text. A web application providing REST API for cTAKES is available from the original repository. This is an extension of the REST API using Quarkus, (the Supersonic Subatomic Java Framework) designed for containers (docker).

04/10/2021: Updated with cTakes patch 4.0.0.1 for UmlsKey

You need

  • docker
  • java 8
  • maven

How to use

STEP 1: Create the database

You can use a local or remote MySQL database. The SQL data scripts are available in this repo. Refer to the section titled 'SQL Data Scripts.' You can also spin up a docker container with these scripts as below (Yes, it has to be MySQL 5):

FROM mysql:5

COPY ./sno_rx_16ab_db/ /docker-entrypoint-initdb.d/

STEP 2: Check out this repo and add the details

git clone https://github.com/dermatologist/quick-ctakes.git

Add the database details in customDictionary.xml in the resources folder. Make changes to the Default.piper if needed

STEP 3: Build the java application, test it and package it

cd quick-ctakes
./mvnw clean compile quarkus:dev
mvn clean package -DskipTests

STEP 4: Dockarize it

  • See the docker folder for details
docker build -f src/main/docker/Dockerfile.jvm -t <docker-user/container-name:tag .
  • A sample docker-compose is also provided. (Add UMLS KEY HERE)

STEP 5: Use as below

curl -X POST -H "Content-Type: text/plain" --data "this is hypertension and diabetes" 127.0.0.1:8080/analyze

More about Quarkus

This project uses Quarkus, the Supersonic Subatomic Java Framework.

If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .

Running the application in dev mode

You can run your application in dev mode that enables live coding using:

./mvnw quarkus:dev

Packaging and running the application

The application is packageable using ./mvnw package. It produces the executable quick-ctakes-1.0.0-SNAPSHOT-runner.jar file in /target directory. Be aware that it’s not an über-jar as the dependencies are copied into the target/lib directory.

The application is now runnable using java -jar target/quick-ctakes-1.0.0-SNAPSHOT-runner.jar.

Creating a native executable

You can create a native executable using: ./mvnw package -Pnative.

Or you can use Docker to build the native executable using: ./mvnw package -Pnative -Dquarkus.native.container-build=true.

You can then execute your binary: ./target/quick-ctakes-1.0.0-SNAPSHOT-runner

If you want to learn more about building native executables, please consult https://quarkus.io/guides/building-native-image-guide .

quick-ctakes's People

Contributors

dependabot[bot] avatar dermatologist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.