getCandidateCodes {CodelistGenerator} | R Documentation |
Generate candidate codelist for the OMOP CDM
Description
This function generates a set of codes that can be considered for creating a phenotype using the OMOP CDM.
Usage
getCandidateCodes(
cdm,
keywords,
exclude = NULL,
domains = "Condition",
standardConcept = "Standard",
searchInSynonyms = FALSE,
searchNonStandard = FALSE,
includeDescendants = TRUE,
includeAncestor = FALSE
)
Arguments
cdm |
cdm_reference via CDMConnector |
keywords |
Character vector of words to search for. Where more than one word is given (e.g. "knee osteoarthritis"), all combinations of those words should be identified positions (e.g. "osteoarthritis of knee") should be identified. |
exclude |
Character vector of words to identify concepts to exclude. |
domains |
Character vector with one or more of the OMOP CDM domain. |
standardConcept |
Character vector with one or more of "Standard", "Classification", and "Non-standard". These correspond to the flags used for the standard_concept field in the concept table of the cdm. |
searchInSynonyms |
Either TRUE or FALSE. If TRUE the code will also search using both the primary name in the concept table and synonyms from the concept synonym table. |
searchNonStandard |
Either TRUE or FALSE. If TRUE the code will also search via non-standard concepts. |
includeDescendants |
Either TRUE or FALSE. If TRUE descendant concepts of identified concepts will be included in the candidate codelist. |
includeAncestor |
Either TRUE or FALSE. If TRUE the direct ancestor concepts of identified concepts will be included in the candidate codelist. |
Value
tibble
Examples
## Not run:
cdm <- CodelistGenerator::mockVocabRef()
CodelistGenerator::getCandidateCodes(
cdm = cdm,
keywords = "osteoarthritis"
)
CDMConnector::cdmDisconnect(cdm)
## End(Not run)