Check cause-of-death code for code entry mistakes and/or code completeness
Source:R/cod_check_code.R
cod_check_code.Rd
Check cause-of-death code for code entry mistakes and/or code completeness
Usage
cod_check_code(cod, version = c("icd10", "icd11"), sex, age)
cod_check_code_structure_icd10(cod)
cod_check_code_structure_icd11(cod)
cod_check_code_ill_defined_icd10(cod)
cod_check_code_ill_defined_icd11(cod)
cod_check_code_unlikely_icd10(cod)
cod_check_code_unlikely_icd11(cod)
cod_check_code_sex_icd10_(cod, sex)
cod_check_code_sex_icd10(cod, sex)
cod_check_code_sex_icd11_(cod, sex)
cod_check_code_sex_icd11(cod, sex)
cod_check_code_age_icd10_(cod, age)
cod_check_code_age_icd10(cod, age)
cod_check_code_age_icd11_(cod, age)
cod_check_code_age_icd11(cod, age)
Arguments
- cod
A character value or vector of values for cause-of-death code/s.
- version
A character value for ICD version used. This should be either "icd10" or "icd11". Default is "icd10".
- sex
A character value or vector of values for sex of individual associated with the specified
cod
.- age
An integer value or vector of values for age (in years) of individual.
Value
A tibble with 2 columns/fields. First is an integer value indicating whether there is an issue with the cause-of-death code provided in relation to a potential code entry mistake and/or and issue of code completeness.
Examples
cod_check_code("U100", sex = 1, age = 10)
#> # A tibble: 1 × 12
#> cod_check_structure cod_check_note_structure cod_check_ill_defined
#> <int> <fct> <dbl>
#> 1 8 CoD code contains the character val… 0
#> # ℹ 9 more variables: cod_check_note_ill_defined <fct>,
#> # cod_check_unlikely <int>, cod_check_note_unlikely <fct>,
#> # cod_check_sex <int>, cod_check_note_sex <fct>, cod_check_age <int>,
#> # cod_check_note_age <fct>, cod_check_code <dbl>, cod_check_code_note <fct>
cod_check_code("2C6Z", version = "icd11", sex = 1, age = 65)
#> # A tibble: 1 × 12
#> cod_check_structure cod_check_note_structure cod_check_ill_defined
#> <int> <fct> <int>
#> 1 0 No issues found in CoD code 0
#> # ℹ 9 more variables: cod_check_note_ill_defined <fct>,
#> # cod_check_unlikely <int>, cod_check_note_unlikely <fct>,
#> # cod_check_sex <int>, cod_check_note_sex <fct>, cod_check_age <int>,
#> # cod_check_note_age <fct>, cod_check_code <dbl>, cod_check_code_note <fct>