A set of tools for extracting formattable data from clinical notes stored in electronic health record systems.
Project description
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 | |
---|---|
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file miade-1.0.7.tar.gz
.
File metadata
- Download URL: miade-1.0.7.tar.gz
- Upload date:
- Size: 87.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23be10aa5ede7fdcfb7ca2ddc35ad16bc803f65b5e3435f40676bdc51f755810 |
|
MD5 | 4824b8e97f1ae8b4643b239f5310e09f |
|
BLAKE2b-256 | a95a02b989492845452fe099e359c4c1f8fa7dccc1480d55e1a68e9b692a0a09 |
File details
Details for the file miade-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: miade-1.0.7-py3-none-any.whl
- Upload date:
- Size: 547.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ac3b07ff682201d31af47c1e279cc922cc8cff1bd45246811969085ef791c56 |
|
MD5 | 0d6ae59534b6ab30bbdf60a970cf668c |
|
BLAKE2b-256 | 43c5bea7fdc7c954aa6e45c466bb2f68320227e4faf512f84ac167d3721bc616 |