A Pythonic interface for MEDS datasets
Project description
meds_reader: A Pythonic interface for MEDS datasets
meds_reader is a fast and easy-to-use library for reading and processing patient 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.
[!WARNING] meds_reader is currently in early stage development and the API is still in flux. Please leave feedback and use at your own risk!
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
# Now we can use Python to interact with our data
import meds_reader
# We can now construct a database
database = meds_reader.PatientDatabase("mimic_meds_reader")
# Databases are dict-like objects that store patient data
# We can iterate through all the patient ids in the database
for patient_id in database:
# We can retrieve patient data given a patient_id
patient = database[patient_id]
# Patient data can be manipulated with normal Python operations
print(patient.patient_id)
for event in patient.events:
print(event.time, event.code)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for meds_reader-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 384efd1b9aaecc7f3f892a6b0e506d332aaf49bac8e9f9b4f00b0969b6423b7f |
|
MD5 | 3f255f4426276767ce3902400783e338 |
|
BLAKE2b-256 | 321699d5ad009296c6ae32739bf321e64d87e92b448d2e9dc5a1804f6e1814c2 |
Hashes for meds_reader-0.0.4-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efb1ca8c4d823c0bee85f62401cd895397cbb60dd7fa8889b2e1b2719f81dd82 |
|
MD5 | 17d3485de7e81ab23768df9555b60a3e |
|
BLAKE2b-256 | 8e1c484094da008d0ee73a49f7753780f5b2d0870fcf8c5b2d4123605faf3d35 |
Hashes for meds_reader-0.0.4-cp312-cp312-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42039f61c5338cec8585a84b86a433c513b4f674502c3e95be8ad8cb87c417ed |
|
MD5 | b03ee6f2d75b5722edc77805d92cdf9c |
|
BLAKE2b-256 | f8b90f6075e5c3827c48cc3c0e420937a32769fa9f9f1eccf1726b44084ff812 |
Hashes for meds_reader-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf2e2e9fab4258bfb22b8af20f9cf239de9f31059fd65e444034562abf17dc3 |
|
MD5 | 99dc9aa803411045c676146e9c93954b |
|
BLAKE2b-256 | 1a49bfc890ebf1cc0e221669d848f0cc1642f61a6bd8c09aeaad7dbb9cb3fc75 |
Hashes for meds_reader-0.0.4-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a433582473d8c44b449756136d5895e793ebdb38f4e4ed832ec1fd59cdef2d10 |
|
MD5 | 1992ef1b295f9b908270dea2866b9db8 |
|
BLAKE2b-256 | cc5c838e7e27b2008a304ef5261ddb8fec296dbb6fd79d4e41fa614dc7a3512a |
Hashes for meds_reader-0.0.4-cp311-cp311-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7e8dbff22ecb20a7c9b16af0e4b831dd5f4bcd67ff09b34c491331269695c71 |
|
MD5 | 2c26318e21856067f798c8530fabfae7 |
|
BLAKE2b-256 | c186a0f258a444874a0295130dd5191d48a5ae3bb5289e8439a6b6d6c0c1734f |
Hashes for meds_reader-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b749e43857369e8779fc960f02b4521d911a226e26c33574465a77477bc5cb8d |
|
MD5 | 59b61d72656494b0d5e135c3ae7b6d35 |
|
BLAKE2b-256 | 2f4720e1a8ef9a2dc07078ec82b89cf3e3533f15da25d919dd4c7eeef15dd213 |
Hashes for meds_reader-0.0.4-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f74e7642b332e05caac21b19a1e9469bf9ae203a70ecfee0b422048a5ddd342 |
|
MD5 | 12d652676d4dd5a8414bb6ef6c9f3223 |
|
BLAKE2b-256 | e10d57e7845e1022640137cab896207b0befcebdc9f51c18e967cf05909a770f |
Hashes for meds_reader-0.0.4-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de9160b7b9c86b4347a1af9ebac2357c5a98f7fa0c4748777e6c289833b119e5 |
|
MD5 | d2bfeb01e8c3b9209af27803d89b2e10 |
|
BLAKE2b-256 | d02b97fa8aca6ec73e208fe28a0dcde986da2be4bd6b332088b8e4e7ab76338e |
Hashes for meds_reader-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fe3827719110b7aa9d0e0d244c743603a878fbd33019bc2720a668a09d4c0ce |
|
MD5 | b00d18a358d0e5bee33146caf980dceb |
|
BLAKE2b-256 | 2c8ca97ad2204f56cae63ad6580c9fbd8c3172320aaf0fb71ac0aa021d7097b9 |
Hashes for meds_reader-0.0.4-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 634b80dce13ec0998e03266f9659bbf090baaaad1cd523df408c3e677fc32773 |
|
MD5 | c5817f1bd7bf037d3987ee7135573454 |
|
BLAKE2b-256 | 13086d26706046e8b8285156764ac4c0ad81b11a2943242a9d5c60cf87c63eed |
Hashes for meds_reader-0.0.4-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49d2a73d55b4ed29650c4a43aa2469fca7dbc5b9e2ba2e85238252059e59d335 |
|
MD5 | 3b850d74713cb3ce0f7703b111f5e673 |
|
BLAKE2b-256 | 7237eb26ec7bd347202213ff71bb3a5f9462bafc542da93b04811e323dd16575 |