OHDSI / circe-be

CIRCE is a cohort definition and syntax compiler tool for OMOP CDMv5
Apache License 2.0
9 stars 13 forks source link

Wrap circe-be in R package? #16

Closed schuemie closed 4 years ago

schuemie commented 6 years ago

I think it would be cool if we could wrap circe-be in an R package. That way, OHDSI study package only need to contain the JSON of the relevant cohort definitions, and can generate the SQL on the fly when instantiating those cohorts at a data site (if I understand circe-be correctly).

(Right now we have to keep both JSON and SQL in our study packages, and that begs the question whether they are in fact the same cohort definitions)

Any objections, suggestions? I would be happy to attempt a first version in a separate branch.

gowthamrao commented 6 years ago

@schuemie I like this idea. May be related to https://github.com/OHDSI/Atlas/issues/511 @jduke99 @fdefalco

Also related to https://github.com/OHDSI/circe-be/issues/17 . For Business intelligence use cases, we need to go thru the steps of cohort generation and cohort characterization for the same cohort on a periodic basis. On each run, we have to update the dates referenced in the cohort.

@fdefalco @schuemie if this can somehow be made into an API or microservice, with both a get and post -- it would be very useful. e.g. Atlas is very good, but is complex. One thought is that using API/microservices, we could have a 'simpler' or 'push button' Atlas like system that is targeted for a custom audience e.g. the entire 'study package' may be packaged into a lighter system that someone like a business executive can interact with a refresh button and minor configuration change capability. The light application would run and present a dashboard with the output of the study.

The study itself maybe built using Atlas. The light tool uses the API and/or microservices using the get/post. The entire sequence of steps, from refreshing cohort/cohorts, performing feature extraction, showing table 1 with visualization, performing incidence rate calculation and population level effect estimation - may then be one click.

schuemie commented 6 years ago

Just so you know, this is something we already do. For example, in this study package we import all cohort definitions from ATLAS into the package using the insertCohortDefinitionSetInPackage command, which automatically grabs the cohorts listed here and adds both the JSON and OHDSI SQL to the package. Any site executing the package then has the appropriate cohorts instantiated using the SQL, making the whole study self-contained.

What we hope to achieve by creating a CirceBe R package is to not have to store both the SQL and the JSON, but only the JSON, and generate the SQL on the fly.