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 Distribution

meds_reader-0.1.14.tar.gz (57.8 kB view details)

Uploaded Source

Built Distributions

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

meds_reader-0.1.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

meds_reader-0.1.14-cp313-cp313-macosx_12_0_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.13macOS 12.0+ x86-64

meds_reader-0.1.14-cp313-cp313-macosx_12_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.13macOS 12.0+ ARM64

meds_reader-0.1.14-cp312-cp312-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.12Windows x86-64

meds_reader-0.1.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

meds_reader-0.1.14-cp312-cp312-macosx_12_0_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.12macOS 12.0+ x86-64

meds_reader-0.1.14-cp312-cp312-macosx_12_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.12macOS 12.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

meds_reader-0.1.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

meds_reader-0.1.14-cp311-cp311-macosx_12_0_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.11macOS 12.0+ x86-64

meds_reader-0.1.14-cp311-cp311-macosx_12_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

meds_reader-0.1.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

meds_reader-0.1.14-cp310-cp310-macosx_12_0_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10macOS 12.0+ x86-64

meds_reader-0.1.14-cp310-cp310-macosx_12_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

meds_reader-0.1.14-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.14-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.14-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.14.tar.gz.

File metadata

  • Download URL: meds_reader-0.1.14.tar.gz
  • Upload date:
  • Size: 57.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for meds_reader-0.1.14.tar.gz
Algorithm Hash digest
SHA256 0474f3c2e29a4a31643efbd5f643c8ce61d9574b3effc3e68524f1fb70055656
MD5 5193e349d073ba35c7f461671bd12bc2
BLAKE2b-256 9debc55d7786b982046dac79b9c710c51ceb29b2046d0899d5ecb478bef6cc0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14.tar.gz:

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.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9f27ae88c20202f45970df27670f591407ff77e9fb3fc16fd21f738680c1c431
MD5 3fec0c4998e6c9b52853bd54c43b882c
BLAKE2b-256 9f604d79dd3b9c03ed2c530b8746764936f19eb576dac2f15a5336436bd04c01

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-cp313-cp313-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.14-cp313-cp313-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp313-cp313-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 9b2dd9e2b54c1e6dc36cff8cc00f8c6301664886709f436f5fc44f049c46eefc
MD5 f0214dbac73178de0419537ce289dfb5
BLAKE2b-256 027376dd1ccc85075ca68abc4c7293169e01739ee251a04cbe4ce7b7a6c9b80e

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-cp313-cp313-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.14-cp313-cp313-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp313-cp313-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 a52b7926f67083a89e12a2be108bdf404197ab70b4b4d8987943b81da54b18e8
MD5 a9031d78b12d4eee27767af1d6c1f4a0
BLAKE2b-256 f741f5c0a30fdd99b24f94cf88c72c6959c362112200bd4aca7a96c25a96ca6e

See more details on using hashes here.

Provenance

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

File details

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

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b3630564be425fa395015fec3e719f48848d8696a0432cb5197cf97e588d7ae2
MD5 42b4c39755fde9954dca4d7b53ed7d84
BLAKE2b-256 644e5f8b2da7ec33c53a9c7ada13a2874c7c6130f6dcf343854235069a8a9408

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-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.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d2b0e6ea6602bcdab6137ce33b1bca9fb2ca2ddd1bda641fd4a69da7ad04d6fb
MD5 0b4e5b05e02f8645ac8d53136d955386
BLAKE2b-256 5c411264b2b4afac7dbd202cf075b3dcd7f52ecb3f46da90eadd0129efb4d961

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-cp312-cp312-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.14-cp312-cp312-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 b5d3492ea190490aad828b236a778807a4648f374d6a1844fa47e48677d171be
MD5 65f7d8d9c04a8e7e63a8fc9ca7ba40dc
BLAKE2b-256 24509df49219a7101954431d4e04ada9f19cf79a60152e702b09c8feec8d519b

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-cp312-cp312-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.14-cp312-cp312-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp312-cp312-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 9b6327f5f8132665e8c5f72611278b9a3b43f2715e267ec51e49152a58e82415
MD5 43627793d72cf3b2ebe63114b5495e8b
BLAKE2b-256 a44df5abdbedbcead359800917775be042782519b06cba835aa45c0c0126a237

See more details on using hashes here.

Provenance

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

File details

