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.9.tar.gz (60.6 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

meds_reader-0.1.9-cp312-cp312-macosx_12_0_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12 macOS 12.0+ x86-64

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

Uploaded CPython 3.12 macOS 12.0+ ARM64

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

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

meds_reader-0.1.9-cp311-cp311-macosx_12_0_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.11 macOS 12.0+ x86-64

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

Uploaded CPython 3.11 macOS 12.0+ ARM64

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

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

meds_reader-0.1.9-cp310-cp310-macosx_12_0_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.10 macOS 12.0+ x86-64

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

Uploaded CPython 3.10 macOS 12.0+ ARM64

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

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

meds_reader-0.1.9-cp39-cp39-macosx_12_0_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9 macOS 12.0+ x86-64

meds_reader-0.1.9-cp39-cp39-macosx_12_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.9 macOS 12.0+ ARM64

File details

Details for the file meds_reader-0.1.9.tar.gz.

File metadata

  • Download URL: meds_reader-0.1.9.tar.gz
  • Upload date:
  • Size: 60.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for meds_reader-0.1.9.tar.gz
Algorithm Hash digest
SHA256 7f4e3724b2512840d1cca38dc4d1c20ec68a429fe89b14d8f8b0ac5e3f726bae
MD5 23b947e72f7f5a84d54f670c9f7f59fb
BLAKE2b-256 f38838e5f4e1e956c905e23d6b19e83ee6c20d9355e020c8eafb4b06e77e6a7b

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d52c14a425167d71769fe6b4b1233fabf5310d8c60129c98ae5e10554a9542e0
MD5 7eb8ba0192d2b1311f291a97c471e375
BLAKE2b-256 6a504824f02d46502ef18e7f1757e35f628f0d9548718ac38b296fd1c93c5684

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp312-cp312-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 f106a0e3996567b252832db62bf0c3d816e9944131cb14a53d46f39b8d004a24
MD5 00fda18b12f88949c5ee4f4c487c6afd
BLAKE2b-256 d47e07b94b3ab4257f06a6bb199632ae784ab04152141493ffb4c390ad2c73b6

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp312-cp312-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp312-cp312-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 cad2be6db67b0c9affbe18bc4c4cb2d4c6156756149a2222d3d9e9d2bc550f27
MD5 41d0c99316b1a28c01633679139c329b
BLAKE2b-256 913caedc3ec8a149f436f112fa4d83ceae51210c33ae8be3e6c006070c852a61

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d5f82ab852f7f90384dbd35970a29da441f7db98aea6e5e4b35242c6130137f7
MD5 715ba9e11b7fe6be9fc683b987df18f9
BLAKE2b-256 86270dc9c6d89c362423259494a777e9a31bf9f98c426104cc06de5d74418443

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp311-cp311-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 4e8b51734c3d64ada3ef70e01c38abcce59241cf8e7b72ff9bc44df7cedb527d
MD5 0ce4faa1eeb19176f22c08ece32c896d
BLAKE2b-256 9f3ec68d78a2cbf5e80601b1bab32200c7b66ebaaedcb45623663a9a7306b199

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp311-cp311-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 46b15f8d812327faf8a9d706f24fcf0095e581d08c1a34cd07b3c0b066ab90bc
MD5 00688e699df1ab1e7a55a4d26e32bc9b
BLAKE2b-256 e141cefac738bf7e95cb5e5a9bd114d4d39e3de46fa5659be32af1eb18bea27c

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d7c51a37c3d05485a92682f9fb58b2917fd33df8af9d0f5ba9837dfffaacbcbf
MD5 79a0bb3f5e581931be24b385ddd6bafa
BLAKE2b-256 b34b32c2f5abae6b9f540192eab08579591c66ec4c72746ab7c46745ea079ed1

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp310-cp310-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 bf6f7597a9a5b66288a84e42b4a848b2a1925f9fd8a2d4a5c847353412637146
MD5 cc1e6f514f0143b22e52906c93fce5e8
BLAKE2b-256 7052c479e8eec8c1e7d11180660d2bc2c32bd9b6ca65297c8d5b5196d8d564c1

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 11d58e1ea17e0a7a09b632f6a73045f52b6e2176893a0148d54c3466c4ff2b5b
MD5 075491f0476bd2c73192ecf234e620cb
BLAKE2b-256 08f50b135bb3e0027a0b1bac59e83ce74d1e3489aadbfb8deef82ca3e89e56e6

See more details on using hashes here.

File details

Details for the file meds_reader-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58f1679168705f9d95ad27b455cc2fabde5bd0724694bc547dd906e7263d50c7
MD5 9591da2fd5ab64c4c68bbf759430c84c
BLAKE2b-256 80e4a44b7939caedf748846d2313a773d1f43ba36a62f7049d67dc22645f77c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 b818893dcdd131a12f43f2b636562b2579fbcde313fdf101c6e7e0a06833e6b2
MD5 3e40c35dd960bb035d4a5bbdff0df618
BLAKE2b-256 fe667c0d694c097d144f3b48f16edab51bdc2e4a5d1abfe58ca87657fed5ab89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for meds_reader-0.1.9-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 ae21678ee05a547d4b32215fa6593b2307c5536ed2be40a37afb2ebfd59f86ae
MD5 77f8d56586d511c9a4a513507711eeb3
BLAKE2b-256 624e2937ba8804843a8e9179947f5e3592c621ded24b13850daaea6732ef9f97

See more details on using hashes here.

Supported by

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