Extract Any Mammograms from Medicare Claims

Description

Filters a Medicare carrier or outpatient claims file to rows containing any mammography HCPCS codes (screening or diagnostic), and converts claim dates to a 1-indexed study month relative to a reference date.

Usage

extract_any_mammograms(
  claims,
  id_col = "bene_id",
  date_col = "thru_dt",
  hcpcs_col = "hcpcs_cd",
  hcpcs_codes = c("77057", "76092", "G0202", "G0203", "G0205", "76090", "76091", "G0204",
    "G0206", "77055", "77056"),
  ref_date,
  study_start_month = 1L
)

Arguments

claims A data frame of Medicare claims. Must contain columns id_col, date_col, and hcpcs_col.
id_col Name of the beneficiary identifier column. Default: “bene_id”.
date_col Name of the service date column (coercible to Date). Default: “thru_dt”.
hcpcs_col Name of the HCPCS procedure code column. Default: “hcpcs_cd”.
hcpcs_codes Character vector of HCPCS codes identifying any mammography claims. Default: all screening and diagnostic codes combined.
ref_date A Date object giving the reference date from which study months are counted (e.g., the first day of the study period).
study_start_month Integer giving the month index assigned to ref_date. Default: 1L.

Details

This is a template function that cannot be run without access to Medicare claims data. It is provided as a reference implementation for users who have access to such data.

The default HCPCS codes cover both screening and diagnostic mammography:

  • Screening: “77057”, “76092”, “G0202”, “G0203”, “G0205”

  • Diagnostic: “76090”, “76091”, “G0204”, “G0206”, “77055”, “77056”

Value

A data frame with one row per matching claim, containing:

  • id: Beneficiary identifier (from id_col).

  • month: Study month index (integer, 1-indexed from ref_date).

See Also

extract_screening_mammograms(), extract_diagnostic_mammograms(), clone_censor()