Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.
 
 

Repository files navigation

EHR2MEDS

Overview

EHR2MEDS is a tool that formats dumps of Electronic Health Records (EHR) and converts them to MEDS (Medical Event Data Set) to be compatible with CORE-BEHRT.

  1. Raw → PREMEDS Conversion:
    Converts raw EHR data into a preliminary format called preMEDS.
    You need to run main_azure.py to run the PREMEDS conversion. For instructions on how to run on azure, see the Azure README. Example:

    python -m ehr2meds.PREMEDS.azure premeds <compute> -c <config_path>

    example:

    python -m ehr2meds.PREMEDS.azure premeds CPU-20-LP -c ehr2meds/example_configs/premeds/minimal.yaml

    Example configuration files can be found in the PREMEDS/configs.

  2. PREMEDS → MEDS Conversion:
    Transforms preMEDS data into a finalized MEDS cohort format.
    You need to run run.py to run the MEDS conversion. For instructions ons how to run on azure, see the MEDS Transform README.

    python -m ehr2meds.MEDS.MEDS_transform.run --config <config_path> --compute <compute> --experiment <experiment_name>

    Example:

    python -m ehr2meds.MEDS.MEDS_transform.run --config ehr2meds/example_configs/meds/run.yaml --compute CPU-20-LP --experiment MEDS

    Example configuration files can be found in the MEDS/MEDS_transform/configs.

  3. Normalization:
    (Optional) Normalizes lab test data before MEDS conversion.
    You need to run main_normalise.py to run the normalization. Example:

    python -m ehr2meds.PREMEDS.azure normalise <compute> -c <config_path>

    Example:

    python -m ehr2meds.PREMEDS.azure normalise CPU-20-LP -c ehr2meds/example_configs/premeds/normalise.yaml

    Example configuration files can be found in the PREMEDS/configs.

About

Backup of the ehr2meds repo (10/2-26)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages