Skip to main content

An ETL to convert OMOP data to the MEDS format.

Project description

MEDS OMOP ETL with MEDS-Transforms

PyPI - Version codecov tests code-quality python license PRs contributors DOI Static Badge

An ETL pipeline for transforming OMOP datasets into the MEDS format using the MEDS-Transforms library. Thanks to the developers of the first OMOP MEDS ETL, from which we took inspiration, which can be found here: https://github.com/Medical-Event-Data-Standard/meds_etl. We currently support OMOP 5.3 and 5.4 datasets.

pip install OMOP_MEDS
OMOP_MEDS root_output_dir=$ROOT_OUTPUT_DIR

To try with the MIMIC-IV OMOP demo dataset, you can run:

OMOP_MEDS root_output_dir=/path/to/your/output do_download=True ++do_demo=True

Example config for an OMOP dataset:

dataset_name: MIMIC_IV_OMOP
raw_dataset_version: 1.0
omop_version: 5.3

urls:
  dataset:
    - https://physionet.org/content/mimic-iv-demo-omop/0.9/
    - url: EXAMPLE_CONTROLLED_URL
      username: ${oc.env:DATASET_DOWNLOAD_USERNAME}
      password: ${oc.env:DATASET_DOWNLOAD_PASSWORD}
  demo:
    - https://physionet.org/content/mimic-iv-demo-omop/0.9/
  common:
    - EXAMPLE_SHARED_URL # Often used for shared metadata files

Pre-MEDS settings

The following settings can be used to configure the pre-MEDS steps.

root_output_dir=path/to/your/output
raw_input_dir=/path/to/your/raw/input
do_download=False # Set to True to download the dataset
++do_overwrite=True # Set to True to overwrite existing files
++do_demo=True # Set to True to process demo dataset
++limit_subjects=50 # Limit the number of subjects to process

MEDS-transforms settings

If you want to convert a large dataset, you can use parallelization with MEDS-transforms (the MEDS-transformation step that takes the longest).

Using local parallelization with the hydra-joblib-launcher package, you can set the number of workers:

pip install hydra-joblib-launcher --upgrade

Then, you can set the number of workers as environment variable:

export N_WORKERS=16

Moreover, you can set the number of subjects per shard to balance the parallelization overhead based on how many subjects you have in your dataset:

export N_SUBJECTS_PER_SHARD=1000

Citation

If you use this dataset, please use the citation link in Github.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omop_meds-0.0.9.tar.gz (906.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omop_meds-0.0.9-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file omop_meds-0.0.9.tar.gz.

File metadata

  • Download URL: omop_meds-0.0.9.tar.gz
  • Upload date:
  • Size: 906.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for omop_meds-0.0.9.tar.gz
Algorithm Hash digest
SHA256 925a94b9303752009d923aa982cfcf01019771d9fa5cdee4e3ed3f7c2be6e03f
MD5 50b799cd998e08289484358a7f209a5f
BLAKE2b-256 0cb9de3fdf49d1332f58e57d88657ce70c366aea60cca91f217bbec67790814a

See more details on using hashes here.

Provenance

The following attestation bundles were made for omop_meds-0.0.9.tar.gz:

Publisher: python-build.yaml on rvandewater/OMOP_MEDS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file omop_meds-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: omop_meds-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for omop_meds-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ae5d1e7410858f75cb5638077078c793db0b4f99bca51018de283048bcf4b700
MD5 7fa08eed024557d3267374cdd375eb22
BLAKE2b-256 2888e7c3bf16f72e5cff87dc37844de40b0582a7fbd23436ad17ba08b02b5240

See more details on using hashes here.

Provenance

The following attestation bundles were made for omop_meds-0.0.9-py3-none-any.whl:

Publisher: python-build.yaml on rvandewater/OMOP_MEDS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page