Say you are on atlas-demo.ohdsi.org and reviewing the definition for a ConceptSet ATLAS. How can you find out all the cohort definitions in which this ConceptSet is used?
Out of the box, you can’t. You could use the WebAPI endpoints to download a cohort definition JSON, and do a string-search for the contents of the concept set expression in the cohort definition, but that is a very hack-ish way to try to do this. In order to this sort of searching, we’d have to implement some sort of concept set indexing that would let you search for cohort definitions by concept set expression.
Complicated and experimental (conceptSetDiagnostics is experimental)
- get list of cohort in atlas Get the meta data for Cohort definitions. — getCohortDefinitionsMetaData • ROhdsiWebApi
- Get all the cohort definitions into a cohortDefinitionSet object Get a cohort definition set — getCohortDefinitionSet • CohortGenerator
- Extract all concept sets in all the cohorts + assign unique id (EXPERIMENTAL) https://github.com/OHDSI/ConceptSetDiagnostics/blob/develop/R/ExtractConceptSetsInCohortDefinitionSet.R
Identify the unique concept set id of the conceptSet in the cohort you are interested. Filter all cohorts with that concept set