View source: R/getCandidateCodes.R
| getCandidateCodes | R Documentation |
Based on the given search strategy, this function identifies a set of codes that may represent a clinical event of interest in data mapped to the OMOP CDM. These codes can then be considered for creating a study phenotype.
getCandidateCodes(
cdm,
keywords,
exclude = NULL,
domains = "Condition",
standardConcept = "Standard",
searchInSynonyms = FALSE,
searchNonStandard = FALSE,
includeDescendants = TRUE,
includeAncestor = FALSE
)
cdm |
A cdm reference to an OMOP CDM dataset. If data is held within a database, the vocabulary tables should be in the same schema as the clinical tables (person, observation period, and so on). |
keywords |
Character vector of terms to search for.
|
exclude |
Character vector of words to identify concepts to exclude.
For example,
|
domains |
Character vector with one or more of the OMOP CDM domain for
which to search within. If NULL, all domains are included in the search. Use
|
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. If FALSE only direct mappings from ICD-10 codes to standard codes will be returned. |
includeAncestor |
Either TRUE or FALSE. If TRUE the direct ancestor concepts of identified concepts will be included in the candidate codelist. |
A "candidate_codes" object. This includes a tibble with the potential codes of interest, along with an attribute containing the search strategy.
library(CodelistGenerator)
cdm <- mockVocabRef()
getCandidateCodes(
cdm = cdm,
keywords = "osteoarthritis"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.