Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. pom.xml
    Dependencies
    1. ctakes-drug-ner : For the ctakes library (only the drug extraction pipeline)
    2. jersey-core, jersey - server : For providing REST API to our ctakes - java based backend
    3. jersey - servlet : For holding the servlets on the server.
    4. jersey - json : To handle the JSON format required to format the output.
    5. gson: For conversion to JSON format
    6. mysql-connector-java: Driver to connect to MySQL database.

  2. External Resources
    The folder SentenceDetection, Chunker, POSTagger and DictionaryLookup contains the external resources required by the ctakes server. The file LookupDesc_DrugNER.xml contains important configuration required to be filled before running the NER pipeline.
    Gtanslate API (for language conversion)

  3. Java Sources
    Package org.raxa contains the main project Java file while org.raxa.rest contains the sources related to providing the api.

    1. CtakesService.java
      Is the main class which perform the core of the functions. It performs three main functions of a. Initializing the ctakes Analysis Engine and abbnList, b. Normalizing the input received c. Extracting the drug parameters using the initialised analysis engine and creating the Drug object.
    2. NaturalLanguageGenerator.java
      This class provides the method to convert to drug extracted in form of parameters mentioned above to free form natural text. As of now contains only one method getNaturalText() which takes Drug object as input and converts and gives the layman natural text as output.
    3. Abbreviation.java
      Helper class which provides abbreviation object to normalize the input text. It contains three parameters acronym, acronym-text, and acronym-type. Acronym is the short form (for eg TDS), acronymText is the full form (eg Three times a day) while acronymType is the category of acronym (drug-form, drug-frequency, drug-route) in our example drug-frequency. As of now these are three categories we divide the most frequently used acronyms into. These acronyms are read/inflated from the files separately provided in the Abbreviations folder.
    4. Drug.java
      Helper class which creates the Drug object for the drug extracted from the input. It contains the parametes drugName, drugFrequency, drugFrequencyUnit, drugStrength, drugStrengthUnit, drugRoute, drugForm, drugDuration and drugDosage.
    5. InformationExtraction.java
      This class provides the method to search for more information about the drug using Generic drug name. The information obtained are Indications, Contraindications, Precautions and Side effects.

  4. How to run?
    Note : Will require Internet Connection to install as well as run the server
    1. Plugins/Softwares Required
      1. Apache Maven 
      2. Apache Tomcat Server
    2. Method 1.
      1. Download the Project and change working directory to the Patient folder.
      2. run mvn clean install
      3. This will generate a war file inside target directory.
      4. Place the war directory under the webapps folder of your tomcat installation.(/var/libs/tomcat7/webapps/)
      5. Use POSTMAN (Google Chrome app) to test working. The url is http://localhost:8080/ctakes/rest/ctakes/hello?text=Prescription&language=language
    3. Method 2. To run with eclipse
      1. Import the project.
      2. Make sure you have maven eclipse plugin and web development environment installed on your eclipse installation.
      3. Next First Right click on the project and run as maven install. This will download all the libraries required to run the project. This operation may take some time depending upon internet connection.
      4. Second Right click on the project and select run on server. This will prompt you to select which server you wish to run the project on. Please select Apache Tomcat. This will start the project on the server.
      5. Use POSTMAN (Google Chrome app) to test working. The url is http://localhost:8080/ctakes/rest/ctakes/hello?text=FirstPrescription&language=language
  5. How to add new Drugs to cTAKES database
    Run the script CreateLuceneIndexForExampleDrugs.java available on github repo. It takes in the input drugs.csv file and outputs the lucene index in drug_index directory. This folder can be then used as the drugs database input to the cTAKES.

 

Doctor module backend

1.Dataset

...