Title: | Construct Cohort Inclusion and Restriction Criteria Expressions |
---|---|
Description: | Wraps the 'CIRCE' (<https://github.com/ohdsi/circe-be>) 'Java' library allowing cohort definition expressions to be edited and converted to 'Markdown' or 'SQL'. |
Authors: | Chris Knoll [aut, cre], Martijn Schuemie [aut] |
Maintainer: | Chris Knoll <[email protected]> |
License: | Apache License 2.0 |
Version: | 1.3.3 |
Built: | 2024-11-15 06:43:10 UTC |
Source: | CRAN |
Generates the OMOP CDM Sql to generate the cohort expression
buildCohortQuery(expression, options)
buildCohortQuery(expression, options)
expression |
result of cohortExpressionFromJson containing the cohort expression. |
options |
The options built using createGenerateOptions() |
A character vector containing the OHDSI Sql for the cohort expression
Generates the OMOP CDM Sql to resolve the concept set expression
buildConceptSetQuery(conceptSetJSON)
buildConceptSetQuery(conceptSetJSON)
conceptSetJSON |
a string containing the JSON for the conceptset expression. |
A character vector containing the OHDSI Sql for the conceptset expression
An example cohort definition
data(cohortDefinitionJson)
data(cohortDefinitionJson)
A character vector containing a JSON string
An example cohort expression in JSON format
Reads a String (json) and deserializes it into a org.ohdsi.circe.cohortdefinition.CohortExpression
cohortExpressionFromJson(expressionJson)
cohortExpressionFromJson(expressionJson)
expressionJson |
A character vector containing the cohort expression. |
A java instance of org.ohdsi.circe.cohortdefinition.CohortExpression.
Generates a print-friendly (human-readable) representation of the cohort definition. This can for example be used in a study protocol.
cohortPrintFriendly(expression)
cohortPrintFriendly(expression)
expression |
A character vector or result of cohortExpressionFromJson containing the cohort expression. |
A character vector containing the markdown.
Reads a String (json) and deserializes it into a org.ohdsi.circe.vocabulary.CohortExpression
conceptSetExpressionFromJson(expressionJson)
conceptSetExpressionFromJson(expressionJson)
expressionJson |
A character vector containing the cohort expression. |
A java instance of org.ohdsi.circe.cohortdefinition.CohortExpression.
An example concept set
data(conceptSetJson)
data(conceptSetJson)
A character vector containing a JSON string
An example concept set in JSON format
An example concept set list
data(conceptSetListJson)
data(conceptSetListJson)
A character vector containing a JSON string
An example concept set list in JSON format
Generates a print-friendly (human-readable) representation of an array of concept sets. This can for example be used in a study protocol.
conceptSetListPrintFriendly(conceptSetList)
conceptSetListPrintFriendly(conceptSetList)
conceptSetList |
A ConceptSet[] (from cohortExpression.conceptSets), a JSON string, or a list from RJSONIO::fromJson |
A character vector containing the markdown.
Generates a print-friendly (human-readable) representation of a single concept set. This can for example be used in a study protocol.
conceptSetPrintFriendly(conceptSet)
conceptSetPrintFriendly(conceptSet)
conceptSet |
A ConceptSet (from cohortExpression.conceptSets[i]), a JSON string, or a list from RJSONIO::fromJson |
A character vector containing the markdown.
Creates the generation options object for use in generateSql()
createGenerateOptions( cohortIdFieldName, cohortId, cdmSchema, targetTable, resultSchema, vocabularySchema, generateStats )
createGenerateOptions( cohortIdFieldName, cohortId, cdmSchema, targetTable, resultSchema, vocabularySchema, generateStats )
cohortIdFieldName |
The field that contains the cohortId in the cohort table. |
cohortId |
The generated cohort ID. |
cdmSchema |
The value of the CDM schema. |
targetTable |
the cohort table name. |
resultSchema |
the schema the cohort table belongs to. |
vocabularySchema |
the schema of the vocabulary tables (defaults to cdmSchema) |
generateStats |
a boolean representing if the query should include inclusion rule statistics calculation |
A jObj that can be passed to generateSql().