Skip to contents

Returns a list of all areas which have data in the selected time period, but do not have any parent areas assigned, and therefore are unreachable.

Usage

cvd_area_unassigned(time_period_id = 1, system_level_id)

Arguments

time_period_id

integer - time period for which Area must have data for (compulsory)

system_level_id

integer - system level of areas in the unassigned list (optional)

Value

Tibble of details for areas without parent details

Details

CVD Prevent API documentation: Areas unassigned

Examples

# Report four GP practices (ID = 5) without parent PCN details:
cvd_area_unassigned(time_period_id = 17, system_level_id = 5) |>
  dplyr::slice_head(n = 4) |>
  dplyr::select(SystemLevelName, AreaID, AreaName)
#> # A tibble: 4 × 3
#>   SystemLevelName AreaID AreaName                              
#>   <chr>            <int> <chr>                                 
#> 1 Practice          4877 27@Northgate                          
#> 2 Practice          2569 Beauchief Medical Practice            
#> 3 Practice          2040 Bramley Village Health & Wellbeing Ctr
#> 4 Practice          5680 Central Clinic                        

# England, as the highest system_level (ID = 1) does not have parent details
cvd_area_unassigned(time_period_id = 17, system_level_id = 1) |>
  dplyr::select(SystemLevelName, AreaID, AreaName)
#> # A tibble: 1 × 3
#>   SystemLevelName AreaID AreaName
#>   <chr>            <int> <chr>   
#> 1 England              1 England