Write Cohort json file
writeCohort(x, path)A Capr cohort
The name of the file to create
Invisibly returns the path to the json file that was written
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")
}