DOI: 10.57761/r819-9y68
title: EHRSHOT

description: Jason Fries (jfries@stanford.edu)

Michael Wornow (mwornow@stanford.edu)

description: 👂💉 EHRSHOT is a dataset for benchmarking the few-shot performance of foundation models for clinical prediction tasks. EHRSHOT contains de-identified structured data (e.g., diagnosis and procedure codes, medications, lab values) from the electronic health records (EHRs) of 6,739 Stanford Medicine patients and includes 15 prediction tasks. Unlike MIMIC-III/IV and other popular EHR datasets, EHRSHOT is longitudinal and includes data beyond ICU and emergency department patients.

⚡️Quickstart
    1. To recreate the original EHRSHOT paper, download the EHRSHOT_ASSETS.zip file from the "Files" tab
    2. To work with OMOP CDM formatted data, download all the tables in the "Tables" tab

⚙️ Please see the "Methodology" section below for details on the dataset and downloadable files.
description: **1\. 📖 Overview**

EHRSHOT is a benchmark for evaluating models on few-shot learning for patient classification tasks. The dataset contains:

- **6,739 **patients
- **41\.6 million** clinical events
- **921,499** visits
- **15** prediction tasks

<!-- -->



**2\. 💽 Dataset**

EHRSHOT is sourced from [Stanford’s STARR-OMOP database.](<https://academic.oup.com/jamiaopen/article/6/3/ooad054/7236015>)

- Data follows the [OMOP CDM](<https://www.ohdsi.org/data-standardization/>) and is fully de-identified. 
- Unlike [most other EHR research datasets](<https://github.com/som-shahlab/ehrshot-benchmark?tab=readme-ov-file#prior_work>), EHRSHOT is not restricted to ED/ICU visits and instead includes longitudinal patient data for all hospital encounter types. 
- EHRSHOT does not contain clinical notes or images. 

<!-- -->

We provide the dataset in two main formats -- **EHRSHOT-Original*** *and* ***EHRSHOT-OMOP**.

- **EHRSHOT-Original **is the same exact dataset used in the original [EHRSHOT paper](<https://arxiv.org/abs/2307.02028>). 
- **EHRSHOT-OMOP **is a slightly more complete version of the EHRSHOT dataset which includes all OMOP CDM tables and additional OMOP metadata. 

<!-- -->

To access the raw data, please see the "[**Tables**](<https://redivis.com/datasets/53gc-8rhx41kgt/tables>)**"** and "[**Files**](<https://redivis.com/datasets/53gc-8rhx41kgt/files>)"** **tabs above:



Within the "[**Tables**](<https://redivis.com/datasets/53gc-8rhx41kgt/tables>)" tab...

1\. <u>EHRSHOT-OMOP</u>

\* Dataset Version: EHRSHOT-OMOP

\* Notes: Contains all OMOP CDM tables for the EHRSHOT patients. Note that this dataset is slightly different than the original EHRSHOT dataset, as these tables contain the full OMOP schema rather than a filtered subset.



Within the "[**Files**](<https://redivis.com/datasets/53gc-8rhx41kgt/files>)" tab...

1\. <u>EHRSHOT_ASSETS.zip</u>

\* Dataset Version: EHRSHOT-Original

\* Data Format: [FEMR 0.1.16](<https://github.com/som-shahlab/femr>)

\* Notes: The original EHRSHOT dataset as detailed in the paper. Also includes model weights.



2\. <u>EHRSHOT_MEDS.zip</u>

\* Dataset Version: EHRSHOT-Original

\* Data Format: [MEDS 0.3.3](<https://github.com/Medical-Event-Data-Standard/meds>)

\* Notes: The original EHRSHOT dataset as detailed in the paper. It does not include any models.



3\. <u>EHRSHOT_OMOP_MEDS.zip</u>

\* Dataset Version: EHRSHOT-OMOP

\* Data Format: [MEDS 0.3.3](<https://github.com/Medical-Event-Data-Standard/meds>) \+ [MEDS-ETL 0.3.8](<https://github.com/Medical-Event-Data-Standard/meds_etl>)

\* Notes: Converts the dataset from EHRSHOT-OMOP into MEDS format via the \`meds\_etl\_omop\`command from MEDS-ETL.

4\. <u>EHRSHOT_OMOP_MEDS_Reader.zip</u>

\* Dataset Version: EHRSHOT-OMOP

\* Data Format: [MEDS Reader 0.1.9](<https://github.com/som-shahlab/meds_reader>) \+ [MEDS 0.3.3](<https://github.com/Medical-Event-Data-Standard/meds>) \+ [MEDS-ETL 0.3.8](<https://github.com/Medical-Event-Data-Standard/meds_etl>)

\* Notes: Same data as EHRSHOT\_OMOP\_MEDS.zip, but converted into a [MEDS-Reader database](<https://arxiv.org/html/2409.09095v1>) for faster reads.



**3\. 🤖 Model**



We also release the full weights of **CLMBR-T-base, **a 141M parameter clinical foundation model pretrained on the structured EHR data of **2\.57M patients.** Please download from [https://huggingface.co/StanfordShahLab/clmbr-t-base](<https://huggingface.co/StanfordShahLab/clmbr-t-base>)



**4\. 🧑‍💻 Code **

Please see our Github repo to obtain code for loading the dataset and running a set of pretrained baseline models: [https://github.com/som-shahlab/ehrshot-benchmark/](<https://github.com/som-shahlab/ehrshot-benchmark>)


description: Access to the EHRSHOT dataset requires the following:

- Verified Affiliation with an **Academic, Government, **or** Industry Research Lab**. Please use your **verified email address** when applying, **do not use Gmail or personal emails.**
- Encryption Verification / Attestation for Data Storage
- Signing the terms of the EHRSHOT Data Set License 1.0
- Providing a short description of your intended research use of EHRSHOT
- CITI Training

<!-- -->

**Please allow 7-10 business days to process applications.**