R Under development (unstable) (2025-10-08 r88906 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(medicalcoder) > > DF <- data.frame(code = c("B", "A"), patid = 1:2)[0, ] > > out <- comorbidities(DF, icd.codes = "code", method = "charlson_quan2005") Warning message: 'poa.var' and 'poa' are both NULL. With flag.method = 'current' poa is set to 1. > stopifnot( + inherits(out, "medicalcoder_comorbidities"), + inherits(out, "data.frame"), + nrow(out) == 0L, + identical(names(out), c("aidshiv", "mal", "cebvd", "copd", "chf", "dem", "dmc", "dm", "hp", "mld", "msld", "mst", "mi", "pud", "pvd", "rnd", "rhd", "num_cmrb", "cmrb_flag", "cci", "age_score")) + ) > > out <- comorbidities(DF, icd.codes = "code", method = "elixhauser_ahrq2025") Warning messages: 1: 'poa.var' and 'poa' are both NULL. With flag.method = 'current' poa is set to 1. 2: Assuming all codes provided are secondary diagnostic codes. Define `primarydx.var` or `primarydx` if this assumption is incorrect. > stopifnot( + inherits(out, "medicalcoder_comorbidities"), + inherits(out, "data.frame"), + nrow(out) == 0L, + identical( + names(out), + c("AIDS", "ALCOHOL", "ANEMDEF", "AUTOIMMUNE", "BLDLOSS", "CANCER_LEUK", + "CANCER_LYMPH", "CANCER_METS", "CANCER_NSITU", "CANCER_SOLID", "CBVD", + "COAG", "DEMENTIA", "DEPRESS", "DIAB_CX", "DIAB_UNCX", "DRUG_ABUSE", "HF", + "HTN_CX", "HTN_UNCX", "LIVER_MLD", "LIVER_SEV", "LUNG_CHRONIC", + "NEURO_MOVT", "NEURO_OTH", "NEURO_SEIZ", "OBESE", "PARALYSIS", "PERIVASC", + "PSYCHOSES", "PULMCIRC", "RENLFL_MOD", "RENLFL_SEV", "THYROID_HYPO", + "THYROID_OTH", "ULCER_PEPTIC", "VALVE", "WGHTLOSS", "num_cmrb", + "cmrb_flag", "mortality_index", "readmission_index") + ) + ) > > out <- comorbidities(DF, icd.codes = "code", method = "pccc_v3.1") Warning message: 'poa.var' and 'poa' are both NULL. With flag.method = 'current' poa is set to 1. > stopifnot( + inherits(out, "medicalcoder_comorbidities"), + inherits(out, "data.frame"), + nrow(out) == 0L, + identical( + names(out), + c("congeni_genetic_dxpr_only", "congeni_genetic_tech_only", + "congeni_genetic_dxpr_and_tech", "congeni_genetic_dxpr_or_tech", + "cvd_dxpr_only", "cvd_tech_only", "cvd_dxpr_and_tech", "cvd_dxpr_or_tech", + "gi_dxpr_only", "gi_tech_only", "gi_dxpr_and_tech", "gi_dxpr_or_tech", + "hemato_immu_dxpr_only", "hemato_immu_tech_only", + "hemato_immu_dxpr_and_tech", "hemato_immu_dxpr_or_tech", + "malignancy_dxpr_only", "malignancy_tech_only", + "malignancy_dxpr_and_tech", "malignancy_dxpr_or_tech", + "metabolic_dxpr_only", "metabolic_tech_only", "metabolic_dxpr_and_tech", + "metabolic_dxpr_or_tech", "misc_dxpr_only", "misc_tech_only", + "misc_dxpr_and_tech", "misc_dxpr_or_tech", "neonatal_dxpr_only", + "neonatal_tech_only", "neonatal_dxpr_and_tech", "neonatal_dxpr_or_tech", + "neuromusc_dxpr_only", "neuromusc_tech_only", "neuromusc_dxpr_and_tech", + "neuromusc_dxpr_or_tech", "renal_dxpr_only", "renal_tech_only", + "renal_dxpr_and_tech", "renal_dxpr_or_tech", "respiratory_dxpr_only", + "respiratory_tech_only", "respiratory_dxpr_and_tech", + "respiratory_dxpr_or_tech", "any_tech_dep", "any_transplant", "num_cmrb", + "cmrb_flag") + ) + ) > > out <- comorbidities(DF, icd.codes = "code", method = "pccc_v3.1", subconditions = TRUE) Warning message: 'poa.var' and 'poa' are both NULL. With flag.method = 'current' poa is set to 1. > stopifnot( + inherits(out, "medicalcoder_comorbidities_with_subconditions"), + inherits(out, "medicalcoder_comorbidities"), + inherits(out[[1]], "data.frame"), + inherits(out[[2]], "list"), + nrow(out[[1]]) == 0L, + length(out[[2]]) == 11L, + sapply(out[[2]], nrow) == 0L + ) > > ################################################################################ > # End of File # > ################################################################################ > > proc.time() user system elapsed 3.14 0.28 3.39