Skip to main content

This library provides integrated MIMIC-III with discharge summary provenance of data annotations and Pythonic classes.

Project description

Provenience of discharge summaries Pythonic access

PyPI Python 3.9 Python 3.10 Build Status

This library provides integrated MIMIC-III with discharge summary provenance of data annotations and Pythonic classes.

Documentation

See the full documentation. The API reference is also available.

Obtaining

The easiest way to install the command line program is via the pip installer:

pip3 install --use-deprecated=legacy-resolver zensols.dsprov

Binaries are also available on pypi.

Usage

The package includes a command line interface, which is probably most useful by dumping selected admission annotations.

Command line

# help
$ dsprov -h

# get two admission IDs (hadm_id)
$ dsprov ids -l 2

# print out two admissions
$ dsprov show -l 2

# print out admissions 139676
$ dsprov show -d 139676

# output the JSON of two admissions with indent 4
$ dsprov show -i 4 -f json -d $(dsprov ids -l 2 | awk '{print $1}' | paste -s -d, -)

API

The package can be used directly in your research to provide Python object oriented access to the annotations:

>>> from zensols.nlp import FeatureDocument
>>> from zensols.dsprov import ApplicationFactory, AdmissionMatch
>>> stash = ApplicationFactory.get_stash()
>>> am: AdmissionMatch = next(iter(stash.values()))
>>> doc: FeatureDocument = am.note_matches[0].discharge_summary.note.doc
>>> print(f'hadm: {am.hadm_id}')
>>> print(f'sentences: {len(doc.sents)}')
>>> print(f'tokens: {doc.token_len}')
>>> print(f'entities: {doc.entities}')
hadm: 120334
sentences: 46
tokens: 1039
entities: (<Admission>, <Date>, <Discharge>, <Date>, <Date of Birth>, <Sex>, ...)

Changelog

An extensive changelog is available here.

License

MIT License

Copyright (c) 2023 Paul Landes

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zensols.dsprov-0.0.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file zensols.dsprov-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: zensols.dsprov-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for zensols.dsprov-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 787754d006b1367d09162ca8c6db92fc41fa60533cbe66d18ae40cc3175d76bd
MD5 9d0ddf73b4a32fd80f4fa7dd53bd226d
BLAKE2b-256 9ca82f0a1004a88b59e8e81142a3edb1f24b525ca80812a86a159da6ef512eac

See more details on using hashes here.

Supported by

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