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.
-
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.
-
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.
-
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.