ehrdata.io.omop.setup_connection

ehrdata.io.omop.setup_connection#

ehrdata.io.omop.setup_connection(path, backend_handle, prefix='')#

Setup a connection to the OMOP CDM database.

This function sets up a connection to the OMOP CDM database. It checks the capitalization of the ‘person’ table, and assumes the same capitalization style is used for all other tables.

Parameters:
path Path | str

The path to the folder containing the CSV or Parquet files.

backend_handle DuckDBPyConnection

The backend handle to the database.

prefix str (default: '')

The prefix to be removed from the CSV/Parquet filenames.

Return type:

None

Returns:

An EHRData object with populated .uns[“omop_table_capitalization”] field.