identify_icd_multiple: Find multiple diagnoses using ICD-codes

Description Usage Arguments Examples

View source: R/identify_icd.R

Description

This function allows you to find multiple diagnoses based on ICD-codes. Creates new columns based on the ICD-codes.

Usage

1
identify_icd_multiple(.data, icd_list, names)

Arguments

.data

A tibble with data in QTF-format

icd_list

A list object with two or more elements. Each element should be a character vector or a scalar, with ICD-codes that should be identified in the data.

names

A list object with two or more elements. Each element should be a character string with the column name for the new variable. Should correspond to the elements in icd_list.

Examples

1
2
3
4
icd_list <- list("L405", c("Z879", "M403")
names <- list("psa", "other")
data(data_icd)
data_icd %>% combine_sdia() %>% identify_icd(icd, names)

liljamathias/QRfunctions documentation built on Jan. 20, 2021, 1:32 a.m.