Skip to content

boyleconnor/phi-deidentifier-app

 
 

Repository files navigation

NLP Sandbox PHI Deidentifier

GitHub Release GitHub CI GitHub License Docker Pulls Discord

React client for the NLP Sandbox PHI Deidentifier API

Usage

The PHI Deidentifier runs on a dockerized stack. First, make sure that you have installed Docker in your local environment. Once you have done that, move your working directory to this directory, then run the following command to start up the stack:

$ docker-compose up

When running, the Deidentifier stacks provides a web interface at localhost that you can use to test out a selection of annotators on a clinical note.

Development

The models and API hooks for the client are based on the phi-deidentifier OpenAPI schema using openapi-generator-cli. To re-generate or update these models/hooks, first download the latest version of the API specification, then run the generator script:

$ curl -O https://nlpsandbox.github.io/nlpsandbox-schemas/phi-deidentifier/edge/openapi.yaml
$ npx openapi-generator-cli generate -g typescript-fetch -i openapi.yaml -o client/src --additional-properties=typescriptThreePlus=true

The client can be run locally by navigating to the client/ directory and running npm start. The client depends on the de-identifier server being run in the background. Assuming that Node and Docker are installed, the following commands can start up the full stack (back end & front end) for development/testing purposes using the following commands:

$ docker compose up --build

(you may have to run this command as root or prepend the command with sudo).

Then, in another shell, run the following:

$ cd client/
$ npm ci
$ SERVER_PORT=80 npm start

The development front end can be accessed at http://localhost:3000. The API calls currently require the browser to be running with CORS enforcement disabled. This can be done with Google Chrome by, for example, running the following command:

$ google-chrome --disable-web-security --user-data-dir=~/TEMP/

About

React client for the NLP Sandbox PHI Deidentifier

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 66.6%
  • JavaScript 28.9%
  • HTML 2.0%
  • Shell 1.4%
  • Other 1.1%