INCEPTdk / omop_etl

3 stars 2 forks source link

Simplify logic for numerical and free-text value types #125

Open epiben opened 3 months ago

epiben commented 3 months ago

Just stumpled on this one and wanted to raise it to see if we're on the same line. Shouldn't we combine the two conditions here into the following:

and_(
    concept_lookup_stem_cte.c.value_type.in_(("numerical", "free_text")),
    func.lower(concept_lookup_stem_cte.c.source_variable)
    == func.lower(model.variable),
    concept_lookup_stem_cte.c.datasource == model.__tablename__,
),
epiben commented 3 months ago

Will be fixed in #128, if approved during review of course.