Get corresponding standard codes for ICD-10 chapters and sub-chapters
getICD10StandardCodes.Rd
Get corresponding standard codes for ICD-10 chapters and sub-chapters
Usage
getICD10StandardCodes(
cdm,
level = c("ICD10 Chapter", "ICD10 SubChapter"),
name = NULL,
includeDescendants = TRUE,
type = "codelist"
)
Arguments
- cdm
cdm_reference via CDMConnector
- level
Can be either "ICD10 Chapter" or "ICD10 SubChapter"
- name
Name of chapter or sub-chapter of interest. If NULL, all will be considered.
- includeDescendants
If FALSE only direct mappings from ICD-10 codes to standard codes will be returned. If TRUE descendants of standard concepts will also be included.
- type
Can be "codelist", "codelist_with_details", or "concept_set_expression"
Value
A named list, with each element containing the corresponding standard codes (and descendants) of ICD chapters and sub-chapters
Examples
# \donttest{
cdm <- mockVocabRef()
#> Warning: ! 5 column in person do not match expected column type:
#> • `person_id` is numeric but expected integer
#> • `gender_concept_id` is numeric but expected integer
#> • `year_of_birth` is numeric but expected integer
#> • `race_concept_id` is numeric but expected integer
#> • `ethnicity_concept_id` is numeric but expected integer
#> Warning: ! 3 column in observation_period do not match expected column type:
#> • `observation_period_id` is numeric but expected integer
#> • `person_id` is numeric but expected integer
#> • `period_type_concept_id` is numeric but expected integer
#> 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: ! 1 column in vocabulary do not match expected column type:
#> • `vocabulary_concept_id` is numeric but expected integer
#> 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: ! 2 column in concept_ancestor do not match expected column type:
#> • `min_levels_of_separation` is numeric but expected integer
#> • `max_levels_of_separation` is numeric but expected integer
#> Warning: ! 7 column in drug_strength do not match expected column type:
#> • `amount_value` is logical but expected numeric
#> • `amount_unit_concept_id` is numeric but expected integer
#> • `numerator_unit_concept_id` is numeric but expected integer
#> • `denominator_unit_concept_id` is numeric but expected integer
#> • `box_size` is logical but expected integer
#> • `valid_start_date` is logical but expected date
#> • `valid_end_date` is logical but expected date
#> Warning: ! 8 column in achilles_analysis do not match expected column type:
#> • `analysis_id` is numeric but expected integer
#> • `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: ! 7 column in achilles_results do not match expected column type:
#> • `analysis_id` is numeric but expected integer
#> • `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
#> • `count_value` is numeric but expected integer
#> Warning: ! 16 column in achilles_results_dist do not match expected column type:
#> • `analysis_id` is numeric but expected integer
#> • `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
#> • `count_value` is numeric but expected integer
#> Warning: There are observation period end dates after the current date: 2024-11-11
#> ℹ The latest max observation period end date found is 2025-12-31
getICD10StandardCodes(cdm = cdm, level = c(
"ICD10 Chapter",
"ICD10 SubChapter"
))
#> Getting non-standard ICD10 concepts
#> Mapping from non-standard to standard concepts
#> Getting descendant concepts
#>
#> ── 2 codelists ─────────────────────────────────────────────────────────────────
#>
#> - arthropathies (3 codes)
#> - diseases_of_the_musculoskeletal_system_and_connective_tissue (3 codes)
# }