zensols.dsprov


Namezensols.dsprov JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/plandes/dsprov
SummaryThis library provides integrated MIMIC-III with discharge summary provenance of data annotations and Pythonic classes.
upload_time2023-06-30 23:58:51
maintainer
docs_urlNone
authorPaul Landes
requires_python
license
keywords tooling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Provenience of discharge summaries Pythonic access

[![PyPI][pypi-badge]][pypi-link]
[![Python 3.9][python39-badge]][python39-link]
[![Python 3.10][python310-badge]][python310-link]
[![Build Status][build-badge]][build-link]

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


## Documentation

See the [full documentation](https://plandes.github.io/dsprov/index.html).
The [API reference](https://plandes.github.io/dsprov/api.html) is also
available.


## Obtaining

The easiest way to install the command line program is via the `pip` installer:
```bash
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

```bash
# 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:

```python
>>> 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](CHANGELOG.md).


## License

[MIT License](LICENSE.md)

Copyright (c) 2023 Paul Landes


<!-- links -->
[pypi]: https://pypi.org/project/zensols.dsprov/
[pypi-link]: https://pypi.python.org/pypi/zensols.dsprov
[pypi-badge]: https://img.shields.io/pypi/v/zensols.dsprov.svg
[python39-badge]: https://img.shields.io/badge/python-3.9-blue.svg
[python39-link]: https://www.python.org/downloads/release/python-390
[python310-badge]: https://img.shields.io/badge/python-3.10-blue.svg
[python310-link]: https://www.python.org/downloads/release/python-310
[build-badge]: https://github.com/plandes/dsprov/workflows/CI/badge.svg
[build-link]: https://github.com/plandes/dsprov/actions

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/plandes/dsprov",
    "name": "zensols.dsprov",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tooling",
    "author": "Paul Landes",
    "author_email": "landes@mailc.net",
    "download_url": "https://github.com/plandes/dsprov/releases/download/v0.0.1/zensols.dsprov-0.0.1-py3-none-any.whl",
    "platform": null,
    "description": "# Provenience of discharge summaries Pythonic access\n\n[![PyPI][pypi-badge]][pypi-link]\n[![Python 3.9][python39-badge]][python39-link]\n[![Python 3.10][python310-badge]][python310-link]\n[![Build Status][build-badge]][build-link]\n\nThis library provides integrated MIMIC-III with discharge summary provenance of\ndata annotations and Pythonic classes.\n\n\n## Documentation\n\nSee the [full documentation](https://plandes.github.io/dsprov/index.html).\nThe [API reference](https://plandes.github.io/dsprov/api.html) is also\navailable.\n\n\n## Obtaining\n\nThe easiest way to install the command line program is via the `pip` installer:\n```bash\npip3 install --use-deprecated=legacy-resolver zensols.dsprov\n```\n\nBinaries are also available on [pypi].\n\n\n## Usage\n\nThe package includes a command line interface, which is probably most useful by\ndumping selected admission annotations.\n\n### Command line\n\n```bash\n# help\n$ dsprov -h\n\n# get two admission IDs (hadm_id)\n$ dsprov ids -l 2\n\n# print out two admissions\n$ dsprov show -l 2\n\n# print out admissions 139676\n$ dsprov show -d 139676\n\n# output the JSON of two admissions with indent 4\n$ dsprov show -i 4 -f json -d $(dsprov ids -l 2 | awk '{print $1}' | paste -s -d, -)\n```\n\n### API\n\nThe package can be used directly in your research to provide Python object\noriented access to the annotations:\n\n```python\n>>> from zensols.nlp import FeatureDocument\n>>> from zensols.dsprov import ApplicationFactory, AdmissionMatch\n>>> stash = ApplicationFactory.get_stash()\n>>> am: AdmissionMatch = next(iter(stash.values()))\n>>> doc: FeatureDocument = am.note_matches[0].discharge_summary.note.doc\n>>> print(f'hadm: {am.hadm_id}')\n>>> print(f'sentences: {len(doc.sents)}')\n>>> print(f'tokens: {doc.token_len}')\n>>> print(f'entities: {doc.entities}')\nhadm: 120334\nsentences: 46\ntokens: 1039\nentities: (<Admission>, <Date>, <Discharge>, <Date>, <Date of Birth>, <Sex>, ...)\n```\n\n\n## Changelog\n\nAn extensive changelog is available [here](CHANGELOG.md).\n\n\n## License\n\n[MIT License](LICENSE.md)\n\nCopyright (c) 2023 Paul Landes\n\n\n<!-- links -->\n[pypi]: https://pypi.org/project/zensols.dsprov/\n[pypi-link]: https://pypi.python.org/pypi/zensols.dsprov\n[pypi-badge]: https://img.shields.io/pypi/v/zensols.dsprov.svg\n[python39-badge]: https://img.shields.io/badge/python-3.9-blue.svg\n[python39-link]: https://www.python.org/downloads/release/python-390\n[python310-badge]: https://img.shields.io/badge/python-3.10-blue.svg\n[python310-link]: https://www.python.org/downloads/release/python-310\n[build-badge]: https://github.com/plandes/dsprov/workflows/CI/badge.svg\n[build-link]: https://github.com/plandes/dsprov/actions\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This library provides integrated MIMIC-III with discharge summary provenance of data annotations and Pythonic classes.",
    "version": "0.0.1",
    "project_urls": {
        "Download": "https://github.com/plandes/dsprov/releases/download/v0.0.1/zensols.dsprov-0.0.1-py3-none-any.whl",
        "Homepage": "https://github.com/plandes/dsprov"
    },
    "split_keywords": [
        "tooling"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ca82f0a1004a88b59e8e81142a3edb1f24b525ca80812a86a159da6ef512eac",
                "md5": "9d0ddf73b4a32fd80f4fa7dd53bd226d",
                "sha256": "787754d006b1367d09162ca8c6db92fc41fa60533cbe66d18ae40cc3175d76bd"
            },
            "downloads": -1,
            "filename": "zensols.dsprov-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9d0ddf73b4a32fd80f4fa7dd53bd226d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9250,
            "upload_time": "2023-06-30T23:58:51",
            "upload_time_iso_8601": "2023-06-30T23:58:51.484643Z",
            "url": "https://files.pythonhosted.org/packages/9c/a8/2f0a1004a88b59e8e81142a3edb1f24b525ca80812a86a159da6ef512eac/zensols.dsprov-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-30 23:58:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "plandes",
    "github_project": "dsprov",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "zensols.dsprov"
}
        
Elapsed time: 0.11792s