Type: | Package |
Title: | Convert ICD-10 Codes to CCSR Codes |
Version: | 0.1.0 |
Maintainer: | Mark Ramos <mlr6219@psu.edu> |
Description: | Provides a tool for matching ICD-10 codes to corresponding Clinical Classification Software Refined (CCSR) codes. The main function, CCSRfind(), identifies each CCSR code that applies to an individual given their diagnosis codes. It also provides a summary of CCSR codes that are matched to a dataset. The package contains 3 datasets: 'DXCCSR' (mapping of ICD-10 codes to CCSR codes), 'Legend' (conversion of DXCCSR to CCSRfind-usable format for CCSR codes with less than or equal to 1000 ICD-10 diagnosis codes), and 'LegendExtend' (conversion of DXCCSR to CCSRfind-usable format for CCSR codes with more than 1000 ICD-10 dx codes). The disc() function applies grepl() ('base') to multiple columns and is used in CCSRfind(). |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | knitr |
Depends: | R (≥ 2.10) |
RoxygenNote: | 7.3.1 |
NeedsCompilation: | no |
Packaged: | 2024-07-31 18:16:15 UTC; mlr6219 |
Author: | Mark Ramos [aut, cre, cph], Amy Yeung [aut] |
Repository: | CRAN |
Date/Publication: | 2024-08-19 08:50:13 UTC |
Identify CCSR codes corresponding to ICD-10 codes
Description
Identify CCSR codes corresponding to ICD-10 codes
Usage
CCSRfind(workset, dxs, example = FALSE)
Arguments
workset |
Dataset with ICD-10 codes |
dxs |
List of column name(s) of ICD-10 codes within workset |
example |
indicator if running an example, default is FALSE |
Value
A list of CCSR codes corresponding to the ICD-10 codes
Examples
# Example dataset
id<-c(1:2)
dx1<-c("A000","B0189")
dx2<-c("A157","E133591")
workset<-data.frame(id,dx1,dx2)
dxs<-c("dx1","dx2")
# Convert to CCSR codes
CCSRfind(workset=workset,dxs=dxs,example=TRUE)
Data to showcase CCSR-ICD-10 crosswalk
Description
The Clinical Classifications Software Refined (CCSR) for ICD-10-CM diagnoses aggregates more than 70,000 ICD-10-CM diagnosis codes into over 530 clinically meaningful categories. The CCSR is based on the International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM). The categories are organized across 22 body systems, which generally follow the structure of the ICD-10-CM diagnosis chapters.
Usage
DXCCSR
Format
A data frame with 86855 rows and 7 variables:
- ICD10
ICD-10 diagnosis codes
- icd_10_cm_code_description
Text description of ICD-10 codes
- CCSRCat
CCSR category corresponding to ICD-10 code
- CCSRD
Text description of CCSR category
- inpatient_default_ccsr_y_n_x
Indicator of whether or not the CCSR category is the default category in an inpatient setting
- outpatient_default_ccsr_y_n_x
Indicator of whether or not the CCSR category is the default category in an outpatient setting
- rationale_for_default_assignment
Rationale for the default assignment
Source
https://hcup-us.ahrq.gov/toolssoftware/ccsr/dxccsr.jsp
Examples
data(DXCCSR)
head(DXCCSR)
This dataset contains CCSR codes that are associated with over all ICD-10 codes
Description
This dataset contains CCSR codes that are associated with over all ICD-10 codes
Usage
Legend
Format
A data frame with 543 rows and 3 variables:
- CCSRCat
CCSR category corresponding to ICD-10 code
- CCSRD
Text description of CCSR category
- codecolvec
A regular expression listing all the ICD-10 codes for the CCSR code
Source
https://hcup-us.ahrq.gov/toolssoftware/ccsr/dxccsr.jsp
Examples
data(Legend)
head(Legend)
This dataset contains CCSR codes for which there are over 1,000 individual ICD-10 codes
Description
This dataset contains CCSR codes for which there are over 1,000 individual ICD-10 codes
Usage
LegendExtend
Format
A data frame with 9 rows and 3 variables:
- CCSRCat
CCSR category corresponding to ICD-10 code
- CCSRD
Text description of CCSR category
- codecolvec
A regular expression listing all the ICD-10 codes for the CCSR code
Source
https://hcup-us.ahrq.gov/toolssoftware/ccsr/dxccsr.jsp
Examples
data(LegendExtend)
head(LegendExtend)
Helper function to search for specific strings from multiple columns of data
Description
Helper function to search for specific strings from multiple columns of data
Usage
disc(mydata, cols, sts)
Arguments
mydata |
Dataset containing ICD-10 codes |
cols |
A vector of column names to bind in mydata |
sts |
A regular expression string that the function will search for |
Value
A vector indicating whether the string has been found
Examples
# Example dataset
id<-c(1:10)
dx1<-c("A000","B0189","A501","H16233","A5443","E211","A1832","A401","A501","H65114")
dx2<-c("A157","E133591","A5611","H60311","H02219","A064","H11039","F481","H26102","B91")
dx3<-c("M9701XS","M9702XS","M9711XS","A500","B90","A1828","M9731XS","E212","M9741XS","B89")
mydata<-data.frame(id,dx1,dx2,dx3)
cols<-c("dx1","dx2","dx3")
sts<-"A501|E133591"
disc(mydata=mydata, cols=cols, sts=sts)