Skip to contents

Uses CirceR to build the cohort query and SqlRender to translate it to the bigquery dialect, exactly as CohortGenerator would, but returns the statements instead of running them. The target cohort table is created first because Circe only inserts into it.

Usage

compile_cohort_bigquery(
  circe_json,
  cdm,
  scratch,
  cohort_table = "demo_cohort",
  cohort_id = 1L,
  vocabulary = NULL
)

Arguments

circe_json

Circe JSON string or file path.

cdm, scratch, vocabulary

"project.dataset" strings: the OMOP CDM, a dataset you may write to, and where concept_ancestor lives (default cdm).

cohort_table, cohort_id

Target cohort table (in scratch) and cohort definition id.

Value

A character vector of GoogleSQL statements, to run in order.