MIT-LCP / mimic-omop

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

README-run-etl.md guidance #63

Open billudada78 opened 5 years ago

billudada78 commented 5 years ago

The guidance indicates the following recommended database and schema set up: "export OMOP_SCHEMA='omop' export OMOP='host=localhost dbname=postgres user=postgres options=--search_path='$OMOP_SCHEMA export MIMIC='host=localhost dbname=postgres user=postgres options=--search_path=mimiciii'"

Unfortunately, the MIMIC-III postgres guidance indicates to use "mimic" as the dbname. I found out rather late that postgresql does not allow for cross-database references. I would recommend to align the naming convention with the MIMIC-III guidance (https://mimic.physionet.org/tutorials/install-mimic-locally-ubuntu/#1-install-postgres) or to highlight to the user that they should ensure the same dbname is used for both the OMOP schema and the MIMIC-III schema.

parisni commented 5 years ago

hi thanks for the feedback ! all those things (database, schema names) are configurable. BTW if this would help to have default dbname=mimic for end user, please propose a pull request and make sure all dbname and documentation are set accordingly.

billudada78 commented 5 years ago

I am unsure whether it is better to update dbname to mimic in the defaults or to simply warn the user in the readme file. Currently, the readme states: "This README will assume the following:

MIMIC-III v1.4 is available in the mimic database under the mimiciii schema"

The OMOP schema, though is pointed towards the postgres database in the readme:

"export OMOP='host=localhost dbname=postgres user=postgres options=--search_path='$OMOP_SCHEMA"

I suspect several of the scripts assume dbname to be postgres. The MIMIC websites guide only needs to be modified to state "use dbname=postgres from step 7 onwards" and to replace "mimic" with "postgres" in the instruction below:

"CREATE DATABASE mimic OWNER mimicuser;"

I believe this is easiest to remedy in this GitHub readme file rather than adjusting all of the scripts to point towards a unique dbname.

parisni commented 5 years ago

please take a look at https://github.com/MIT-LCP/mimic-omop/blob/master/Makefile this is an alternative script used to do the etl. If the documentation can be clarified then we will do so