| Title: | Simple 'ICD-10' Code Descriptions |
|---|---|
| Description: | Provides utilities to retrieve and manage 'ICD-10' code descriptions from 'Excel' files. Supports vectors, data frame columns, and association rule outputs (e.g., 'arules' objects) that require mapping to 'ICD-10' descriptions. Designed to simplify processing of healthcare datasets. |
| Authors: | Nisha Sheshashayee [aut, cre] |
| Maintainer: | Nisha Sheshashayee <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.2 |
| Built: | 2026-05-28 08:14:39 UTC |
| Source: | https://github.com/cran/icdhelper |
Add ICD-10 descriptions to a data frame
add_icd_desc(df, code_col = "code")add_icd_desc(df, code_col = "code")
df |
A data frame containing ICD codes. |
code_col |
Column name with ICD codes. |
The input data frame with a new ICD_desc column.
df <- data.frame(code = c("A00", "B01")) add_icd_desc(df)df <- data.frame(code = c("A00", "B01")) add_icd_desc(df)
Add ICD-10 descriptions to a vector of codes
add_icd_desc_any(x)add_icd_desc_any(x)
x |
A character vector of ICD codes. |
A character vector of descriptions.
add_icd_desc_any(c("A00", "B01"))add_icd_desc_any(c("A00", "B01"))
Takes a data frame with a code column and inserts a description column immediately after it.
add_icd_desc_df(df, code_col = "code", desc_col = "desc")add_icd_desc_df(df, code_col = "code", desc_col = "desc")
df |
A data frame. |
code_col |
Column name containing ICD codes. |
desc_col |
Name of the new description column. |
The input data frame with description column inserted after code_col.
df <- data.frame(code = c("A00", "B01")) add_icd_desc_df(df)df <- data.frame(code = c("A00", "B01")) add_icd_desc_df(df)
Add procedure descriptions to a vector of codes
add_proc_desc_any(x)add_proc_desc_any(x)
x |
A character vector of procedure codes. |
A character vector of descriptions.
add_proc_desc_any(c("001", "002"))add_proc_desc_any(c("001", "002"))
Takes a data frame with a procedure code column and inserts a description column immediately after it.
add_proc_desc_df(df, proc_col = "proc", desc_col = "desc")add_proc_desc_df(df, proc_col = "proc", desc_col = "desc")
df |
A data frame. |
proc_col |
Column name containing procedure codes. |
desc_col |
Name of the new description column. |
The input data frame with description column inserted after proc_col.
df <- data.frame(proc = c("001", "002")) add_proc_desc_df(df)df <- data.frame(proc = c("001", "002")) add_proc_desc_df(df)
Add descriptions to rule table codes
add_rule_desc(rules_df)add_rule_desc(rules_df)
rules_df |
A data frame with LHS and RHS columns. |
The same data frame with LHS_desc and RHS_desc added.
df <- data.frame( LHS = c("{A00}", "{B01}"), RHS = c("{C02}", "{D03}") ) add_rule_desc(df)df <- data.frame( LHS = c("{A00}", "{B01}"), RHS = c("{C02}", "{D03}") ) add_rule_desc(df)
Looks up the description for one or more ICD-10 codes using the package dictionary.
icd_desc(code)icd_desc(code)
code |
ICD-10 code(s), quoted or unquoted. |
A character vector of descriptions (NA if not found).
icd_desc("I10") icd_desc(c("I10", "E11"))icd_desc("I10") icd_desc(c("I10", "E11"))
Reads the ICD-10 code dictionary bundled inside the package.
load_icd_dictionary()load_icd_dictionary()
A data frame with ICD-10 codes and descriptions.
World Health Organization (WHO) (2019). International Classification of Diseases (ICD-10). https://www.who.int/standards/classifications/classification-of-diseases
load_icd_dictionary()load_icd_dictionary()
Reads the procedure code dictionary bundled inside the package.
load_proc_dictionary()load_proc_dictionary()
A data frame with procedure codes and descriptions.
World Health Organization (WHO) (2019). International Classification of Diseases (ICD-10-PCS). https://www.who.int/standards/classifications/classification-of-diseases
load_proc_dictionary()load_proc_dictionary()
Looks up the description for one or more ICD-10-PCS procedure codes using the package procedure dictionary.
proc_desc(code)proc_desc(code)
code |
Procedure code(s) |
A character vector of descriptions (NA if not found)
proc_desc("001") proc_desc(c("001", "002"))proc_desc("001") proc_desc(c("001", "002"))
Add procedure descriptions to association rules
proc_rules_with_desc(rules)proc_rules_with_desc(rules)
rules |
An object of class rules from 'arules'. |
A data.frame with descriptions placed next to lhs and rhs.
library(arules) data("Adult") rules <- apriori(Adult, parameter = list(supp = 0.5, conf = 0.9, maxlen = 2)) proc_rules_with_desc(rules)library(arules) data("Adult") rules <- apriori(Adult, parameter = list(supp = 0.5, conf = 0.9, maxlen = 2)) proc_rules_with_desc(rules)
Add ICD descriptions to association rules
rules_with_desc(rules)rules_with_desc(rules)
rules |
An object of class rules from 'arules'. |
A data.frame with descriptions placed next to lhs and rhs.
library(arules) data("Adult") rules <- apriori(Adult, parameter = list(supp = 0.5, conf = 0.9, maxlen = 2)) rules_with_desc(rules)library(arules) data("Adult") rules <- apriori(Adult, parameter = list(supp = 0.5, conf = 0.9, maxlen = 2)) rules_with_desc(rules)