Skip to content
@Medical-Event-Data-Standard

Medical Event Data Standard

A minimal, ML-oriented data standard for medical record data to improve reproducibility, robustness, and computational performance.

Medical Event Data Standard

This organization contains GitHub Repositories for the Medical Event Data Standard (MEDS), a simple dataset schema for machine learning over electronic health record (EHR) data. Unlike existing tools, pipelines, or common data models, MEDS is a minimal standard designed for maximum interoperability across datasets, existing tools, and model architectures. By providing a simple standardization layer between datasets and model-specific code, MEDS can help make machine learning research for EHR data dramatically more reproducible, robust, computationally performant, and collaborative. Alongside this report, we also release several existing integrations with models, datasets, and tools, and will work actively with the community going forward for further adoption and use. See our published work in NEJM AI for more details, and please leave comments or questions via GitHub issues to help us improve this effort! Find the Contribution guidelines here. The website also contains more information.

Software Ecosystem

Project Type Documentation URL Repository URL Paper URL PyPI License Description
Core MEDS Core Website GitHub OpenReview meds Apache-2.0 A data standard and community for building and sharing EHR machine learning tools
MEDS-Reader Preprocessing Docs GitHub arXiv meds-reader Apache-2.0 An optimized Python package for efficient EHR data processing achieving 10-100x improvements in memory, speed, and disk usage
MEDS-Transforms Preprocessing Docs GitHub Zenodo MEDS-transforms MIT A set of functions and scripts for extraction to and transformation/pre-processing of MEDS-formatted data.
MEDS-Extract ETL tool Docs GitHub Zenodo MEDS-extract MIT Config-driven ETL helpers built on MEDS-Transforms; the basis of the current dataset ETLs (v0.7 config-only layout).
ETL_MEDS_Template ETL tool GitHub MIT Template repository for a MEDS-Transforms/MEDS-Extract powered extraction pipeline for a custom dataset.
MESSY_synth ETL tool GitHub MIT Generates structurally faithful synthetic raw data from any MEDS-Extract v0.7 config, for ETL demos and smoke tests.
MEDS-ETL ETL tool GitHub meds_etl Apache-2.0 Efficient ETL that supports OMOP, MIMIC, eICU, PyHealth; optional C++ backend.
OMOP_MEDS ETL tool GitHub Zenodo OMOP-MEDS MIT Dedicated OMOP CDM to MEDS pipeline built on MEDS-Transforms.
MEDS on FHIR (fhir2meds) ETL tool Docs GitHub Zenodo fhir2meds none set Converts HL7 FHIR (v4/v5) resources into sharded, schema-validated MEDS Parquet.
EHR2MEDS ETL tool GitHub MIT Formats raw EHR dumps and converts them to MEDS (from the BONSAI / CORE-BEHRT group).
EHR2Trace ETL tool Website GitHub arXiv ehr2trace Apache-2.0 Auditable, source-linked conversion of hospital EHR data for patient world models and clinical agents.
meds_subsetter Preprocessing GitHub MIT Nested, hash-based subject subsetting, resharding, sizing and fingerprinting of MEDS datasets (marked AI-generated).
ACES Task extraction Docs GitHub ICLR 2025 / arXiv es-aces MIT A package and configuration language for reproducible extraction of task cohorts for machine learning over event-stream datasets
meds-random-task-sampler Task extraction GitHub meds-random-task-sampler MIT Model-independent, reproducible generation of code-by-horizon query tasks from MEDS datasets.
ehrlint Task extraction GitHub Apache-2.0 Audits a finished MEDS or OMOP prediction task for label leakage before training.
MEDS-Tab Modeling Docs GitHub arXiv meds-tab MIT A library designed for automated tabularization, data preparation with aggregations and time windowing.
MEDS-Torch Modeling Docs GitHub OpenReview meds-torch MIT Advancing healthcare machine learning through flexible, robust, and scalable sequence modeling tools.
meds-torch-data Modeling Docs GitHub Zenodo meds-torch-data MIT PyTorch dataset objects for sequence modeling over MEDS datasets (used by MEDS-EIC-AR).
FEMR Modeling GitHub MOTOR (arXiv) femr Apache-2.0 A Python package for manipulating longitudinal EHR data for machine learning, with a focus on supporting the creation of foundation models and verifying their presumed benefits in healthcare. Reads MEDS v0.3.
meds_to_cehr Modeling GitHub MIT Converts MEDS datasets into CEHR-BERT / CEHR-GPT patient sequences.
meds2text Modeling GitHub arXiv Apache-2.0 Transforms MEDS data into textual representations for LLMs.
TwinWeaver Modeling Docs GitHub arXiv twinweaver Apache-2.0 A package for training & evaluating LLMs on longitudinal clinical data.
WeavEHR ETL tool Wiki GitHub weavehr MIT Declarative YAML framework (Polars-based successor to ricu) that extracts and harmonises ICU data into MEDS concepts across MIMIC-IV, eICU, NWICU, HiRID, SICdb and AmsterdamUMCdb (via OMOP).
MEDS-Evaluation Evaluation Website GitHub meds-evaluation MIT Evaluation pipeline for MEDS model predictions in a shared pyarrow schema.
MEDS-DEV Benchmark Website GitHub MEDS-DEV MIT Decentralized, extensible validation benchmark for ML models on MEDS-formatted data.
MEDS-Inspect Exploration GitHub Zenodo MEDS-Inspect MIT A package to interactively inspect your MEDS data.
suMEDS Exploration Docs GitHub Zenodo suMEDS MIT Summarizes a MEDS dataset into a compact, digestible code catalog.
meds_summary_stats Exploration GitHub meds_summary_stats MIT Fast, privacy-safe summary statistics over MEDS datasets for validating and regression-testing ETLs.
MEDS_visualizations Exploration GitHub Zenodo MIT Visualization tools for MEDS datasets.
MEDS Testing Helpers Testing Docs GitHub meds_testing_helpers MIT Testing, benchmarking, and synthetic data generation helpers for MEDS tools, pipelines, and models.
MEDS Ontology Semantic Website GitHub Zenodo MIT OWL ontology encoding the MEDS conceptual data model.
meds2rdf Semantic GitHub Zenodo MIT Converts MEDS datasets into RDF using the MEDS Ontology.

