clinicalml / omop-learn

Python package for machine learning for healthcare using a OMOP common data model
MIT License
103 stars 26 forks source link

CDM schema name is hard-coded in cohort generation SQL scripts #4

Closed ablack3 closed 3 years ago

ablack3 commented 3 years ago

Description of issue

The name of the cdm schema will be different in each environment but it is hard coded as 'cdm' in the cohort generation SQL scripts. One example is here.

Proposed solution

Add a parameter to the SQL files for the name of the cdm schema and replace all occurrences of the cdm schema name with the parameter.

justinlimkz commented 3 years ago

Hey Adam, thanks for pointing this out - we're on it!

justinlimkz commented 3 years ago

I've updated the cohort queries to use the CDM schema specified in config.py, which is what the feature queries were doing. It's passed in through this line in Generators/CohortGenerator.py.

The cohort obtained using gen_EOL_cohort.sql is the same before and after the change.