- Add FY2027 ICD-10-CM and ICD-10-PCS from CMS. The CDC-hosted FY2027 CM
order file agrees with CMS; the package's
cdcsource label continues to refer to mortality codes. - Extend ICD-10-AM code coverage through Australian financial year 2027 using the current Thirteenth Edition.
- Select CMS source archives explicitly so the original FY2026 PCS archive cannot mask the April 2026 update. Correct affected FY2026 code validity.
- Repair recursive ICD build dependencies and track selected source files so importer and source updates propagate to generated package data.
- Preserve the union of codes from supported annual AHRQ ICD-10 mappings in
elixhauser_ahrq_icd10. This method has no encounter year or quarter input, so codes from earlier releases remain included even if a later release no longer lists them as assignable. - Add a data-build check that mapped, assignable ICD-10 codes retain the same
POA-exemption status across supported AHRQ releases. This guards the
assumption behind the combined
elixhauser_ahrq_icd10method (#47).
- Add a
CITATIONfile and cite the JAMIA Open manuscript in the README. - Organize tests into attached, unattached, and extended groups, with a runner
that isolates each test script in its own environment. Routine checks now
disable extended tests explicitly; use
make check-extendedto run them. Tests that require an unavailable optional dependency can useskip_test()so the runner records a skip and continues with the group.
- Corrected the Elixhauser method name from
elixhauser_elixhauser1988toelixhauser_elixhauser1998. Theget_elixhauser_codes()andget_elixhauser_index_scores()lookup tables now use theelixhauser_elixhauser1998column and no longer include the old column name. Update code that selects the old column. Calls tocomorbidities(method = "elixhauser_elixhauser1988")remain temporarily supported with a deprecation warning. (#50)
-
comorbidities()gains amappingargument. The defaultmapping = "precomputed"uses the precomputed ICD code-condition links included with medicalcoder.mapping = "regex"applies method regular expressions directly to input ICD codes. Regex mapping is currently available for Charlson methods exceptcharlson_beyrer2021. (part of #45) -
Clarify
flag.method = "cumulative"documentation for longitudinal data. Users should validate encounter ordering and POA behavior carefully for their study design. -
Add validation for the encounter-order column used by
flag.method = "cumulative". Missing values and factor columns now error; character columns are allowed with a warning because they are sorted lexicographically. -
Add
charlson_sundararajan2004 -
Add
charlson_ludvigsson2021, a Charlson-style Swedish register-based comorbidity method. -
Add
charlson_mimicivcode, a mapping between ICD-10 codes and Charlson comorbidities to be consistent with mimiciv-code -
Add
charlson_beyrer2021, a Charlson style comorbidity based on U.S. ICD-10-CM diagnostic and ICD-10-PCS (procedure) codes from Beyrer et al. (2021) -
Add ICD-10-AM (Australian Modification) to the ICD database
-
Add ICD-10-SE (Swedish) to the ICD database. Source files from Socialstyrelsen.
-
summary()falls back to the next applicable method with a warning when a modifiedmedicalcoder_comorbiditiesobject no longer has the structure required by medicalcoder's methods. -
Prevent unrelated input columns from colliding with internal lookup columns while mapping ICD codes to comorbidities in
comorbidities(). -
ICD-10 Z49.1 has been added to elixhauser_quan2005; it was missing by error in the prior version of medicalcoder.
-
comorbidities()now warns, without stopping, when column-backedicdv.var,dx.var,poa.var, orprimarydx.varvalues fall outside the values used by the supported comorbidity mappings. -
Clarify that AHRQ SAS present-on-admission indicators should be converted to numeric values before using
poa.var:"Y"and"W"map to1L,"N"and"U"map to0L, and blank or missing values map toNA_integer_. -
Clarify that rows with
icdv.varvalues other than9or10are not used when mapping ICD codes to comorbidities. -
Clarify that rows with
dx.varvalues other than0or1are not used when mapping ICD codes to comorbidities. -
WHO ICD-10 codes extend 2019 to 2020 and 2021. WHO last published ICD-10 in 2019 and transitioned to ICD-11 on January 1, 2022.
-
Fix Charlson
age.varhandling whenid.varsis missing or has multiple ages per ID. (#43) -
Fix
summary()for Charlson results whenage.varis omitted andage_scoreis all missing. -
Account for possible zero nrow sets in
mdcr_set() -
Harden sort order for the results from
lookup_icd_codes()
medicalcoder <= 0.7.0 was under GPL-2 for no other reason that that was the default in the template DESCRIPTION file. With this release we have transitioned from GPL-2 to BSD-3-Clause to reduce almost all barriers to use of the package in other environments.
-
If a
tibbleis passed tocomorbidities()and thedplyrnamespace is available, thendplyrmethods will be used for data manipulation. This change will generally result in less computation time than base Rdata.frames(data.tablesrequire even less time). -
Add the
elixhauser_ahrq2026method forcomorbidities()(#32)
-
summary.medicalcoder_comorbidites()no longer crashes when a zero row input is passed in. Consistently returnNAinstead ofNaNwhen counts are zeros. (#26, #27) -
Improve the conditional and multiple comorbidities mapped by a code under AHRQ ICD-10 codes for fiscal years 2023 through 2026. The bug was found and fixed as part of the extension #32.
-
Add ICD-9-PCS 35.7 to the PCCC codes. (#38) The v2 docs have 37.52, 37.53, 37.54, 37.55 as cvd (device) and 37.5, 37.51 as cvd (transplant). v3 docs have 3751 as cvd (transplant), all other four digit codes under 37.5 as cvd (device). One issue here is that 37.5 was an assignable code from CDC through 2003 and then was a header with the same four digit codes as CMS through 2012. CMS continued to use the four digit codes through 2015.
-
Improve Elixhauser (Quan 2005) ICD-10 codes
- omitting F42.2 for depression
- adding G36.x for neuro
- adding 333.4 for neuro
-
Add checks for data structures (#41)
-
Handle zero length patterns in regex (#42)
-
Extend and improve the internal ICD-9 database to distinguish between CDC and CMS source.
-
Fix documentation of the
mdcrandmdcr_longitudinaldatasets. -
Clarified internal data.frame/data.table helpers: documented that
mdcr_select()deep-copies data.table subsets to avoid aliasing, noted the selfref fix inmdcr_set(), and added inline guidance in the longitudinal section ofcomorbidities()to explain the first-occurrence logic. -
Improve cumulative flagging to apply first-occurrence logic more efficiently.
-
Extend documentation for the expected default behavior between the present-on-admission flags and
flag.methodargument incomorbidities()(re: #28) -
Add
mdcr_unique()to the data.frame utilities. This reduced the computational time required to applycomorbidities()totibbles anddata.tables. (#31)
-
Elixhauser AHRQ 2022 - 2025
- exclusions for less severe conditions when more severe conditions are flagged.
- Improved POA, NPOA, and EXEMPTPOA. This came about from #20.
-
Make internal data.frame tool
mdcr_duplicated()data.table aware. -
Elixhauser (Quan 2005) - added missing ICD-10 codes to the mappings
-
comorbidities()will return atibblewhen the input data is atbl_df(#9). Assuming thedata.tableand/ortibblenamespaces are available, then the initial release (v0.6.0) would return adata.tableif adata.tablewas passed to acomorbidities()due to the S3 method dispatches. If atibble(tbl_df) or adata.framewas passed tocomorbidities()then the return would be adata.frame. In this release we have added logic to determine if the input is atibbleand if thetibblenamespace is available, then the return fromcomorbidities()will be atibble(or list oftibbles whensubconditions = TRUE).The tests were extended to consider the cases of passing in a
data.tableortibbleto comorbidities when the associated namespaces are not available. -
Added
elixhauser_ahrq_icd10to use all the ICD codes ever defined from 2022 to 2025. This will capture any future years as well.
- Improve formatting of vignettes/articles.
- Initial CRAN submission, providing a dependency-free toolkit for ICD-9/10 code
lookups
lookup_icd_codes(),get_icd_codes(),icd_compact_to_full(), andis_icd().
- Introduces a unified
comorbidities()interface covering Charlson (Deyo, Quan 2005/2011, Glasheen), Elixhauser (original, Quan 2005, AHRQ 2017-2025), and Pediatric Complex Chronic Conditions (v2.0/2.1/3.0/3.1). - Adds support for present-on-admission indicators, longitudinal look-back, age
scoring, and PCCC sub-condition flags within
comorbidities(). - Bundles curated ICD dictionaries alongside example datasets (
mdcr,mdcr_longitudinal) for reproducible testing and demonstrations. - Includes vignettes and benchmarking summaries that document usage patterns and showcase performance without non-base dependencies.