View source: R/findOrphanCodes.R
findOrphanCodes | R Documentation |
Find orphan codes related to a codelist
findOrphanCodes(
x,
cdm,
domains = "Condition",
standardConcept = "Standard",
searchInSynonyms = TRUE,
searchNonStandard = TRUE,
includeDescendants = TRUE,
includeAncestor = TRUE,
minCellCount = 5
)
x |
Codes for which to find codes related but not included (orphan codes) |
cdm |
cdm_reference via CDMConnector |
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. |
minCellCount |
The minimum number of counts to reported, below which results will be suppressed. If 0, all results will be reported. |
A codelist containing code related to (but not in) the target codelist that are present used in the cdm
## Not run:
cdm <- mockVocabRef("database")
codes <- getCandidateCodes(cdm = cdm,
keywords = "Musculoskeletal disorder",
domains = "Condition",
includeDescendants = FALSE)
orphan_codes <- findOrphanCodes(x = list("msk" = codes$concept_id),
cdm = cdm,
domains = "Condition",
standardConcept = "Standard",
searchInSynonyms = FALSE,
searchNonStandard = FALSE,
includeDescendants = TRUE,
includeAncestor = FALSE)
orphan_codes
CDMConnector::cdmDisconnect(cdm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.