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))
Metadata
Release files for medspacy-pna 0.0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| medspacy_pna-0.0.0.3.tar.gz | 58.6 kB | Without provenance | Details for medspacy_pna-0.0.0.3.tar.gz |
Release files / medspacy_pna-0.0.0.3.tar.gz
| Download URL | medspacy_pna-0.0.0.3.tar.gz |
|---|---|
| Size | 58.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbdb429c24310def92f0b795ddee56ea105c87f63631346004dc24c893ded641
|
|
BLAKE2b-256 checksum How to use checksums |
7186f87ff185dbb98ba8ecd8c06689a7dcffc060309b570470b5d06ae60db5c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.13
|
Security for medspacy-pna 0.0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.