Skip to main content

A Pythonic interface for MEDS datasets

Project description

meds_reader: A Pythonic interface for MEDS datasets

pypy docs Build wheels License

meds_reader is a fast and easy-to-use library for reading and processing subject data stored in MEDS (Medical Event Data Standard) format using a Python-native API.

Inspired by HuggingFace Datasets, meds_reader transforms MEDS datasets into collections of Python objects, that can then be processed using normal Python functions.

Example

# First we need to convert to a database
# That requires running the following command in a terminal
$ meds_reader_convert mimic_meds mimic_meds_reader --num_threads 4
# Now we can use Python to interact with our data
import meds_reader

# We can now construct a database
database = meds_reader.SubjectDatabase("mimic_meds_reader")

# Databases are dict-like objects that store subject data

# We can iterate through all the subject ids in the database
for subject_id in database:

    # We can retrieve subject data given a subject_id
    subject = database[subject_id]

    # Subject data can be manipulated with normal Python operations
    print(subject.subject_id)
    for event in subject.events:
        print(event.time, event.code)

        # We can also iterate through all properties in a generic manner
        for property_name, property_value in event:
            print(property_name, property_value)

To learn more, see our full documentation.

Installation

meds_reader can be installed using pip.

pip install meds_reader

Interactive Demo

An interactive demo can be found at Google Colab.

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 Distributions

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

meds_reader-0.1.15-cp39-cp39-win_amd64.whl (6.5 MB view details)

Uploaded CPython 3.9Windows x86-64

meds_reader-0.1.15-cp39-cp39-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

meds_reader-0.1.15-cp39-cp39-macosx_12_0_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.9macOS 12.0+ x86-64

meds_reader-0.1.15-cp39-cp39-macosx_12_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.9macOS 12.0+ ARM64

File details

Details for the file meds_reader-0.1.15-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: meds_reader-0.1.15-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 6.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for meds_reader-0.1.15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9a8a8260a92cefaecdf4847a6768e4d9039e643b211b8106a71eca978be64eb6
MD5 b2e717754d55dbb1808229fdcae790d0
BLAKE2b-256 188f0615458730a9a6c9ed680e9cd05234121721ecb9ea944e446c9d48664adf

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.15-cp39-cp39-win_amd64.whl:

Publisher: python-build.yml on som-shahlab/meds_reader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meds_reader-0.1.15-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.15-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7a4d2fcaba6dcef95f3a3c99c866d298035e7edbc14ed5c6ee004c689a34c169
MD5 61ea9defb276d4fdd476f77cb1c81ac0
BLAKE2b-256 5dcedcee806d68f4c76371cd66685f2df74c692edc95e060768f0affe638ebf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.15-cp39-cp39-manylinux_2_28_x86_64.whl:

Publisher: python-build.yml on som-shahlab/meds_reader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meds_reader-0.1.15-cp39-cp39-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.15-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 4f357f26daccb4b9f7cdff8ce0c92f82283107ce705d698e5f1796201c320cfa
MD5 16059d180ce76312a250edfef2afb395
BLAKE2b-256 95937267ea44786c35e7bc7c0f64b63a31e1249ec494f44289439a8f43099521

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.15-cp39-cp39-macosx_12_0_x86_64.whl:

Publisher: python-build.yml on som-shahlab/meds_reader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meds_reader-0.1.15-cp39-cp39-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.15-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 184dfd58011577eabc4ddb2ef6244ee8bed2dce846c1ca4b427a7baeb43918d3
MD5 d1b035fbc990045986801f606325c484
BLAKE2b-256 65c8c638650644fe996e3ff393239a5b7c76b99e42b4754b16c48d9c780519ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.15-cp39-cp39-macosx_12_0_arm64.whl:

Publisher: python-build.yml on som-shahlab/meds_reader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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