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.1.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.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meds_biobank-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 59e3ad743df9b6f4b7501d41469a9f2f9430a64302f7856ad956ab6702c9156c
MD5 8715266e952b149f22c3c5e35cf61c3d
BLAKE2b-256 726dc64d977342874cb65d694ef420626e74c5e56b883d59bf4747099d719241

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meds_biobank-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a63d901d5651ff7f31a0dab8b55ca5c643ed4501f2648188d7f35e26f2cf9c39
MD5 9b4f765ef52dfbd0ea74d202b1da87da
BLAKE2b-256 f4ffbd52c0de7505871c087152c74f7953b0d0a73fa660e285ddfe4d52bb1c56

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