MIT-LCP / mimic-omop

Mapping the MIMIC-III database to the OMOP schema
MIT License
125 stars 48 forks source link

Allow for the ETL to use schema names other than "omop". #50

Closed spfohl closed 6 years ago

spfohl commented 6 years ago

An issue with the ETL as it is that the the table name "omop" is hardcoded in several locations and the environment variables $OMOP and $OMOP_SCHEMA are ignored, making it hard to run the ETL with a schema name other than "omop".

I have modified the ETL files such that they refer to a postgres variable ":OMOP_SCHEMA" that must be passed to the ETL call, like so: psql "$MIMIC" --set=OMOP_SCHEMA="$OMOP_SCHEMA" -f "etl/etl.sql"

There are other files in the repo that should also be changed, but as of now I have only modified those that are necessary for the ETL.

parisni commented 6 years ago

Hi Thanks for this enhancement. Did you run the ETL successfully then ?

spfohl commented 6 years ago

Yea I can confirm that the ETL runs successfully. There are still some issues with duplicated indexes but those issues were there before making these changes.