Pipeline for building Machine Learning Classifiers tasked with extracting the RA diagnosis based on EHR data (Natural Language). This repository works with Python 3.6.
Note: we used this pipeline for our study, published here: https://doi.org/10.2196/23930. We identified Rheumatoid Arthritis patients in EHR-data from two different centers to examine the universal applicability.
Prerequisite: Install Anaconda with python version 3.6+. This additionally installs the Anaconda Prompt, which you can find in the windows search bar. Use this Anaconda prompt to run the commands mentioned below.
Prerequisite: conda environment (with jupyter notebook). Use the terminal to run the commands mentioned below.
Install Jupyter Notebook:
$ conda install -c anaconda notebook
Before running, please install the dependencies.
prerequisite: conda3
$ conda env create -f ml_env.yml
$ conda activate ml_env
Create kernel:
$ ipython kernel install --user --name diagnosis_ra
Deactivate environment:
$ conda deactivate
prerequisite: pip
$ pip install -r requirements.txt
prerequisite: conda3
$ bash build_kernel.sh
Start a notebook session in the terminal
$ notebook
Which will start a notebook session in the browser from which you can open the pipeline file: Notebook Diagnosis
Pipeline displaying the general workflow, where the green sections are performed automatically and the blue parts require manual evaluation. A simple annotation (binary Yes or No) will suffice, thus reducing the mental load of the physician.
If you were to use this pipeline, please cite our paper:
Maarseveen T, Meinderink T, Reinders M, Knitza J, Huizinga T, Kleyer A, Simon D, van den Akker E, Knevel R Machine Learning Electronic Health Record Identification of Patients with Rheumatoid Arthritis: Algorithm Pipeline Development and Validation Study JMIR Med Inform 2020;8(11):e23930 URL: https://medinform.jmir.org/2020/11/e23930 DOI: 10.2196/23930 PMID: 33252349