Add documentation of how to use MIMIC OMOP Template#41
Open
Zhimin-arya wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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.
| | 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. | |
| | `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. | |
| | `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). | |
| | 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` | |
|
|
||
| ## 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Test if the flow runs successfully as template
DATAFLOW_TEMPLATE_BRANCHenvironment variable in docker-compose.yaml to the branch being reviewed and successfully run the flowInspect the nodes in the flow (either as a template or imported json file):
[Currently not visible in UI]