Models

Model Type Params Pretraining Objective Input / Tokenization Zero-shot / Generative Originally Published Code License Pretrained Weights Paper Code MEDS Support
MEDS-TAB Tabularization + XGBoost AutoML (also LR, RF, kNN) n/a None (supervised only) Static features + rolling-window aggregates (count, sum, min, max, …) No arXiv 2024 MIT n/a arXiv 2411.00200 GitHub Native; in MEDS-DEV
GenHPF Hierarchical transformer (event encoder + aggregator) Not stated Optional SSL (SimCLR, Wav2Vec 2.0, MLM, SpanMLM); MEDS-DEV entry is supervised only Code descriptions as text (Bio_ClinicalBERT tokenizer), digit-wise numbers, time intervals No IEEE JBHI 2023 (arXiv 2022) MIT None arXiv 2207.09858 GitHub Converter (genhpf-preprocess-meds); in MEDS-DEV
CEHR-BERT BERT encoder Not stated (5 layers, 128-d) MLM + visit-type prediction Concept codes + artificial time tokens, visit tokens, age/time embeddings; optional values No ML4H 2021 MIT None PMLR GitHub Converter via meds_reader; in MEDS-DEV
CEHR-GPT / CEHR-XGPT GPT decoder Not stated (XGPT: 16 layers, 768-d, ctx 4096) Next-token; XGPT adds time-decomposition + time-to-event CEHR-BERT-style sequence with demographic prompt, artificial time tokens, value tokens Yes (zero-shot, synthetic trajectories) arXiv 2024 (XGPT: arXiv 2025) MIT None arXiv 2402.04400, XGPT GitHub Converter via meds_reader; MEDS-DEV PRs closed (dataset-specific conversion)
MOTOR Transformer + piecewise-exponential TTE head 143M Time-to-event over 8,192 code tasks femr hierarchical code tokenizer, quantile-binned values, rotary age embedding No ICLR 2024 Apache-2.0 (femr) Gated, CC-BY-NC 4.0 arXiv 2301.03150 GitHub Native via femr (MEDS v0.3 only); unmerged MEDS-DEV branch
CLMBR-T-base Transformer decoder 141M Next-code prediction 65,536-token OMOP code vocabulary Not evaluated NeurIPS 2023 D&B Apache-2.0 Gated, CC-BY-NC 4.0 arXiv 2307.02028 GitHub Native via femr 0.2.3; not in MEDS-DEV
Context Clues GPT / Llama / Mamba / Hyena ~116–127M Next-token prediction CLMBR tokenizer (39,811 tokens: codes, categorical values, numeric deciles) Not evaluated ICLR 2025 Apache-2.0 Gated, CC-BY-NC 4.0 (16 checkpoints) arXiv 2412.16178 GitHub MEDS via meds_reader → hf_ehr; not in MEDS-DEV
ETHOS / ETHOS-ARES GPT-2-style decoder ~45M (ARES) Next-token prediction Hierarchical codes (ICD-10, ATC), 10 quantile value tokens, 19 time-interval tokens Yes (zero-shot by trajectory rollout, synthetic data) npj Digit Med 2024; ARES: GigaScience 2025 MIT None (MIMIC restrictions) ETHOS, ARES GitHub Native MEDS; MEDS-DEV issue open
MEDS-EIC-AR Llama decoder ("everything-is-code") Presets ~4M–400M (estimate) Next-token prediction MEDS codes, decile-binned values, time-delta tokens Yes (trajectory generation) Software only (Zenodo 2025) MIT None — GitHub Native MEDS; MEDS-DEV PR #313 open
EveryQuery Llama-style decoder ~22M Task-conditioned query pretraining ("will code c occur in window?") MEDS codes with binned values; time as rotary positions Yes (promptable zero-shot classification + TTE, one forward pass) arXiv 2026; ICML 2026 workshop MIT None arXiv 2603.07900 GitHub Native MEDS; not in MEDS-DEV
MEDS-Torch Framework (transformer encoder/decoder, LSTM, …) Configurable OCP, EBCL (contrastive), STraTS forecasting, autoregressive, or supervised Triplet, Text-Code, or Everything-In-Code tokenizers Autoregressive variants NeurIPS 2024 workshop (TSALM) MIT None OpenReview GitHub Native MEDS; not in MEDS-DEV
BONSAI (successor of CORE-BEHRT) BERT encoder (RoPE, SwiGLU, Time2Vec) Not stated (CORE-BEHRT: 6 layers, 192-d) MLM (BONSAI also next-token) ICD-10 / ATC codes, age, timestamps; BONSAI can bin values No CORE-BEHRT: ML4H 2024; BONSAI: JOSS 2025 MIT (BONSAI); none (CORE-BEHRT) None arXiv 2404.15201 GitHub BONSAI native MEDS; original CORE-BEHRT is not; not in MEDS-DEV

Pretrained Models

Model Parameters Architecture Pretraining Objective Context Length Pretraining Data Released License Access Weights Paper Contact
CLMBR-T-base 141M Transformer decoder (12 layers, 768 hidden) Autoregressive next-code prediction 496 2.57M patients, Stanford Medicine (STARR, OMOP-CDM, structured only) Dec 2023 CC-BY-NC 4.0 Gated: CITI "Data or Specimens Only" cert + EHRSHOT Credentialed Health Data License HF EHRSHOT, NeurIPS 2023 Jason Fries (jfries@stanford.edu, model card)
MOTOR-T-base 143M Transformer (12 layers, 768 hidden) Time-to-event (piecewise exponential over future codes) 496 2.57M patients, Stanford Medicine (STARR, OMOP-CDM) Feb 2024 CC-BY-NC 4.0 Gated: CITI cert + EHRSHOT license HF MOTOR, ICLR 2024 Jason Fries (jfries@stanford.edu, model card); Ethan Steinberg
Context Clues: GPT ~116M GPT decoder Autoregressive next-code prediction 512, 1,024, 2,048, 4,096 2.57M patients / ~2B tokens, Stanford Medicine (STARR) Feb 2025 CC-BY-NC 4.0 Gated: CITI cert + EHRSHOT license HF collection Context Clues, ICLR 2025 Michael Wornow; Nigam Shah (nigam@stanford.edu, EHRSHOT paper)
Context Clues: Llama ~123M Llama decoder Autoregressive next-code prediction 512, 1,024, 2,048, 4,096 same as above Feb 2025 CC-BY-NC 4.0 Gated: CITI cert + EHRSHOT license HF collection Context Clues, ICLR 2025 same as above
Context Clues: Mamba ~121M Mamba (state-space model) Autoregressive next-code prediction 1,024, 4,096, 8,192, 16,384 same as above Feb 2025 CC-BY-NC 4.0 Gated: CITI cert + EHRSHOT license HF collection Context Clues, ICLR 2025 same as above
Context Clues: Hyena ~125M Hyena (long convolution) Autoregressive next-code prediction 1,024, 4,096, 8,192, 16,384 same as above Feb 2025 CC-BY-NC 4.0 Gated: CITI cert + EHRSHOT license HF collection Context Clues, ICLR 2025 same as above

Datasets

We now have an official MEDS MIMIC-IV demo dataset on Physionet, which allows you to familiarize yourself with MEDS without running or downloading any additional software.

