OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
130 stars 169 forks source link

Limit #Codesets temp table to active concept sets #90

Closed fdefalco closed 5 years ago

fdefalco commented 8 years ago

Currently when generating the SQL statement used to create a cohort all concept sets in a cohort definition are generated and inserted into the #codesets table. We could optimize the query and simplify the exported SQL by only inserting records for concept sets in use in the definition.

anthonysena commented 5 years ago

@chrisknoll - not sure to what degree this has already been addressed in the code base? Only asking due to the age of the issue.

chrisknoll commented 5 years ago

People create concept sets in their cohort definitions so that they can get the concept set query for the concept set expression, even if it's not in use in the definition. I think it's a minor optimization to filter those out and probably not worth the risk of introducing new bugs into the codebase. I'd close this.

anthonysena commented 5 years ago

Fair enough and I think that the cohort 'messages' tab should also alert people to unused concept sets (once that's re-enabled per OHDSI/Atlas#1933). I'll close this out since we've made the link to the Atlas issue for 2.8. Thanks!