Skip to content

Add documentation of how to use MIMIC OMOP Template#41

Open
Zhimin-arya wants to merge 2 commits into
mainfrom
Zhimin-arya/data-2218_add_doc_for_how_to_use_ETL_template
Open

Add documentation of how to use MIMIC OMOP Template#41
Zhimin-arya wants to merge 2 commits into
mainfrom
Zhimin-arya/data-2218_add_doc_for_how_to_use_ETL_template

Conversation

@Zhimin-arya

Copy link
Copy Markdown
Contributor

Merge Checklist

Please review this list and check any items that require additions or modifications beyond your core changes. Reviewers can also use it to help confirm that nothing was missed.

Test if the flow runs successfully as an imported json file

  • Import the flow as a .json file and successfully run the flow

Test if the flow runs successfully as template

  • Switch DATAFLOW_TEMPLATE_BRANCH environment variable in docker-compose.yaml to the branch being reviewed and successfully run the flow

Inspect the nodes in the flow (either as a template or imported json file):

  • Each node has a short description that helps the user understand what the node does
  • Added documentation and type hints for embedded Python functions in flow templates (code in the Python node)
  • Result and error are removed in node data i.e. there should be no result or error visible for the nodes

[Currently not visible in UI]

  • Added a description for the flow template, including the OMOP CDM version and supported database(s)

Copilot AI review requested due to automatic review settings July 6, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new documentation file, flows/mimic_omop.md, describing how to use the existing mimic_omop.json dataflow template that converts a MIMIC-IV dataset into the OMOP CDM 5.3 format via an intermediate DuckDB file. It documents prerequisites, system setup for the full dataset, flow variables, run modes, and the seven pipeline stages. It is documentation-only and adds no executable code.

Changes:

  • Adds prerequisites and full-dataset system setup notes (vocabulary transformation, volume mounts, memory/disk requirements, benchmark runtimes).
  • Documents the flow variables, run modes, and optional Prefect tuning variables.
  • Documents the seven-node pipeline and general usage notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread flows/mimic_omop.md
| Variable | Default | Description |
| --- | --- | --- |
| `flow_action_type` | `mimic_to_database` | Which part of the pipeline to run. One of `mimic_to_database`, `mimic_to_duckdb`, `duckdb_to_database` (see run modes below). |
| `database_code` | `demo_database` | Code of the target database registered in d2e. Used only when exporting. |
Comment thread flows/mimic_omop.md
| `schema_name` | `dataflow_ui_mimic` | Schema created in the target database to hold the exported CDM tables. |
| `overwrite_schema` | `True` | If the target schema already exists: `True` drops and recreates it, `False` fails the run. |
| `use_trex_connection` | `False` | `False` uses the direct path (DuckDB `ATTACH` for Postgres, SQLAlchemy chunked inserts for HANA). `True` exports through the trex pgwire passthrough (works for both Postgres and HANA). |
| `chunk_size` | `5000` | Number of rows per insert batch during export. |
Comment thread flows/mimic_omop.md
| `database_code` | `demo_database` | Code of the target database registered in d2e. Used only when exporting. |
| `schema_name` | `dataflow_ui_mimic` | Schema created in the target database to hold the exported CDM tables. |
| `overwrite_schema` | `True` | If the target schema already exists: `True` drops and recreates it, `False` fails the run. |
| `use_trex_connection` | `False` | `False` uses the direct path (DuckDB `ATTACH` for Postgres, SQLAlchemy chunked inserts for HANA). `True` exports through the trex pgwire passthrough (works for both Postgres and HANA). |
Comment thread flows/mimic_omop.md
| 1 | `load_mimic_data` | Loads the raw `hosp/` and `icu/` CSVs into `mimiciv_hosp` / `mimiciv_icu` schemas of the DuckDB file. | `mimic_to_database`, `mimic_to_duckdb` (and `load_mimic_vocab=True`) |
| 2 | `load_vocab` | Loads the Athena vocabulary CSVs into `mimic_staging` and generates the MIMIC custom vocabularies and concept mappings. | same as above |
| 3 | `staging_mimic` | Creates the `mimic_etl` schema, stages core/hosp/icu data, copies the vocabularies in, then drops the raw input schemas. | same as above |
| 4 | `etl_transformation` | Runs the 33 MIMIC-to-OMOP transformation scripts (lookups, clinical tables, era tables, metadata) inside `mimic_etl`. | `mimic_to_database`, `mimic_to_duckdb` |
Comment thread flows/mimic_omop.md

## System setup for the full MIMIC-IV dataset

Complementary setup notes for running the conversion on a complete MIMIC-IV dataset (supported versions: **v2.2** and **v3.1**; waveform and clinical note data are not convered).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants