Write Cohort json file

writeCohort(x, path)

Arguments

x

A Capr cohort

path

The name of the file to create

Value

Invisibly returns the path to the json file that was written

Examples

if (FALSE) {
cs1 <- cs(descendants(exclude(436665),440383,442306,4175329), name = "concepts")
# optional step to fill in concept set details. Requires database connection.

cs1 <- getConceptSetDetails(cs1, con)

x <- cohort(conditionOccurrence(cs1))
writeCohort(x, "cohortDefinition.json")
}