Giter VIP home page Giter VIP logo

prancer's Introduction

PRAnCER

PRAnCER (Platform enabling Rapid Annotation for Clinical Entity Recognition) is a web platform that enables the rapid annotation of medical terms within clinical notes. A user can highlight spans of text and quickly map them to concepts in large vocabularies within a single, intuitive platform. Users can use the search and recommendation features to find labels without ever needing to leave the interface. Further, the platform can take in output from existing clinical concept extraction systems as pre-annotations, which users can accept or modify in a single click. These features allow users to focus their time and energy on harder examples instead.

Usage

Installation Instructions

Detailed installation instructions are provided below; PRAnCER can operate on Mac, Windows, and Linux machines.

Linking to UMLS Vocabulary

Use of the platform requires a UMLS license, as it requires several UMLS-derived files to surface recommendations. Please email magrawal (at) mit (dot) edu to request these files, along with your API key so we may confirm. You can sign up here. Surfacing additional information in the UI also requires you enter your UMLS API key in application/utils/constants.py.

Loading in and Exporting Data

To load in data, users directly place any clinical notes as .txt files in the /data folder; an example file is provided. The output of annotation is .json file in the /data folder with the same file prefix as the .txt. To start annotating a note from scratch, a user can just delete the corresponding .json file.

Pre-filled Suggestions

Two options exist for pre-filled suggestions; users specify which they want to use in application/utils/constants.py. The default is "MAP". Option 1 for pre-filled suggestions is "MAP", if users want to preload annotations based on a dictionary of high-precision text to CUI for their domain, e.g. {hypertension: "C0020538"}. A pre-created dictionary will be provided alongside the UMLS files described above. Option 2 for pre-filled suggestions is "CSV", if users want to load in pre-computed pre-annotations (e.g. from their own algorithm, scispacy, cTAKES, MetaMap). Users simply place a CSV of spans and CUIs, with the same prefix as the data .txt file, and our scripts will automatically incorporate those annotations. example.csv in the /data file provides an example.

Installation

The platform requires python3.7, node.js, and several other python and javascript packages. Specific installation instructions for each follow!

Backend requirements

1) First check if python3 is installed.

You can check to see if it is installed:

$ python3 --version

If it is installed, you should see Python 3.7.x

If you need to install it, you can easily do that with a package manager like Homebrew:

$ brew install python3

2) With python3 installed, install necessary python packages.

You can install packages with the python package installer pip:

$ pip3 install flask flask_script flask_migrate flask_bcrypt nltk editdistance requests lxml

Frontend requirements

3) Check to see if npm and node.js are installed:

$ npm -v
$ node -v

If they are, you can skip to Step 4. If not, to install node, first install nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash

Source: https://github.com/nvm-sh/nvm

Re-start your terminal and confirm nvm installation with:

command -v nvm

Which will return nvm if successful

Then install node version 10.15.1:

$ nvm install 10.15.1

4) Install the node dependencies:

$ cd static
$ npm install --save

For remote server applications, permissions errors may be triggered.
If so, try adding --user to install commands.

Run program

Run the backend

Open one terminal tab to run the backend server:

$ python3 manage.py runserver

If all goes well, you should see * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) followed by a few more lines in the terminal.

Run the frontend

Open a second terminal tab to run the frontend:

$ cd static
$ npm start

After this, open your browser to http://localhost:3000 and you should see the homepage!

Contact

If you have any questions, please email Monica Agrawal [[email protected]]. Credit belongs to Ariel Levy for the development of this platform.

Based on React-Redux-Flask boilerplate.

prancer's People

Contributors

agrawalm 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.