OHDSI / ROhdsiWebApi

An R package for interfacing with a WebAPI instance
https://ohdsi.github.io/ROhdsiWebApi
10 stars 17 forks source link

getConceptSetsExpressionFromCohort #17

Closed gowthamrao closed 4 years ago

gowthamrao commented 5 years ago

We have a function in the package 'getConceptSetsAndConceptsFromCohort'. This function gets both concept-set expression and individual concepts from cohort. It takes a significant amount of time to resolve every concept set expression.

Most of the time, we only need the concept-set expression in the cohort definition. So a function that only provides concept set expression would be useful.

schuemie commented 4 years ago

Maybe instead of creating many different functions, we could create a single function getConceptSetsFromCohort that has arguments specifying what exactly you want to get? E.g.

getConceptSetsFromCohort(baseUrl = "http://my_url", 
                         cohortDefinitionId = 1, 
                         getExpression = TRUE, 
                         getIncludedConcepts = FALSE)
gowthamrao commented 4 years ago

I like this idea

alondhe commented 4 years ago

Yes, and this function name rolls off the tongue way better 😃

schuemie commented 4 years ago

I think this function is no longer needed. Using the new pattern, you would just getCohortDefinition and inspect the resulting R object to get the concept sets. You could resolve them using resolveConceptSet.