Closed fdefalco closed 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.
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.
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!
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.