Skip to main content

Unofficial, lightweight Python re-implementation of parts of the **MEDS** software ecosystem, built to operate on in-memory tables loaded via PySpark rather than directly on disk. Designed for small-to-medium biobanks queried through cloud services in interactive Python notebooks.

Project description

meds-biobank

Unofficial, lightweight Python re-implementation of parts of the MEDS software ecosystem, built to operate on in-memory tables loaded via PySpark rather than directly on disk. Designed for small-to-medium biobanks queried through cloud services in interactive Python notebooks.

Primary target: Penn Medicine Biobank


Table of Contents


Features

ETL

OMOP MEDS-ETL 0.1.3

Path /meds-biobank/src/meds-biobank/etl_pipelines/omop_meds_nwsted.py
Description Re-implementation of src/meds_etl/omop.py from meds_etl v0.1.3. Converts OMOP v5.4/5.3 → MEDS v0.1.3 (nested format). Use with CLMBR-T-base / FEMR v0.2.3.

Workflow

  1. Extract all events
  2. Prune / deduplicate patient event streams
  3. Convert event streams into nested patient representations

Differences from source Pruning (delta_encode, remove_nones) happens before finalizing the MEDS mapping.

Supported Tables person · visit_occurrence · procedure_occurrence · condition_occurrence · drug_exposure · observation · measurements · death

Options

  • Pre-ETL of measurements: value/unit conversion + separation into labs and vitals
    • Sub-options: where possible vs. drop messy

OMOP MEDS-ETL 0.3.11

Path /meds-biobank/src/meds-biobank/etl_pipelines/omop_nested_flat.py
Description Re-implementation of src/meds_etl/omop.py from meds_etl v0.3.11. Converts OMOP v5.4/5.3 → MEDS v0.3.3 (flat format, handles visit discharge).

Workflow

  1. Extract all events
  2. Prune / deduplicate patient event streams
  3. Order event streams by patient, time

Differences from source Pruning (delta_encode, remove_nones) happens within the ETL, rather than as part of the tokenizer (FEMR 0.2.3 transforms sub-module).

Supported Tables person · visit_occurrence · procedure_occurrence · condition_occurrence · drug_exposure · observation · measurements · death

Options

  • Pre-ETL of measurements: value/unit conversion + separation into labs and vitals
    • Sub-options: where possible vs. drop messy

Ontology Transforms

Code Vocabulary

  • vocab_id / concept_code
  • Original concept_id
  • Categorizations (CCS, Phecodes)

Measurement Representation

  • Decile-binned with zero-handling

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

meds_biobank-0.0.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

meds_biobank-0.0.2-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file meds_biobank-0.0.2.tar.gz.

File metadata

  • Download URL: meds_biobank-0.0.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for meds_biobank-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d0dc2e92200271f47a12714e1b63e2c7c10056ebad35a7bb8fb6110cc10237da
MD5 707c42f6239fc100236b05c1f69e0c4c
BLAKE2b-256 8512b4506afda44bfda566decd6460ab2fceaa90b9be824c4548cee2e7437200

See more details on using hashes here.

File details

Details for the file meds_biobank-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: meds_biobank-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for meds_biobank-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a5b330e4f8f1fe3bbd7826a50a3f9887e9b5d08f1b8fa110f045996f3c5f1b1
MD5 005a1c88d12d1d1c99e2f11e124d0a32
BLAKE2b-256 9107b0b705044835adef0e1eb4b9f48c55940c34f88c17c8320eec14758f52c6

See more details on using hashes here.

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