Get descendant codes for drug ingredients
getDrugIngredientCodes.Rd
Get descendant codes for drug ingredients
Usage
getDrugIngredientCodes(
cdm,
name = NULL,
nameStyle = "{concept_code}_{concept_name}",
doseForm = NULL,
doseUnit = NULL,
routeCategory = NULL,
ingredientRange = c(1, Inf),
type = "codelist"
)
Arguments
- cdm
cdm_reference via CDMConnector
- name
Names of ingredients of interest. For example, c("acetaminophen", "codeine"), would result in a list of length two with the descendant concepts for these two particular drug ingredients.
- nameStyle
Name style to apply to returned list. Can be one of
"{concept_code}_{concept_name}"
,"{concept_code}"
, or"{concept_name}"
.- doseForm
Only descendants codes with the specified dose form will be returned. If NULL, descendant codes will be returned regardless of dose form.
- doseUnit
Only descendants codes with the specified dose unit will be returned. If NULL, descendant codes will be returned regardless of dose unit
- routeCategory
Only descendants codes with the specified route will be returned. If NULL, descendant codes will be returned regardless of route category.
- ingredientRange
Used to restrict descendant codes to those associated with a specific number of ingredients. Must be a vector of length two with the first element the minimum number of ingredients allowed and the second the maximum. A value of c(2, 2) would restrict to only concepts associated with two ingredients.
- type
Can be "codelist", "codelist_with_details", or "concept_set_expression"
Examples
# \donttest{
cdm <- mockVocabRef()
#> Warning: ! 8 column in cdm_source do not match expected column type:
#> • `cdm_source_abbreviation` is logical but expected character
#> • `cdm_holder` is logical but expected character
#> • `source_description` is logical but expected character
#> • `source_documentation_reference` is logical but expected character
#> • `cdm_etl_reference` is logical but expected character
#> • `source_release_date` is logical but expected date
#> • `cdm_release_date` is logical but expected date
#> • `vocabulary_version` is logical but expected character
#> Warning: ! 3 column in concept do not match expected column type:
#> • `valid_start_date` is logical but expected date
#> • `valid_end_date` is logical but expected date
#> • `invalid_reason` is logical but expected character
#> Warning: ! 3 column in concept_relationship do not match expected column type:
#> • `valid_start_date` is logical but expected date
#> • `valid_end_date` is logical but expected date
#> • `invalid_reason` is logical but expected character
#> Warning: ! 1 column in concept_synonym do not match expected column type:
#> • `language_concept_id` is logical but expected integer
#> Warning: ! 4 column in drug_strength do not match expected column type:
#> • `amount_value` is logical but expected numeric
#> • `box_size` is logical but expected integer
#> • `valid_start_date` is logical but expected date
#> • `valid_end_date` is logical but expected date
#> Warning: ! 7 column in achilles_analysis do not match expected column type:
#> • `analysis_name` is numeric but expected character
#> • `stratum_1_name` is logical but expected character
#> • `stratum_2_name` is logical but expected character
#> • `stratum_3_name` is logical but expected character
#> • `stratum_4_name` is logical but expected character
#> • `stratum_5_name` is logical but expected character
#> • `category` is logical but expected character
#> Warning: ! 5 column in achilles_results do not match expected column type:
#> • `stratum_1` is numeric but expected character
#> • `stratum_2` is logical but expected character
#> • `stratum_3` is logical but expected character
#> • `stratum_4` is logical but expected character
#> • `stratum_5` is logical but expected character
#> Warning: ! 14 column in achilles_results_dist do not match expected column type:
#> • `stratum_1` is logical but expected character
#> • `stratum_2` is logical but expected character
#> • `stratum_3` is logical but expected character
#> • `stratum_4` is logical but expected character
#> • `stratum_5` is logical but expected character
#> • `min_value` is logical but expected integer
#> • `max_value` is logical but expected integer
#> • `avg_value` is logical but expected numeric
#> • `stdev_value` is logical but expected numeric
#> • `median_value` is logical but expected numeric
#> • `p10_value` is logical but expected numeric
#> • `p25_value` is logical but expected numeric
#> • `p75_value` is logical but expected numeric
#> • `p90_value` is logical but expected numeric
#> Warning: There are observation period end dates after the current date: 2024-11-26
#> ℹ The latest max observation period end date found is 2025-12-31
getDrugIngredientCodes(cdm = cdm, name = "Adalimumab",
nameStyle = "{concept_name}")
#>
#> ── 1 codelist ──────────────────────────────────────────────────────────────────
#>
#> - adalimumab (2 codes)
# }