Learn R Programming

readmit (version 0.0.1)

hsr_discharges: Extract discharge-level data from a Hospital-Specific Report (HSR)

Description

Parses out the discharge-level data for a specific program cohort that contributed to penalty program in the reporting fiscal year (FY).

Note: CMS changed the format of Hospital-Specific Reports (HSRs) for FY2026 (see here). The current HSR functions support formats through FY2025.

Usage

hsr_discharges(
  file,
  cohort,
  discharge_phi = TRUE,
  risk_factors = FALSE,
  eligible_only = FALSE
)

Value

A tibble::tibble()

Arguments

file

File path to a report

cohort

Cohort to extract the discharges for. One of c("AMI", "COPD", "HF", "PN", "CABG", "HK")

discharge_phi

Should discharge PHI be included? Defaults to TRUE (see details).

risk_factors

Should readmission risk factors be included? Defaults to FALSE (see details).

eligible_only

Should only eligible discharges be included? Defaults to FALSE (see details).

Details

The first set of columns in the discharge level data (typically through column R) contain the protected health information (PHI) associated with the discharges, such as medical record identifiers, admission/discharge/readmission dates, index diagnoses, etc. which can be used to identify the specific patients contributing (and not contributing) to the CMS penalty calculation for the cohort.

The risk factors contain the discharge-level clinical information used for individual risk adjustment by CMS to estimate individual level readmission rates. These can be useful to explore to understand risk factor distributions and prevalence, especially in combination with hsr_coefficients() which indicates the risk factors most heavily-weighted in the readmission risk calculation.

The HSR contains discharges that were not necessarily included/eligible to be counted in the Hospital Readmissions Reduction Program (HRRP). Setting eligible_only = TRUE will filter the returned result to only those that are eligible, and thus should match the denominator displayed in hsr_cohort_summary().

Examples

Run this code
# Access a report
my_report <- hsr_mock_reports("FY2025_HRRP_MockHSR.xlsx")

# All discharges
hsr_discharges(my_report, "HF")


# Discharges eligible for HRRP
hsr_discharges(my_report, "HF", eligible_only = TRUE)


# Only show risk factors for eligible discharges
hsr_discharges(
   file = my_report,
   cohort = "HF",
   discharge_phi = FALSE,
   risk_factors = TRUE,
   eligible_only = TRUE
)

# Row count matches denominator for HF
hsr_cohort_summary(my_report)

Run the code above in your browser using DataLab