Returns all available locations, subject to given parameters.

cqc_locations_search(
  care_home = NULL,
  onspd_ccg_code = NULL,
  onspd_ccg_name = NULL,
  ods_ccg_code = NULL,
  ods_ccg_name = NULL,
  gac_service_type_description = NULL,
  constituency = NULL,
  local_authority = NULL,
  inspection_directorate = NULL,
  primary_inspection_category_code = NULL,
  primary_inspection_category_name = NULL,
  non_primary_inspection_category_code = NULL,
  non_primary_inspection_category_name = NULL,
  overall_rating = NULL,
  region = NULL,
  regulated_activity = NULL,
  report_type = NULL,
  verbose = TRUE,
  clean_names = TRUE,
  page_size = 500
)

Arguments

care_home

If TRUE, only returns care homes. If FALSE, returns all locations except care homes. Defaults to NULL and returns all locations including care homes.

onspd_ccg_code

Include only locations where the ONSPD CCG code of the geographic area covering the Location's postcode matches one of the values of this parameter.

onspd_ccg_name

Include only locations where the ONSPD CCG name of the geographic area covering the Location's postcode matches one of the values of this parameter.

ods_ccg_code

Include only locations where the ODS code of the CCG selected by this organisation is known and matches one of the values of this parameter.

ods_ccg_name

Include only locations where the ODS name of the CCG selected by this organisation is known and matches one of the values of this parameter.

gac_service_type_description

GAC Service Type Descriptions, matching one or more values of this parameter. e.g. "Acute services with overnight beds".

constituency

Location is in a given parliamentary constituency

local_authority

Location is in a given local authority.

inspection_directorate

The type of inspection directorate. Accepts one or more off "Adult social care", "Hospitals", "Primary medical services" or "Unspecified".

primary_inspection_category_code

The primary inspection category code. e.g. "H1"

primary_inspection_category_name

The primary inspection category name. e.g. "Slimming Clinics"

non_primary_inspection_category_code

The non-primary inspection category code. e.g. "H1"

non_primary_inspection_category_name

The non-primary inspection category name. e.g. "Slimming Clinics".

overall_rating

Include only locations with a given inspection rating. e.g. "Good". Accepts character vector of multiple inspection ratings.

region

Region of the UK, e.g. "London" or "North East".

regulated_activity

The type of activity at a location, e.g. "Accommodation for persons who require treatment for substance misuse".

report_type

The type of report, e.g. "Location", "Provider" or "CoreService".

verbose

If TRUE prints download progress to console if requesting more than 1,000 records. Defaults to TRUE.

clean_names

If TRUE, converts a column names to snake_case. Defaults to TRUE.

page_size

The number of records to return per page of the API. Use smaller values for slower connections. Defaults to 500.

Value

A tibble with the location ID, name and postcode of all locations meeting the given parameters.

Details

All parameters except care_home, verbose and clean_names accept an array of values, and will return locations matching any of the values of those arrays, subject to other parameters. Search parameters are case sensitive, e.g. for inspection_directorate, "hospitals" will not return any information, "Hospitals" will, subject to other parameters.

Examples

# \donttest{ ## Get all care homes in Redbridge loc1 <- cqc_locations_search(care_home = TRUE, local_authority = "Redbridge") # }