Skip to contents

Medicare Utilization Summary

df <- by_provider_years() |> 
  map(\(x) by_provider(year = x, npi = 1023076643)) |> 
  list_rbind()

Counts & Amounts

select(df, year, tot_hcpcs:tot_payment)
year tot_hcpcs tot_benes tot_srvcs tot_charges tot_allowed tot_payment
2013 7 568 936 86308 32714.18 24656.43
2014 6 622 1036 96688 37852.30 28751.20
2015 15 191 287 46296 12456.78 8248.40
2016 11 34 48 17218 3375.55 2689.55
2017 16 57 139 30639 12761.97 10168.26
2018 21 203 727 146819 62682.72 48737.02
2019 9 24 69 13813 6147.90 3095.02

Chronic Condition Prevalence

chronic <- compare_conditions(df)
chronic |> 
  pivot_wider(names_from = level, values_from = prevalence) |> 
  arrange(condition) |> 
  gt::gt(groupname_col = "condition") |> 
  gt::fmt_percent(columns = c(Provider, State, National)) |> 
  gtExtras::gt_theme_nytimes()
year Provider State National
Alzheimer's Disease/Dementia
2013 6.00% 10.49% 10.54%
2014 5.00% 9.48% 10.31%
2015 6.00% 9.31% 10.31%
2017 33.00% 9.21% 10.82%
2018 28.00% 9.13% 10.78%
Arthritis
2013 33.00% 27.48% 29.94%
2014 34.00% 26.53% 30.22%
2015 40.00% 27.34% 30.98%
2016 44.00% 28.35% 32.29%
2017 35.00% 29.14% 33.02%
2018 33.00% 29.84% 33.47%
Asthma
2013 5.00% 6.29% 5.12%
2014 7.00% 5.05% 5.18%
2015 12.00% 5.11% 5.29%
2018 9.00% 4.85% 4.97%
Atrial Fibrillation
2013 25.00% 9.43% 8.12%
2014 28.00% 8.71% 8.22%
2015 32.00% 8.77% 8.34%
2016 47.00% 8.82% 8.29%
2017 23.00% 8.84% 8.34%
2018 25.00% 8.93% 8.41%
COPD
2013 18.00% 10.25% 11.47%
2014 19.00% 10.40% 11.33%
2015 23.00% 10.53% 11.55%
2016 41.00% 10.44% 11.64%
2017 53.00% 10.57% 11.68%
2018 44.00% 10.32% 11.47%
Cancer
2013 13.00% 8.97% 8.03%
2014 13.00% 7.76% 7.98%
2015 11.00% 7.65% 8.03%
2017 21.00% 7.79% 8.22%
2018 9.00% 7.94% 8.36%
Chronic Kidney Disease
2013 27.00% 16.83% 16.41%
2014 23.00% 14.19% 16.99%
2015 29.00% 14.99% 18.70%
2016 75.00% 17.30% 22.32%
2017 53.00% 18.60% 23.96%
2018 48.00% 19.04% 24.48%
Depression
2013 23.00% 21.00% 16.22%
2014 21.00% 19.43% 16.72%
2015 24.00% 19.57% 17.41%
2016 44.00% 19.06% 17.40%
2017 49.00% 19.34% 17.92%
2018 44.00% 19.57% 18.40%
Diabetes
2013 38.00% 24.30% 27.54%
2014 31.00% 22.44% 27.43%
2015 41.00% 22.23% 27.36%
2016 56.00% 22.09% 27.33%
2017 44.00% 21.86% 27.20%
2018 47.00% 21.54% 26.95%
Heart Failure
2013 29.00% 13.16% 14.42%
2014 26.00% 10.49% 14.05%
2015 39.00% 10.58% 13.90%
2016 75.00% 10.47% 13.85%
2017 56.00% 10.48% 13.85%
2018 48.00% 10.84% 13.95%
Hyperlipidemia
2013 75.00% 45.67% 46.02%
2014 73.00% 43.62% 45.87%
2015 75.00% 41.89% 45.89%
2016 75.00% 40.41% 45.08%
2017 63.00% 42.44% 46.92%
2018 70.00% 42.49% 47.66%
Hypertension
2013 75.00% 55.94% 56.79%
2014 75.00% 50.24% 56.53%
2015 75.00% 49.08% 56.57%
2016 75.00% 49.30% 56.94%
2017 75.00% 49.48% 57.04%
2018 75.00% 49.83% 57.20%
Ischemic Heart Disease
2013 70.00% 24.72% 28.38%
2014 66.00% 21.18% 27.69%
2015 72.00% 20.79% 27.25%
2016 75.00% 20.86% 27.04%
2017 56.00% 21.07% 26.86%
2018 51.00% 21.49% 26.81%
Osteoporosis
2013 10.00% 6.85% 6.23%
2014 9.00% 5.64% 6.12%
2015 12.00% 5.53% 6.18%
2018 10.00% 5.61% 6.57%
Schizophrenia and Other Psychotic Disorders
2014 3.00% 3.90% 3.89%
2015 7.00% 3.81% 3.82%
2018 8.00% 2.57% 2.95%
Stroke
2013 7.00% 3.57% 3.83%
2014 7.00% 3.07% 3.83%
2015 6.00% 2.95% 3.80%
2018 13.00% 3.05% 3.77%

HCPCS Utilization Data

