hospital_data_availability: Check data availability for a Hospital covered by the...

Description Usage Arguments Value Examples

View source: R/hospital_data_availability.R

Description

This function takes a hospital id and returns the data availability in said hospital. Makes use of the hospital metadata, either by resorting to the wrapper get_hospital_metadata or when supplied by the user,

Usage

1
2
hospital_data_availability(hospital_id = NULL,
  hospital_metadata = NULL)

Arguments

hospital_id

Integer containing the hospital id, get it through get_hospital_metadata under the collumn id

hospital_metadata

a "data.frame" or NULL (default). If NULL, the function makes an API call to extract the hospitals metadata using get_hospital_metadata.

Value

Returns a tibble containing three variables: "data_type", character referring to the type of data provided by the endpoint, "availability", logical values providing information on the data availability in that hospital

Examples

1
2
3
my_metadata <- get_hospital_metadata(output_format = "data_frame", request_headers = "")

hospital_data_availability(hospital_id = sample(my_metadata$id, 1), hospital_metada = my_metadata)

josemreis/esperaR documentation built on March 31, 2020, 1:50 a.m.