The isCohortDefinitionSet() currently throws an error if the cohortId is an integer. However, I think integer should be totally fine. Could we be a bit more lenient?
(Currently Capr::makeCohortSet() generates the concept ID as integer, I would prefer it to work without having to convert the integer to numeric.)
Reproducible example:
cds <- data.frame(cohortId = as.integer(1),
cohortName = "",
sql = "",
json = "")
CohortGenerator::isCohortDefinitionSet(cds)
# [1] FALSE
# Warning message:
# In checkAndFixCohortDefinitionSetDataTypes(x = x, fixDataTypes = FALSE, :
# Your cohortDefinitionSet had a mismatch in data types. Please check your cohortDefinitionSet to ensure it conforms to the following expected data types:Expected column == data type
# --------------------------
# cohortId == numeric
# cohortName == character
# sql == character
# json == character
# --------------------------
# Your cohortDefinitionSet
# --------------------------
# cohortId == integer
# cohortName == character
# sql == character
# json == character
The
isCohortDefinitionSet()
currently throws an error if thecohortId
is an integer. However, I think integer should be totally fine. Could we be a bit more lenient?(Currently
Capr::makeCohortSet()
generates the concept ID as integer, I would prefer it to work without having to convert the integer to numeric.)Reproducible example: