INCEPTdk / omop_etl

3 stars 2 forks source link

Validate era_lookback_intervals #153

Closed epiben closed 2 months ago

epiben commented 2 months ago

This somehow fell out of #149, so now it gets its own PR. Valid era_lookback_intervals in concept_lookup_stem are crucial for the eras, so with this we validate those given by the user.

epiben commented 2 months ago

Not exactly: drugs and conditions from LPR, if unspecified in concept_lookup_stem, will resort to a default lookback, which can be modified with environment variables. All other conditions will only have eras if their lookback is specified in the concept_lookup_stem. I'll expand to also validate the environment variables.

epiben commented 2 months ago

@daplaci, I added the ability to validate the value of environment variables in ETL/util/db.py. Could you give it a look and see if this implementation is acceptable.