The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
library(omopgenerics)
A concept set can be represented as either a codelist or a concept set expression. A codelist is a named list, with each item of the list containing specific concept IDs.
<- list("diabetes" = c(201820, 4087682, 3655269),
condition_codes "asthma" = 317009)
<- newCodelist(condition_codes)
condition_codes
condition_codes#>
#> - diabetes (3 codes)
#> - asthma (1 codes)
A codelist must be named
<- list(c(201820, 4087682, 3655269))
condition_codes newCodelist(condition_codes)
#> Error in `validateCodelist()`:
#> ! `x` must be named.
#> `x` must be a list with objects of class numeric and integer; it can not
#> contain NA; it has to be named; it can not be NULL.
And a codelist cannot have missing values
<- list("diabetes" = c(201820, NA, 3655269),
condition_codes "asthma" = 317009)
newCodelist(condition_codes)
#> Error in `validateCodelist()`:
#> ! `diabetes` must not contain NA.
A concept set expression provides a high-level definition of concepts that, when applied to a specific OMOP CDM vocabulary version (by making use of the concept hierarchies and relationships), will result in a codelist.
<- list(
condition_cs "diabetes" = dplyr::tibble(
"concept_id" = c(201820, 4087682),
"excluded" = c(FALSE, FALSE),
"descendants" = c(TRUE, FALSE),
"mapped" = c(FALSE, FALSE)
),"asthma" = dplyr::tibble(
"concept_id" = 317009,
"excluded" = FALSE,
"descendants" = FALSE,
"mapped" = FALSE
)
)<- newConceptSetExpression(condition_cs)
condition_cs
condition_cs#>
#> - diabetes (2 concept criteria)
#> - asthma (1 concept criteria)
As with a codelist, a concept set expression must be a named list and cannot have missing elements.
<- list(
condition_cs ::tibble(
dplyr"concept_id" = c(201820, NA),
"excluded" = c(FALSE, FALSE),
"descendants" = c(TRUE, FALSE),
"mapped" = c(FALSE, FALSE)
))newConceptSetExpression(condition_cs)
#> Error in `validateConceptSetExpression()`:
#> ! `x` must be named.
#> `x` must be a list with objects of class tbl; it can not contain NA; it has to
#> be named; it can not be NULL.
<- list(
condition_cs "diabetes" = dplyr::tibble(
"concept_id" = c(201820, NA),
"excluded" = c(FALSE, FALSE),
"descendants" = c(TRUE, FALSE),
"mapped" = c(FALSE, FALSE)
),"asthma" = dplyr::tibble(
"concept_id" = 317009,
"excluded" = FALSE,
"descendants" = FALSE,
"mapped" = FALSE
)
)newConceptSetExpression(condition_cs)
#> Error in `validateConceptSetExpression()`:
#> ! `$x[[i]]concept_id` contains NA in position 2.
#> `$x[[i]]concept_id` must be an integerish numeric; it can not contain NA; it
#> can not be NULL.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.