Flexible medspaCy NLP pipeline for detecting assertions of pneumonia in different clinical notes.
Project description
MedspaCy Pneumonia NLP
Flexible medspaCy NLP pipeline for detecting assertions of pneumonia in different clinical notes.
Overview
This package implements a medspaCy pipeline for classifying pneumonia diagnoses in 3 types of clinical notes:
- Emergency note
- Radiology report
- Discharge summary
The system was primarily designed in Veterans Affairs and was then validated in
University of Utah. Rules designed for University of Utah's Epic EHR are provided and can be
added to the pipeline. Custom rules can be designed and added in a similar manner.
See notebooks/
for detailed documentation and examples.
Quickstart
Installation
pip install medspacy_pna
Or:
python setup.py install
You will also need to install spaCy's en_core_web_sm
model (or specify a different model
when loading the NLP)
python -m spacy download en_core_web_sm
Usage
from medspacy_pna import build_nlp
from medspacy_pna.display import create_html
from IPython.display import HTML
# Load a model specific to either "emergency", "radiology", or "discharge"
nlp_emergency = build_nlp(domain="emergency")
note_emergency = """
History of Present Illness: Patient presents to ED with cough and fever.
Medical decision making: Differential diagnoses include pna and CHF.
Will order a chest x-ray to r/o pneumonia.
Assessment/Plan:
Admit for suspected community-acquired pneumonia.
"""
doc_emergency = nlp_emergency(note_emergency)
HTML(create_html(doc_emergency, "emergency", document_classification=True))
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
File details
Details for the file medspacy_pna-0.0.0.3.tar.gz
.
File metadata
- Download URL: medspacy_pna-0.0.0.3.tar.gz
- Upload date:
- Size: 58.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbdb429c24310def92f0b795ddee56ea105c87f63631346004dc24c893ded641 |
|
MD5 | 35e9cbec5a56772eb1e2ea786f81ad9e |
|
BLAKE2b-256 | 7186f87ff185dbb98ba8ecd8c06689a7dcffc060309b570470b5d06ae60db5c5 |