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.10-cp312-cp312-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.12Windows x86-64

meds_reader-0.1.10-cp311-cp311-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.11Windows x86-64

meds_reader-0.1.10-cp310-cp310-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.10Windows x86-64

meds_reader-0.1.10-cp39-cp39-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.9Windows x86-64

meds_reader-0.1.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

meds_reader-0.1.10-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.10-cp39-cp39-macosx_12_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.9macOS 12.0+ ARM64

File details

Details for the file meds_reader-0.1.10-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b68fcc257afe6f5dbda750312532e1617ca88a7a822331b68613f3475a2bcd06
MD5 a6c6ea94a94eaa09892a2c72cd0661b2
BLAKE2b-256 0ab9bfec75d12e827dda86db3dd2787e815a962b530219fdf7651384777a03fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.10-cp312-cp312-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.10-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 18f08aae1bfb67484691f412a9a36259fce8d41d1d627c7e21fb579cd0ed5cd4
MD5 17f90e936b805e099f8db684aa01d1cd
BLAKE2b-256 1556942a9814d2cb623024c69eb48d7cc11e04858858dfc81ca4a2b1f28e3d77

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.10-cp311-cp311-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.10-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3e19897c6cb36e634cf839af38b1047f66895e3b52d4388e854cea09d1a810c7
MD5 2a073be1dde31466a667d7a8966cdf80
BLAKE2b-256 08b196df54bb15498c9d39bdec58873497802ca968a00f68309c5bf599b0f97b

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.10-cp310-cp310-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.10-cp39-cp39-win_amd64.whl.

File metadata

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

File hashes

Hashes for meds_reader-0.1.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 037718604f1d6225a18fb6df387c86641efbe7f7256672855679a0137081dcd9
MD5 59cd3a6b22ea2c35adc5191d0376a008
BLAKE2b-256 94f84f9a68c12981dd7644d290d3bb260f3296a5b54c7c5b1b3162dce8bb793e

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.10-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.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5b2fca4b026b7082f5d3c66c898c8dd269cb9905d3d60e3ee0fe43cd0b55232d
MD5 d18a6eabc2b6f4dffe9615ed0e3b756c
BLAKE2b-256 52ccf59ba89cda3a2ae73d63114339f12b0199bed7ce04279263ecef5dba4e3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_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.10-cp39-cp39-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.10-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 9b7056160d351c371533e7db4ad97093b823c2e539da1459038fd9d2457a8270
MD5 42bd464bc6ddba0823b554944a8abce3
BLAKE2b-256 6c4b5e301a4e8ca0a419d640873f745d5859fefb1a39965e1cd47a85c2a5cdba

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.10-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.10-cp39-cp39-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.10-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 d4a147455778af5b563d0b5ae0a9eceb33d7069314a27b8c1e48dc07ef32ed79
MD5 564dbeb6896d61104b4d1c68850aae71
BLAKE2b-256 2d67464c9238e9c18cc5cf6e3d4e6d6bd37d71b08609a2e1959d55d2d0e2cc63

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.10-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