ehrdata.dt.mimic_iv_omop

Contents

ehrdata.dt.mimic_iv_omop#

ehrdata.dt.mimic_iv_omop(backend_handle, data_path=None)#

Loads the MIMIC-IV demo data in the OMOP Common Data model.

Loads the MIMIC-IV demo dataset from its physionet repository [KTP+21] [GAG+00].

Parameters:
backend_handle DuckDBPyConnection

A handle to the backend which shall be used. Only duckdb connection supported at the moment.

data_path Path | None (default: None)

Path to the tables. If the path exists, the data is loaded from there. Else, the data is downloaded.

Return type:

None

Returns:

Nothing. Adds the tables to the backend via the handle.

Examples

>>> import ehrdata as ed
>>> import duckdb
>>> con = duckdb.connect()
>>> ed.dt.mimic_iv_omop(backend_handle=con)
>>> con.execute("SHOW TABLES;").fetchall()