Title: | Pediatric Complex Chronic Conditions |
Version: | 1.0.6 |
Description: | An implementation of the pediatric complex chronic conditions (CCC) classification system using R and C++. |
Depends: | R (≥ 3.5.0) |
License: | GPL-2 |
Encoding: | UTF-8 |
Language: | en-us |
LazyData: | true |
Imports: | dplyr (≥ 1.0.0), Rcpp (≥ 1.0.11), tibble |
Suggests: | covr, knitr, rmarkdown, readr |
RoxygenNote: | 7.3.2 |
LinkingTo: | Rcpp (≥ 1.0.11) |
VignetteBuilder: | knitr |
URL: | https://github.com/CUD2V/pccc |
BugReports: | https://github.com/CUD2V/pccc/issues |
NeedsCompilation: | yes |
Packaged: | 2025-05-15 20:49:54 UTC; seth |
Author: | Peter DeWitt |
Maintainer: | Seth Russell <seth.russell@cuanschutz.edu> |
Repository: | CRAN |
Date/Publication: | 2025-05-16 08:50:10 UTC |
pccc: Pediatric Complex Chronic Conditions
Description
An implementation of the pediatric complex chronic conditions (CCC) classification system. Implemented for the International Classification of Disease (ICD) 9th and 10th revisions.
Reference Material
The original paper, Feudtner C, et al. (2014), was publish with open access. For ease, a copy of the paper is included in this package. See the examples below for instructions on opening this pdf from within R or outside of R. You can view the publication online at doi:10.1186/1471-2431-14-199.
Feudtner et. al. provided a SAS macro and STATA program to implement the CCC. These files are also provided for reference. See the Examples for instructions on opening these files.
Lastly, the appendix tables in the file
system.file("pccc_references", "Categories_of_CCCv2_and_Corresponding_ICD.docx", package = "pccc")
have also been included with this package.
Author(s)
Maintainer: Seth Russell seth.russell@cuanschutz.edu (ORCID)
Authors:
Peter DeWitt dewittpe@gmail.com (ORCID)
James Feinstein james.feinstein@cuanschutz.edu (ORCID)
Other contributors:
Tell Bennett tell.bennett@cuanschutz.edu (ORCID) [contributor]
References
Feudtner C, et al. Pediatric complex chronic conditions classification system version 2: updated for ICD-10 and complex medical technology dependence and transplantation, BMC Pediatrics, 2014, 14:199, DOI: 10.1186/1471-2431-14-199
See Also
Useful links:
Examples
## Not run:
# To open the Feudtner et.al. pdf from within R use the following
if (!is.null(getOption("pdfviewer"))) {
system(paste0(getOption("pdfviewer"), " ",
file.path(system.file("pccc_references", package = "pccc")), "/",
"Feudtner_etal_2014.pdf"))
}
# If the pdf cannot be opened, you should be able to open it manually by
# navagating to
file.path(system.file("pccc_references", package = "pccc"))
# To view the original SAS program
file.show(system.file("pccc_references", "ccc_version2_sas.sas", package = "pccc"))
# To view the original STATA program
file.show(system.file("pccc_references", "ccc.do", package = "pccc"))
## End(Not run)
Complex Chronic Conditions (CCC)
Description
Generate CCC and CCC subcategory flags and the number of categories.
Usage
ccc(data, id, dx_cols = NULL, pc_cols = NULL, icdv)
Arguments
data |
a |
id |
bare name of the column containing the patient id |
dx_cols , pc_cols |
column names with the diagnostic codes and procedure
codes respectively. These argument are passed to |
icdv |
ICD version 9 or 10 |
Details
It is recommended that you view the codes defining the CCC via
get_codes
and make sure that the ICD codes in your data set are
formatted in the same way. The ICD codes used for CCC are character strings
must be formatted as follows:
*Do not* use decimal points or other separators
ICD 9 codes: Codes less than 10 should be left padded with 2 zeros. Codes less than 100 should be left padded with 1 zero.
See 'vignette("pccc-overview")' for more details.
Value
A data.frame
with a column for the subject id and integer (0
or 1) columns for each each of the categories.
References
See pccc-package
for published paper on the topic of identifying
Complex Chronic Conditions
See Also
get_codes
to view the ICD codes used to define the
CCC. select
for more examples and details on how to
identify and select the diagnostic and procedure code columns.
Examples
eg_data <- data.frame(id = letters,
dx1 = c(NA, NA, sample(get_codes(10)[["hemato_immu", "dx"]], 24)),
dx2 = c("A", sample(get_codes(10)[["gi", "dx"]], 25)),
dx3 = LETTERS,
pc1 = c("B", sample(get_codes(10)[["cvd", "pc"]], 25)),
pc2 = LETTERS,
other_col = LETTERS)
ccc(eg_data,
id,
dx_cols = dplyr::starts_with("dx"),
pc_cols = dplyr::starts_with("pc"),
icdv = 10)
Multiple Cause of Death (MCOD) file extract
Description
The Center for Disease Control has made publicly available death certificate data. This data set is a subset of the 2006 MCOD file for decedents aged <= 21 showing just the underlying cause of death diagnosis code in ICD-9-CM and ICD-10.
Usage
comparability
Format
A data frame with 65037 rows and 3 variables.
- id
Sequentially assigned patient identifier
- icd9
Underlying Cause of Death ICD 9 CM diagnosis code
- icd10
Underlying Cause of Death ICD 10 diagnosis code
See Also
vignette("pccc-example")
for more details about the MCOD
source file.
Get (view) Diagnostic and Procedure Codes
Description
View the ICD, version 9 or 10, for the Complex Chronic Conditions (CCC) categories.
Usage
get_codes(icdv)
Arguments
icdv |
and integer value specifying ICD version. Accepted values are 9 or 10. |
Details
The CCC categories for diagnostic and procedure codes are:
category | dx | dx_fixed | pc | pc_fixed |
neuromuscul | X | X | X | |
cvd | X | X | X | |
respiratory | X | X | X | |
renal | X | X | ||
gi | X | X | ||
hemato_immu | X | X | ||
metabolic | X | X | X | |
congeni_genetic | X | |||
malignancy | X | X | ||
neonatal | X | |||
tech_dep | X | X | ||
transplant | X | X | ||
The ICD codes were taken from the SAS macro provided by the reference paper.
Value
A matrix of character vectors. Rows are the categories and columns for diagnostic and procedure codes.
References
Feudtner C, et al. Pediatric complex chronic conditions classification system version 2: updated for ICD-10 and complex medical technology dependence and transplantation, BMC Pediatrics, 2014, 14:199, DOI: 10.1186/1471-2431-14-199
Examples
# All ICD 9 codes for CCC
get_codes(9)
# All ICD 10 codes for CCC
get_codes(10)
# Get all the codes for ICD 9 related to malignancy
get_codes(9)["malignancy", ]
Randomly Generated ICD 10 Sample Data Set
Description
This dataset was produced from a tool available at https://github.com/magic-lantern/icd_file_generator. ICD codes were taken from CMS. The code source, for both the diagnosis and produced codes can be found at https://www.cms.gov/medicare/coding-billing/icd-10-codes/icd-10-cm-icd-10-pcs-gem-archive with a copy of the downloaded data on the package github page, https://github.com/CUD2V/pccc
Usage
pccc_icd10_dataset
Format
A data frame with 1000 rows and 31 variables. There is a patient identifier, ten diagnosis codes, ten procedure codes, and ten "other data" values, specifically:
- id
Sequentially assigned patient identifier
- dx1
a ICD 10 diagnosis code
- dx2
a ICD 10 diagnosis code
- dx3
a ICD 10 diagnosis code
- dx4
a ICD 10 diagnosis code
- dx5
a ICD 10 diagnosis code
- dx6
a ICD 10 diagnosis code
- dx7
a ICD 10 diagnosis code
- dx8
a ICD 10 diagnosis code
- dx9
a ICD 10 diagnosis code
- dx10
a ICD 10 diagnosis code
- pc1
a ICD 10 procedure codes
- pc2
a ICD 10 procedure codes
- pc3
a ICD 10 procedure codes
- pc4
a ICD 10 procedure codes
- pc5
a ICD 10 procedure codes
- pc6
a ICD 10 procedure codes
- pc7
a ICD 10 procedure codes
- pc8
a ICD 10 procedure codes
- pc9
a ICD 10 procedure codes
- pc10
a ICD 10 procedure codes
- g1
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g2
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g3
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g4
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g5
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g6
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g7
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g8
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g9
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g10
Random data to simulate other data often present in export of patient data with 20% of values missing.
Randomly Generated ICD 9 Sample Data Set
Description
This dataset was produced from a tool available at https://github.com/magic-lantern/icd_file_generator. ICD codes were taken from CMS. The ICD 9 diagnosis and procedure codes were generated with 20 missing values. Code source: https://www.cms.gov/medicare/coding-billing/icd-10-codes/icd-9-cm-diagnosis-procedure-codes-abbreviated-and-full-code-titles
Usage
pccc_icd9_dataset
Format
A data frame with 1000 rows and 31 variables. There is a patient identifier, ten diagnosis codes, ten procedure codes, and ten "other data" values, specifically:
- id
Sequentially assigned patient identifier
- dx1
a ICD 9 diagnosis code
- dx2
a ICD 9 diagnosis code
- dx3
a ICD 9 diagnosis code
- dx4
a ICD 9 diagnosis code
- dx5
a ICD 9 diagnosis code
- dx6
a ICD 9 diagnosis code
- dx7
a ICD 9 diagnosis code
- dx8
a ICD 9 diagnosis code
- dx9
a ICD 9 diagnosis code
- dx10
a ICD 9 diagnosis code
- pc1
a ICD 9 procedure codes
- pc2
a ICD 9 procedure codes
- pc3
a ICD 9 procedure codes
- pc4
a ICD 9 procedure codes
- pc5
a ICD 9 procedure codes
- pc6
a ICD 9 procedure codes
- pc7
a ICD 9 procedure codes
- pc8
a ICD 9 procedure codes
- pc9
a ICD 9 procedure codes
- pc10
a ICD 9 procedure codes
- g1
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g2
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g3
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g4
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g5
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g6
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g7
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g8
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g9
Random data to simulate other data often present in export of patient data with 20% of values missing.
- g10
Random data to simulate other data often present in export of patient data with 20% of values missing.
Test Helper
Description
Tool to help access internal variables to use in testthat scripts, or anytime
access via :::
would be needed.
Usage
test_helper(var)
Arguments
var |
bare name of the internal variable to be accessed. |
Value
Object from internal PCCC name space (if it exists)