hcpcs <- by_service_years() |> 
  map(\(x) by_service(year = x, npi = 1023076643)) |> 
  list_rbind() |> 
  compare_hcpcs()


table <- hcpcs |> 
  select(year, 
         level, 
         hcpcs_code,
         BENEFICIARIES = beneficiaries,
         SERVICES = services, 
         "Average Charge" = avg_charge, 
         "Average Allowed" = avg_allowed, 
         "Average Payment" = avg_payment) |> 
  pivot_longer(!year:hcpcs_code, 
               names_to = "stat", 
               values_to = "amount") |> 
  pivot_wider(names_from = level, 
              values_from = amount)

# TODO: AVG PROCEDURES PER BENEFICIARY
table |> 
  filter(stat %in% c("SERVICES")) |> 
  arrange(stat, hcpcs_code) |> 
  gt::gt(groupname_col = "stat", rowname_col = "hcpcs_code") |> 
  gt::fmt_number(decimals = 0) |> 
  gt::fmt_integer(columns = "year", sep_mark = "") |> 
  gt::cols_label(hcpcs_code = "HCPCS") |> 
  gtExtras::gt_theme_nytimes()
year Provider State National
SERVICES
93010 2013 187 370 258
93010 2014 229 186 247
93010 2015 34 171 242
93016 2013 383 56 49
93016 2014 381 74 50
93016 2015 100 52 50
93018 2015 11 57 56
99214 2013 341 91 70
99214 2014 377 128 73
99214 2015 79 131 74
99215 2013 19 23 20
99215 2014 45 21 21
99217 2018 14 17 15
99223 2017 15 31 45
99223 2018 67 28 44
99232 2015 18 107 180
99232 2016 16 113 174
99232 2017 38 118 166
99232 2018 217 110 157
99233 2015 15 62 104
99233 2016 19 65 103
99238 2018 16 14 21
99239 2017 31 48 48
99239 2018 95 49 49
99305 2018 16 24 32
99306 2018 31 27 45
99308 2018 33 73 163
99309 2018 113 109 160
99316 2017 13 24 24
99316 2018 79 26 24

table |> 
  filter(stat %in% c("BENEFICIARIES")) |> 
  arrange(stat, hcpcs_code) |> 
  gt::gt(groupname_col = "stat", rowname_col = "hcpcs_code") |> 
  gt::fmt_number(decimals = 0) |> 
  gt::fmt_integer(columns = "year", sep_mark = "") |> 
  gt::cols_label(hcpcs_code = "HCPCS") |> 
  gtExtras::gt_theme_nytimes()
year Provider State National
BENEFICIARIES
93010 2013 140 145 106
93010 2014 173 94 104
93010 2015 33 87 102
93016 2013 379 53 47
93016 2014 373 71 48
93016 2015 100 50 49
93018 2015 11 55 54
99214 2013 201 33 28
99214 2014 249 49 28
99214 2015 61 51 29
99215 2013 17 13 12
99215 2014 45 14 12
99217 2018 14 15 13
99223 2017 15 21 19
99223 2018 66 20 18
99232 2015 11 23 18
99232 2016 12 23 18
99232 2017 28 24 17
99232 2018 101 22 16
99233 2015 12 18 17
99233 2016 14 19 16
99238 2018 16 13 16
99239 2017 29 38 33
99239 2018 91 38 33
99305 2018 16 20 24
99306 2018 28 23 33
99308 2018 26 25 28
99309 2018 50 32 31
99316 2017 13 21 22
99316 2018 67 23 22

table |> 
  filter(stat %in% c("Average Payment")) |> 
  arrange(stat, hcpcs_code) |> 
  gt::gt(groupname_col = "stat", rowname_col = "hcpcs_code") |> 
  gt::fmt_number(decimals = 2) |> 
  gt::fmt_integer(columns = "year", sep_mark = "") |> 
  #gt::cols_label(hcpcs_code = "HCPCS") |> 
  gtExtras::gt_theme_nytimes()
year Provider State National
Average Payment
93010 2013 5.19 6.41 6.30
93010 2014 5.59 6.45 6.58
93010 2015 4.85 6.40 6.55
93016 2013 14.20 16.29 15.93
93016 2014 14.05 15.64 16.45
93016 2015 11.71 15.67 16.68
93018 2015 9.93 10.87 10.99
99214 2013 48.75 54.64 52.79
99214 2014 49.62 54.29 54.99
99214 2015 39.24 53.86 54.77
99215 2013 73.07 81.00 78.78
99215 2014 73.82 80.60 81.42
99217 2018 48.80 55.63 55.67
99223 2017 134.91 157.03 156.83
99223 2018 117.73 158.76 157.58
99232 2015 49.34 55.94 56.56
99232 2016 48.93 55.59 55.95
99232 2017 48.25 55.75 56.23
99232 2018 47.68 57.15 56.96
99233 2015 71.07 81.30 82.05
99233 2016 70.58 80.64 81.31
99238 2018 48.99 56.61 56.40
99239 2017 71.91 83.91 83.44
99239 2018 70.97 84.92 83.96
99305 2018 87.27 99.60 100.77
99306 2018 111.72 128.59 129.88
99308 2018 46.38 46.15 50.57
99309 2018 61.35 63.31 66.25
99316 2017 70.62 73.28 76.15
99316 2018 69.13 74.42 76.43