Skip to main content

A set of tools for extracting formattable data from clinical notes stored in electronic health record systems.

Project description

Build Status License: Elastic License 2.0

A set of tools for extracting formattable data from clinical notes stored in electronic health record systems. Powered by MedCAT models.

Installing

Install MiADE

To install the stable release:

pip install miade

To install the latest development version of MiADE, clone this repository and run:

pip install .

Downloading models

You may also need to download these additional models to run MiADE:

spaCy - required for MedCAT

python -m spacy download en_core_web_md

med7 - required for medication dosage extraction

pip install https://huggingface.co/kormilitzin/en_core_med7_lg/resolve/main/en_core_med7_lg-any-py3-none-any.whl

Quickstart

Initialise MiADE with the path that you have saved your trained MedCAT models:

miade = NoteProcessor(Path("path/to/model/dir"))

Add annotators:

miade.add_annotator("problems")
miade.add_annotator("meds/allergies")

Create a note:

text = "Patient has penicillin allergy with rash"
note = Note(text)

Extract concepts:

concepts = miade.process(note)

for concept in concepts:
    print(concept)
    
# {name: breaking out - eruption, id: 271807003, category: Category.REACTION, start: 204, end: 208, dosage: None, negex: False, meta: None} 
# {name: penicillin, id: 764146007, category: Category.ALLERGY, start: 191, end: 201, dosage: None, negex: False, meta: None} 

Contributing

See contributing

Maintainers

Name Email
James Brandreth j.brandreth@ucl.ac.uk
Jennifer Jiang jennifer.jiang.13@ucl.ac.uk

Acknowledgement

This project wouldn't be possible without the work at Cogstack, spaCy, and med7!

Licence

This project is licensed under the Elastic License 2.0. See LICENSE for the full license text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miade-1.0.7.tar.gz (87.2 MB view hashes)

Uploaded Source

Built Distribution

miade-1.0.7-py3-none-any.whl (547.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page