encode.icd: Generate indicators for Charlson Index, Elixhauser & custom...

Description Usage Arguments Value

View source: R/comorbs.R

Description

Labels ICD 8 and 10 codes based on Elixhauser, Charlson and custom categories by taking a column of ICD08/09/10 diagnoses and mapping those to Elixhauser, Charlson or a third custom defined grouping (can be overwritten)

Usage

1
encode.icd(data, diag.col, types = c("elixh", "charl", "custm"), comorbs)

Arguments

data

a data frame containing a column with ICD-codes. 10 and 08/09 are accepted.

diag.col

name of column in data frame, that contains ICD codes. ICD10 codes should have a 'D' prefix.

types

takes a character vector as input, containing one or more of the following values: 'elixh', 'charl' and 'custm'.

comorbs

is a list corresponding to the output of the 'comorbs' function. It maks diagnoses to diagnosis groups

Value

the function returns the input dataframe, but adding the columns corresponding to each diagnosis group defined in the Elixhauser, Charlson or custom definitions.


socioskop/grit documentation built on Dec. 23, 2021, 3:30 a.m.