add_inj_intent_mech_icd10cm: Add intent, mechanism, and description to injury ICD-10-CM.

Description Usage Arguments Value Examples

Description

Add intent, mechanism, and description to injury ICD-10-CM.

Usage

1
2
add_inj_intent_mech_icd10cm(data, icd10cm_main, reference = c("matrix",
  "specific", "intent", "mechanism"), ignore_case = TRUE)

Arguments

data

input data

icd10cm_main

principal diagnosis column name without "quotation marks"

reference

injury matrix reference with four possible choices: "matrix"(the default) adding intent and mechanism to the input data "specific" adding intent, mechanism and the description of the icd10cm code "intent" adding intent only "mechanism" adding mechanism only

Value

return the input with additional variables (intent, mechanism and description of the icd-10-cm) depending on the choice of the reference

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(tidyverse)
icd10cm_data150 %>% add_inj_intent_mech_icd10cm(icd10cm_main = principal_diag)

data_mech <- icd10cm_data150 %>%
add_inj_intent_mech_icd10cm(icd10cm_main = principal_diag, reference = "mechanism")

data_mech %>%
drop_na() %>%
count(mechanism) %>% arrange(-n) %>%
top_n(10)

injuryepi/injuryicd10cm documentation built on May 4, 2019, 7:42 p.m.