Title: | Data Only Package to 'healthyR' |
---|---|
Description: | Provides data for functions typically used in the 'healthyR' package. |
Authors: | Steven Sanderson [aut, cre, cph] |
Maintainer: | Steven Sanderson <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.1.1.9000 |
Built: | 2024-11-06 02:55:43 UTC |
Source: | https://github.com/spsanderson/healthyR.data |
Get the current Ambulatory Surgery Center data.
current_asc_data(.data, .data_sets = c("Facility", "State", "National"))
current_asc_data(.data, .data_sets = c("Facility", "State", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c("Facility","State","National"), which will bring back all of the data in the Ambulatory Surgery Center data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scense only
the Ambulatory Surgery Center datasets are available to the function to choose
from and |
This function will obtain the current Ambulatory Surgery Center data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current ASC data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_asc_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_asc_data(.data_sets = c("State","National")) ## End(Not run)
Get the current Ambulatory Surgery Center data.
current_asc_oas_cahps_data( .data, .data_sets = c("Facility", "State", "National") )
current_asc_oas_cahps_data( .data, .data_sets = c("Facility", "State", "National") )
.data |
The data that results from the |
.data_sets |
The default is: c("Facility","State","National"), which will bring back all of the data sets that are in the Ambulatory Surgery Center OAS CAHPS data sets. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Ambulatory Surgery Center data sets are available to the function to choose
from and |
This function will obtain the current Ambulatory Surgery Center data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current ASC data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_asc_oas_cahps_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_asc_oas_cahps_data(.data_sets = c("State","National")) ## End(Not run)
Get the current complications and death data.
current_comp_death_data(.data, .data_sets = c("Facility", "State", "National"))
current_comp_death_data(.data, .data_sets = c("Facility", "State", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c("Facility","State","National"), which will bring back all of the data sets that are in the Complications and death data sets. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Complications and Death data sets are available to the function to choose
from and |
This function will obtain the current Complications and Death data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Complications and Death data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_comp_death_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_comp_death_data(.data_sets = c("State","National")) ## End(Not run)
Get the current hospital associated infection data.
current_hai_data(.data, .data_sets = c("Facility", "State", "National"))
current_hai_data(.data, .data_sets = c("Facility", "State", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c("Facility","State","National"), which will bring back all of the data sets that are in the hospital associated infections data sets. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the hospital associated infections data sets are available to the function to choose
from and |
This function will obtain the current hospital associated infections data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current hospital associated infection data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_hai_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_hai_data(.data_sets = c("State","National")) ## End(Not run)
Get the current hcahps data.
current_hcahps_data(.data, .data_sets = c("Facility", "State", "National"))
current_hcahps_data(.data, .data_sets = c("Facility", "State", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c("Facility","State","National"), which will bring back all of the data sets that are in the HCAPS data sets. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the hcahps data sets are available to the function to choose
from and |
This function will obtain the current HCAPHS data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Complications and Death data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_hcahps_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_hcahps_data(.data_sets = c("State","National")) ## End(Not run)
Download the current Hospital Data Sets.
current_hosp_data(path = utils::choose.dir())
current_hosp_data(path = utils::choose.dir())
path |
The location to download and unzip the files |
This function will download the current and the official hospital data sets from the CMS.gov website.
The function makes use of a temporary directory and file to save and unzip the data. This will grab the current Hospital Data Files, unzip them and return a list of tibbles with each tibble named after the data file.
The function returns a list object with all of the current hospital data as a tibble. It does not save the data anywhere so if you want to save it you will have to do that manually.
This also means that you would have to store the data as a variable in order to access the data later on. It does have a given attributes and a class so that it can be piped into other functions.
Downloads the current hospital data sets.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() ## End(Not run)
## Not run: current_hosp_data() ## End(Not run)
Download the Hospital Data Dictionary
current_hosp_data_dict(.open_folder = FALSE)
current_hosp_data_dict(.open_folder = FALSE)
.open_folder |
The default is FALSE. If set to TRUE then the folder where the file was saved to will be opened. |
This function will download the current Hospital Data Dictionary for
the official hospital data sets from the CMS.gov website. The function
makes use of utils::choose.dir()
and will ask the user where to save the
file.
Downloads the current hospital data dictionary to a place specified by the user.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
## Not run: current_hosp_data_dict() ## End(Not run)
## Not run: current_hosp_data_dict() ## End(Not run)
Get the current hospital hospital value based purchasing data.
current_hvbp_data( .data, .data_sets = c("Outcomes", "Efficiency", "Engagement", "Safety", "TPS") )
current_hvbp_data( .data, .data_sets = c("Outcomes", "Efficiency", "Engagement", "Safety", "TPS") )
.data |
The data that results from the |
.data_sets |
The default is: c("Outcomes","TPS"), which will bring back all of the data sets that are in the hospital VBP data sets. You can choose from the following:
You can also pass things like c("tps","Safety") as behind the scenes only
the hospital vbp data sets are available to the function to choose
from and |
This function will obtain the current hospital VBP data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current hospital vbp data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_hvbp_data(.data_sets = c("Outcomes","Safety")) ## End(Not run)
## Not run: current_hosp_data() |> current_hvbp_data(.data_sets = c("Outcomes","Safety")) ## End(Not run)
Get the current Inpatient Psyciatric Facilty data.
current_ipfqr_data(.data, .data_sets = c("Facility", "State", "National"))
current_ipfqr_data(.data, .data_sets = c("Facility", "State", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c("Facility","State","National"), which will bring back all of the data in the Inpatient Psyciatric Facilty data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Inpatient Psyciatric Facilty data sets are available to the function to choose
from and |
This function will obtain the current Inpatient Psyciatric Facilty data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current IPFQR data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_ipfqr_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_ipfqr_data(.data_sets = c("State","National")) ## End(Not run)
Get the current Maternal Health data.
current_maternal_data(.data, .data_sets = c("Facility", "State", "National"))
current_maternal_data(.data, .data_sets = c("Facility", "State", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c("Facility","State","National"), which will bring back all of the data in the Maternal Health data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Maternal Health data sets are available to the function to choose
from and |
This function will obtain the current Maternal Health data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Maternal Health data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_maternal_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_maternal_data(.data_sets = c("State","National")) ## End(Not run)
Get the current Medicare Hospital Spending data.
current_medicare_hospital_spending_data( .data, .data_sets = c("Claim", "Facility", "State", "National") )
current_medicare_hospital_spending_data( .data, .data_sets = c("Claim", "Facility", "State", "National") )
.data |
The data that results from the |
.data_sets |
The default is: c("Claim","Facility","State","National"), which will bring back all of the data in the Medicare Hospital Spending data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Medicare Hospital Spending data sets are available to the function to choose
from and |
This function will obtain the current Medicare Hospital Spending data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Medicare Hospital Spending data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_maternal_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_maternal_data(.data_sets = c("State","National")) ## End(Not run)
Get the current OAS CAHPS data.
current_oqr_oas_cahps_data( .data, .data_sets = c("Facility", "State", "National") )
current_oqr_oas_cahps_data( .data, .data_sets = c("Facility", "State", "National") )
.data |
The data that results from the |
.data_sets |
The default is: c("Claim","Facility","State","National"), which will bring back all of the data in the OAS CAHPS data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the OAS CAHPS data sets are available to the function to choose
from and |
This function will obtain the current OAS CAHPS data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current OAS CAHPS data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_maternal_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_maternal_data(.data_sets = c("State","National")) ## End(Not run)
Get the current Imaging Efficiency data.
current_outpatient_imaging_efficiency_data( .data, .data_sets = c("Facility", "State", "National") )
current_outpatient_imaging_efficiency_data( .data, .data_sets = c("Facility", "State", "National") )
.data |
The data that results from the |
.data_sets |
The default is: c("Claim","Facility","State","National"), which will bring back all of the data in the Imaging Efficiency data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Imaging Efficiency data sets are available to the function to choose
from and |
This function will obtain the current Imaging Efficiency data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Imaging Efficiency data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_outpatient_imaging_efficiency_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_outpatient_imaging_efficiency_data(.data_sets = c("State","National")) ## End(Not run)
Get the current Payments data.
current_payments_data(.data, .data_sets = c("Facility", "State", "National"))
current_payments_data(.data, .data_sets = c("Facility", "State", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c(Facility","State","National"), which will bring back all of the data in the Payments data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Payments data sets are available to the function to choose
from and |
This function will obtain the current Payments data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Payments data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_payments_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_payments_data(.data_sets = c("State","National")) ## End(Not run)
Get the current PCH HAI Hospital data.
current_pch_hai_hospital_data(.data)
current_pch_hai_hospital_data(.data)
.data |
The data that results from the |
This function will obtain the current PCH HAI Hospital data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. This function only returns a single
object.
Gets the current PCH HCAHPS data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_pch_hai_hospital_data() ## End(Not run)
## Not run: current_hosp_data() |> current_pch_hai_hospital_data() ## End(Not run)
Get the current PCH HCAHPS data.
current_pch_hcahps_data(.data, .data_sets = c("Facility", "State", "National"))
current_pch_hcahps_data(.data, .data_sets = c("Facility", "State", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c(Facility","State","National"), which will bring back all of the data in the PCH HCAHPS data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the PCH HCAHPS data sets are available to the function to choose
from and |
This function will obtain the current PCH HCAHPS data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current PCH HCAHPS data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_pch_hcahps_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_pch_hcahps_data(.data_sets = c("State","National")) ## End(Not run)
Get the current PCH Oncology Measures data.
current_pch_oncology_measures_hospital_data(.data)
current_pch_oncology_measures_hospital_data(.data)
.data |
The data that results from the |
This function will obtain the current PCH Oncology Measures data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. This function only returns a single
object.
Gets the current PCH Oncology Measures Hospital data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_pch_oncology_measures_hospital_data() ## End(Not run)
## Not run: current_hosp_data() |> current_pch_oncology_measures_hospital_data() ## End(Not run)
Get the current PCH Outcomes data.
current_pch_outcomes_data(.data, .data_sets = c("Facility", "National"))
current_pch_outcomes_data(.data, .data_sets = c("Facility", "National"))
.data |
The data that results from the |
.data_sets |
The default is: c(Facility","National"), which will bring back all of the data in the PCH HCAHPS data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the PCH Outcomes data sets are available to the function to choose
from and |
This function will obtain the current PCH Outcomes data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current PCH Outcomes data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_pch_outcomes_data(.data_sets = c("Facility", "National")) ## End(Not run)
## Not run: current_hosp_data() |> current_pch_outcomes_data(.data_sets = c("Facility", "National")) ## End(Not run)
Get the current Timely & Effective Care data.
current_timely_and_effective_care_data( .data, .data_sets = c("Facility", "State", "National") )
current_timely_and_effective_care_data( .data, .data_sets = c("Facility", "State", "National") )
.data |
The data that results from the |
.data_sets |
The default is: c(Facility","State","National"), which will bring back all of the data in the Timely & Effective Care data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Timely & Effective Care data sets are available to the function to choose
from and |
This function will obtain the current Timely & Effective Care data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Timely & Effective Care data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_unplanned_hospital_visits_data
,
current_va_data()
## Not run: current_hosp_data() |> current_timely_and_effective_care_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_timely_and_effective_care_data(.data_sets = c("State","National")) ## End(Not run)
Get the current Unplanned Hospital Visits data.
current_unplanned_hospital_vists_data( .data, .data_sets = c("Facility", "State", "National") )
current_unplanned_hospital_vists_data( .data, .data_sets = c("Facility", "State", "National") )
.data |
The data that results from the |
.data_sets |
The default is: c(Facility","State","National"), which will bring back all of the data in the Unplanned Hospital Visits data sets that are in the file. You can choose from the following:
You can also pass things like c("state","Nation") as behind the scenes only
the Unplanned Hospital Visits data sets are available to the function to choose
from and |
This function will obtain the current Unplanned Hospital Visits data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Unplanned Hospital Visits data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_va_data()
## Not run: current_hosp_data() |> current_unplanned_hospital_visits_data(.data_sets = c("State","National")) ## End(Not run)
## Not run: current_hosp_data() |> current_unplanned_hospital_visits_data(.data_sets = c("State","National")) ## End(Not run)
Get the current Veterans Affairs data.
current_va_data(.data, .data_sets = c("Behavioral", "Timely", "Provider"))
current_va_data(.data, .data_sets = c("Behavioral", "Timely", "Provider"))
.data |
The data that results from the |
.data_sets |
The default is: c(Facility","State","National"), which will bring back all of the data in the Veterans Affairs data sets that are in the file. You can choose from the following:
You can also pass things like c("behavioral","Provider") as behind the scenes only
the Veterans Affairs data sets are available to the function to choose
from and |
This function will obtain the current Veterans Affairs data
from the output of the current_hosp_data()
function, that is
the required input for the .data
parameter. You can pass in a list of which
of those data sets you would like,
Gets the current Veterans Affairs data from the current hospital data file.
Steven P. Sanderson II, MPH
https://data.cms.gov/provider-data/topics/hospitals/
Other Hospital Data:
current_asc_data()
,
current_asc_oas_cahps_data()
,
current_comp_death_data()
,
current_hai_data()
,
current_hcahps_data()
,
current_hosp_data()
,
current_hvbp_data()
,
current_ipfqr_data()
,
current_maternal_data()
,
current_medicare_hospital_spending_data()
,
current_oqr_oas_cahps_data()
,
current_outpatient_imaging_efficiency_data()
,
current_payments_data()
,
current_pch_hai_hospital_data()
,
current_pch_hcahps_data()
,
current_pch_oncology_measures_hospital_data()
,
current_pch_outcomes_data()
,
current_timely_and_effective_care_data()
,
current_unplanned_hospital_visits_data
## Not run: current_hosp_data() |> current_va_data(.data_sets = c("Behavioral")) ## End(Not run)
## Not run: current_hosp_data() |> current_va_data(.data_sets = c("Behavioral")) ## End(Not run)
This function retrieves data from the provided link and returns it as a tibble
with cleaned names. This function is intended to be used with the CMS data API
function get_cms_meta_data
.
fetch_cms_data(.data_link)
fetch_cms_data(.data_link)
.data_link |
A character string containing the URL to fetch data from. |
The function sends a request to the provided URL using httr2::request
and
httr2::req_perform
. If the response status is not 200, it stops with an
error message indicating the failure. The response body is parsed as JSON and
converted into a tibble using dplyr::as_tibble
. The column names are cleaned
using janitor::clean_names
, and any character columns are stripped of leading
and trailing whitespace using stringr::str_squish
.
A tibble containing the fetched data with cleaned names. If an error
occurs, returns NULL
.
library(dplyr) # Example usage: base_url <- "https://data.cms.gov/data-api/v1/dataset/" data_identifier <- "9767cb68-8ea9-4f0b-8179-9431abc89f11" data_url <- paste0(base_url, data_identifier, "/data") df_tbl <- fetch_cms_data(data_url) df_tbl |> head(1) |> glimpse()
library(dplyr) # Example usage: base_url <- "https://data.cms.gov/data-api/v1/dataset/" data_identifier <- "9767cb68-8ea9-4f0b-8179-9431abc89f11" data_url <- paste0(base_url, data_identifier, "/data") df_tbl <- fetch_cms_data(data_url) df_tbl |> head(1) |> glimpse()
This function retrieves provider data from the provided link and returns it as a tibble with cleaned names or downloads the data as a CSV file if the link ends in .csv. This function is intended to be used with the CMS provider data API.
fetch_provider_data(.data_link, .limit = 500)
fetch_provider_data(.data_link, .limit = 500)
.data_link |
A character string containing the URL to fetch data from. |
.limit |
An integer specifying the maximum number of rows to fetch. Default is 500. If set to 0, all records will be returned. |
The function sends a request to the provided URL using httr2::request
and
httr2::req_perform
. If the response status is not 200, it stops with an
error message indicating the failure. If the URL ends in .csv, it uses utils::download.file
to download the CSV file to a directory chosen by the user. Otherwise, the
response body is parsed as JSON and converted into a tibble using
dplyr::as_tibble
. The column names are cleaned using janitor::clean_names
,
and any character columns are stripped of leading and trailing whitespace
using stringr::str_squish
. The default limit for a return on records is 500.
If the limit is set to 0, all records will be returned.
A tibble containing the fetched data with cleaned names, or downloads
a CSV file to the user-selected directory. If an error occurs, returns NULL
.
library(dplyr) # Example usage: data_url <- "069d-826b" df_tbl <- fetch_provider_data(data_url, .limit = 1) df_tbl |> glimpse()
library(dplyr) # Example usage: data_url <- "069d-826b" df_tbl <- fetch_provider_data(data_url, .limit = 1) df_tbl |> glimpse()
This function sends a request to the specified CMS data URL, retrieves the JSON data, and processes it to create a tibble with relevant information about the datasets.
get_cms_meta_data( .title = NULL, .modified_date = NULL, .keyword = NULL, .identifier = NULL, .data_version = "current", .media_type = "all" )
get_cms_meta_data( .title = NULL, .modified_date = NULL, .keyword = NULL, .identifier = NULL, .data_version = "current", .media_type = "all" )
.title |
This can be a title that is used to search the data. |
.modified_date |
This can be a date in the format of "YYYY-MM-DD" |
.keyword |
This can be a keyword that is used to search the data. |
.identifier |
This can be an identifier that is used to search the data. |
.data_version |
This can be one of three different choices: "current", "archive", or "all". The default is "current" and if you make a choice that does not exist then it will default to "current". |
.media_type |
This can be one of three different choices: "all", "csv", "API", or "other". The default is "all" and if you make a choice that does not exist then it will default to "all". |
The function fetches JSON data from the CMS data URL and extracts relevant fields to create a tidy tibble. It selects specific columns, handles nested lists by unnesting them, cleans column names, and processes dates and media types to make the data more useful for analysis. The columns in the returned tibble are:
title
description
landing_page
modified
keyword
described_by
fn
has_email
identifier
start
end
references
distribution_description
distribution_title
distribution_modified
distribution_start
distribution_end
media_type
data_link
A tibble with data links and relevant metadata about the datasets.
Steven P. Sanderson II, MPH
https://data.cms.gov/data.json
Other Meta Data:
get_provider_meta_data()
library(dplyr) # Fetch and process metadata from the CMS data URL get_cms_meta_data( .keyword = "nation", .title = "Market Saturation & Utilization State-County" ) |> glimpse()
library(dplyr) # Fetch and process metadata from the CMS data URL get_cms_meta_data( .keyword = "nation", .title = "Market Saturation & Utilization State-County" ) |> glimpse()
This function sends a request to the specified CMS metadata URL, retrieves the JSON data, and processes it to create a tibble with relevant information about the datasets.
get_provider_meta_data( .identifier = NULL, .title = NULL, .description = NULL, .keyword = NULL, .issued = NULL, .modified = NULL, .released = NULL, .theme = NULL, .media_type = NULL )
get_provider_meta_data( .identifier = NULL, .title = NULL, .description = NULL, .keyword = NULL, .issued = NULL, .modified = NULL, .released = NULL, .theme = NULL, .media_type = NULL )
.identifier |
A dataset identifier to filter the data. |
.title |
A title to filter the data. |
.description |
A description to filter the data. |
.keyword |
A keyword to filter the data. |
.issued |
A date when the dataset was issued to filter the data. |
.modified |
A date when the dataset was modified to filter the data. |
.released |
A date when the dataset was released to filter the data. |
.theme |
A theme to filter the data. |
.media_type |
A media type to filter the data. |
The function fetches JSON data from the CMS metadata URL and extracts relevant fields to create a tidy tibble. It selects specific columns, handles nested lists by unnesting them, cleans column names, and processes dates and media types to make the data more useful for analysis. The columns in the returned tibble are:
identifier
title
description
keyword
issued
modified
released
theme
media_type
download_url
contact_fn
contact_email
publisher_name
A tibble with metadata about the datasets.
https://data.cms.gov/provider-data/api/1/metastore/schemas/dataset/items
Other Meta Data:
get_cms_meta_data()
library(dplyr) # Fetch and process metadata from the CMS data URL get_provider_meta_data(.identifier = "3614-1eef") |> glimpse()
library(dplyr) # Fetch and process metadata from the CMS data URL get_provider_meta_data(.identifier = "3614-1eef") |> glimpse()
A dataset containing many common items found in an administrative dataset at a hospital.
data(healthyR_data)
data(healthyR_data)
A data frame with 187,721 rows and 17 variables
mrn. Medical Record Number. Unique patient identifier.
visit_id. Unique hospital Visit ID. Tied to an mrn
visit_start_date_time. The starting datetime of a visit_id
visit_end_date_time. The ending datetime of a visit_id
total_charge_amount. The total charge in dollars for a visit_id
total_amount_due. The toal amount of money still due to a visit_id
total_adjustment_amount. The toal amount of money adjusted off of an account for various reasons
payer_grouping. The insurance classification of a visit_id
total_payment_amount. The total amount of money paid on a visit_id
ip_op_flag. A flag that indicates if the patient was admitted or was an outpatient
service_line. The hospital service line for the visit_id
length_of_stay. The total days a visit_id was admitted to the hospital
expected_length_of_stay. The total days a visit_id was expected to be admitted
lnmgth_of_stay_threshold. The threshold of the length_of_stay variable before the visit_id is considered to be an outlier
los_outler_flag. A binary indicator of whether or not a visit_id was above the threshold
readmit_flag. A binary indicator of whether or not a visit_id was admitted in 30 days
readmit_expectation. The readmit rate for the particular visit computed from a benchmark
This function validates a URL by checking the presence of a scheme and a hostname in the parsed URL.
is_valid_url(url)
is_valid_url(url)
url |
A character string representing the URL to be checked. |
The function uses the httr2::url_parse
function to parse the URL
and checks if the parsed URL contains a scheme and a hostname. If either
is missing, the URL is considered invalid.
A logical value: TRUE
if the URL is valid, FALSE
otherwise.
Steven P. Sanderson II, MPH
is_valid_url("https://www.example.com") # TRUE is_valid_url("not_a_url") # FALSE
is_valid_url("https://www.example.com") # TRUE is_valid_url("not_a_url") # FALSE