-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
49 lines (37 loc) · 1.66 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
output:
github_document:
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# hcris-cost-reports
This repository includes code to download and process the CMS hospital cost report data, known as HCRIS (Healthcare Cost Report Information System). The data includes reports for hospitals that completed the 2010 version of the cost report form, from approximately 2010 through the present.
The code (`R/hcris-script.R`) generates two forms of report data and select variables: records from hospitals representing their own fiscal year and records from hospitals converted to synthetic calendar years. The synthetic data method borrows from [Adam Sacarny's Stata code](https://github.com/asacarny/hospital-cost-reports) to complete this task (credit to Dr. Sacarny but any errors are mine alone).
This data in this repository is scheduled to update quarterly using Github Actions. The resulting data (`data/costreports.rds`) is then used in a [`shiny` application](https://josh-fangmeier.shinyapps.io/hospital-profile/) to generate profile views of each reporting hospital.
## Cost Report Data Available
```{r}
#| echo: FALSE
#| message: FALSE
#| warning: FALSE
library(knitr)
library(dplyr)
library(here)
options(knitr.table.format = 'markdown')
release_df <- readRDS(here("data", "release.rds"))
release_df %>%
rename(
"System Provider Type" = system,
"Form ID" = form,
"Beginning Fiscal Year" = fy_beg,
"Ending Fiscal Year" = fy_end,
"Data Update" = update_date,
"Data Release" = release_date
) %>%
kable()
```