Details for the file meds_reader-0.1.14-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ababf6312e1eb0bd7caecc9e3bcce93dada81c31952c4b3fac54360c432dd30f
MD5 2a8a99e040d79b66df5123b5a62957ec
BLAKE2b-256 cd6a74fa6d0254a43ca3ef70329b3c666122fdff0a943f0ac1a4f3c97d2a0928

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-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.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5e10f457f39e73c897342026bd3ccda3ee93599f82dcbec67311197cdb0bb81d
MD5 ac822c0acf35cb3df7a1b339761ef7ff
BLAKE2b-256 714b2f9433c89048227ea6ea45d3bd6e3ca98598820f8a1fa25e957f0d28a0d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-cp311-cp311-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.14-cp311-cp311-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 1cecbcef2ab71b2e13780bc4365437f510cd860d8c34f67caf6d5cca4e046df0
MD5 563ac77c995e335dd38b03ba4e5de1ea
BLAKE2b-256 ab4e3df4ee028445e22db5ccc476714e1445aba879e9894bae2716d13848ac6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-cp311-cp311-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.14-cp311-cp311-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 51a5f7c41a3b7702eabca7fcf0d5fb9372436b007c3871b9b82a258a4b737873
MD5 043ca6d1e61ad609b58d4faeb43fa6f1
BLAKE2b-256 4046d88e9bd8cbea56b37a381d0fcdb13a1871437da4ac1af8a514d5f3c5300f

See more details on using hashes here.

Provenance

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

File details

Details for the file meds_reader-0.1.14-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 87925855d45bd9e9d7cc638a9c250e1ac6efdf7630d24b158a44e3b93a2b9f86
MD5 6ef56f4e7ad5163cc4b3f1c5e6cf5549
BLAKE2b-256 40cd4d4131067dab081a1656b786ac0e682eee604c8ac5cbe8f0bba970bdabec

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-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.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 260aacb5fb3a8fe35feb5b0a89a497d85df3401223ef03a147936e4efc1e2d74
MD5 c75613078a58da4acbc4fa74a35eec30
BLAKE2b-256 6e21c6497d73558b909b063c12de4f6b83bb7a7bc8cbd43748267608897e94a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-cp310-cp310-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.14-cp310-cp310-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 0dff7c67ab60c90b3ccb3942ab20615a215789cb5d9120788ad53bd2582738e7
MD5 c2912f75ab4d4e0f98c3662a991299a9
BLAKE2b-256 0e166c968c0409031798f10608a518a93d89e737338055fd9941b49579e8b546

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-cp310-cp310-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.14-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 6d0a94b070b32cd5b4cbedf64a6f1b5c5f6c8740a92fdebcbf769ba49231f815
MD5 7a9f262816c836d88dbca6087befa6e4
BLAKE2b-256 65fa3d79a9b68dc3d780d98a0ecd50ae49fb6292e20845c607eb81b7f3fc0dd6

See more details on using hashes here.

Provenance

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

File details

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

File metadata

  • Download URL: meds_reader-0.1.14-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.14-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 456f000ee3904100a87f4a1e91aab165b83824ef08e17b2f0166be930a269d21
MD5 dea1476b768173d6447137128723fa20
BLAKE2b-256 e471ce7b73f07dbb9052f6d745a29aea101609343a2b98474d658f7d86274b06

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c5dc990bca69d480774e72404622c72dedf4b68f37244cfedb229bfc80e5cdce
MD5 10e7679e750a481d4ed39aeb6b7e7f0d
BLAKE2b-256 fcd6bd250c1f23ec8cf1e757f461893e0882df41cc73535bcc668c37f4606181

See more details on using hashes here.

Provenance

The following attestation bundles were made for meds_reader-0.1.14-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.14-cp39-cp39-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 45ed06259935d36dc9579515d6ca5cb2e739b6bc344809151fdf6470789099c5
MD5 74566ddf9c2949b8864e3ce3314f5941
BLAKE2b-256 1052910d9816ffe3c3ff37e068f1399e66c2342b1f97a2cf5a79e98500650475

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for meds_reader-0.1.14-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 700e3d713fbeb4e57c413863d6e6ac7394c6e17b161e25d9c329fb850049fcbb
MD5 435bdea7c76a66be0356e150baf87259
BLAKE2b-256 9cc38b5716182f8aebc825416076b2d56b917f7e8a8f1272c1b9d7c4a65cfe7f

See more details on using hashes here.

Provenance

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