Dataset Stays Version Frequency Origin Originally Published License Repository Link MEDS ETL Full Dataset Name
AUMCdb 23,000 v1.0.2 up to 1 minute Netherlands 2019 AmsterdamUMCdb End User License (non-commercial) DANS Github Amsterdam University Medical Center Database
eICU 201,000 v2.0 5 minutes USA 2017 PhysioNet Credentialed PhysioNet Github eICU Collaborative Research Database
HiRID 34,000 v1.1.1 2 / 5 minutes Switzerland 2020 PhysioNet Contributor Review PhysioNet Github High-Resolution ICU Dataset
INSPIRE 130,000 v1.2 (ETL now targets v1.4.2) 5 minutes (OR); ~hourly (ICU) South Korea 2024 Korea Credentialed Health Data License PhysioNet Github INformative Surgical Patient dataset for Innovative Research Environment
MIMIC-IV 73,000 v3.1 ~1 hour USA 2020 PhysioNet Credentialed PhysioNet Github Medical Information Mart for Intensive Care IV
NWICU 25,000 v0.1.0 Not specified USA 2024 PhysioNet Credentialed PhysioNet Github Northwestern ICU Database
SICdb 27,350 v1.0.8 1 minute Austria 2023 PhysioNet Contributor Review PhysioNet Github Salzburg Intensive Care Database
CDSL 4,479 (hospitalizations, not ICU-only) v1.0.0 Not specified (sparse, ~50 vitals rows per episode) Spain 2024 PhysioNet Contributor Review PhysioNet Github COVID Data for Shared Learning
ALOTT 15,000+ (hospital admissions, 270 telemetry beds) v1.0.0 2 seconds (vitals); 60–240 Hz (waveforms, not extracted by ETL) USA 2025 PhysioNet Restricted PhysioNet Github ALarms, Outcomes Telemetry with Timing
PIC 13,941 (ICU stays; paediatric) v1.1.0 ~daily (charted); 5 minutes (intra-op) China 2019 PhysioNet Credentialed PhysioNet Github Paediatric Intensive Care Database
Zigong 2,790 (ICU patients with infection) v1.1 Not specified China 2021 PhysioNet Credentialed PhysioNet Github Zigong Fourth People's Hospital ICU Infection Database
EHRSHOT 6,739 patients (921,499 visits; longitudinal, not ICU-only) Original / MEDS release (EHRSHOT_MEDS.zip) Not specified (coded structured events) USA 2023 EHRSHOT Credentialed Health Data License (modeled on PhysioNet 1.5.0) Redivis Native MEDS release (converter) EHRSHOT: An EHR Benchmark for Few-Shot Evaluation of Foundation Models

Moreover, we have these ETLs for other formats:

Citation

If you use MEDS in your work, please cite it like this:

@article{mcdermottMEDSEmergingData2026,
  title = {{{MEDS}} --- {{An Emerging Data Standard}} and {{Ecosystem}} for {{Health AI Research}}},
  author = {McDermott, Matthew B. A. and Steinberg, Ethan and Fries, Jason A. and {van de Water}, Robin P. and Pang, Chao and Rockenschaub, Patrick and Renc, Pawel and Oh, Jungwoo and Stankevi{\v c}i{\=u}t{\.e}, Kamil{\.e} and Xu, Justin and Pollard, Tom J. and Oufattole, Nassim and Wornow, Michael and Bergamaschi, Teya S. and Jeong, Hyewon and Lee, Simon A. and Jeanselme, Vincent and Klein, Kiril V. and Odgaard, Mikkel and Montgomery, Maria E. and Sitek, Arkadiusz and Nielsen, Mads and Chiang, Jeffrey N. and Dagan, Noa and Kohane, Isaac and Joshi, Shalmali and Choi, Edward and Shah, Nigam H.},
  year = 2026,
  month = may,
  journal = {NEJM AI},
  volume = {3},
  number = {6},
  pages = {AIra2501253},
  publisher = {Massachusetts Medical Society},
  doi = {10.1056/AIra2501253},
  urldate = {2026-05-28}
}

Coming Soon...

Tools that are planned to be compatible with MEDS:

Pinned Loading

  1. meds meds Public

    Schema definitions and Python types for Medical Event Data Standard, a standard for medical event data such as EHR and claims data

    Python 140 14

  2. MEDS-DEV MEDS-DEV Public

    The MEDS Decentralized Extensible Validation (MEDS-DEV) Benchmark: Establishing Reproducibility and Comparability in ML for Health

    Python 43 10

  3. MIMIC_IV_MEDS MIMIC_IV_MEDS Public

    The MIMIC-IV MEDS ETL

    Python 27 18

  4. meds_testing_helpers meds_testing_helpers Public

    Testing, benchmarking, and synthetic data generation helpers for MEDS tools, pipelines, and models.

    Python 4

  5. ETL_MEDS_Template ETL_MEDS_Template Public template

    A template repository for a MEDS-Transforms powered extraction pipeline for a custom dataset.

    Python 7 2

  6. meds_etl meds_etl Public

    A collection of ETLs from common data formats to Medical Event Data Standard

    Python 44 15

Repositories

Showing 10 of 16 repositories

Top languages

Loading…

Most used topics

Loading…