Skip to contents

Classify ICD10 codes into Cancer Categories according to the specified category type and language.

Usage

classify_icd10(x, cancer_type = "big", as_factor = FALSE)

Arguments

x

The ICD10 codes of cancer part (C00-C98 and D00-D48) collected by the Population-Based Cancer Registration (PBCR).

cancer_type

A character string specifying the classification method used to categorize ICD-10 codes. This determines how ICD-10 codes are classified. Options include "big" (classify ICD-10 codes into 26 cancer categories), "small" (classify ICD-10 codes into 59 cancer categories, more specific categories), "system" (classify ICD-10 codes into organ system), and "gco" (classify ICD-10 code into cancer categories same as classification published by the Global Cancer Observatory). This parameter is only available when the input data is a vector of ICD-10 codes, or object with class of 'canreg' or 'canregs'.

as_factor

logical indicate that the output value as factor.

Value

Cancer code

Examples

icd10 <- c("C15.2", "C33.4", "C80.9", "C26.2", "C16.3")
classify_icd10(icd10, cancer_type = "big")
#> [1] 103 110 126 126 104