Skip to contents

Retrieves a list of all tags from the CVDPREVENT API that can be used to filter indicators. Tags provide a way to categorise and search for indicators by clinical or reporting groupings (such as "Priority Group", "Pathway Group" or other clinical categories).

Use this function to obtain valid tag IDs for use in functions that support filtering by tag, such as cvd_indicator().

Usage

cvd_indicator_tags()

Value

A tibble with one row per available indicator tag, containing the following colunns:

IndicatorTagID

Integer. Unique identifier for the tag associated with an indicator.

IndicatorTagName

Character. Descriptive label categorising the indicator (e.g., "monitoring", "prevention", "smoking").

If no tags are found, returns a tibble describing the error.

Details

Tags are useful for grouping or filtering indicators in dashboards, reports or scripted analyses. Tag IDs returned by this function can be supplied to functions like cvd_indicator() via the tag_id argument for targeted queries.

Note

This function may take longer than 5 seconds to complete due to API response time.

Examples

if (FALSE) { # \dontrun{
# List the first five indicator tags
cvd_indicator_tags() |>
  dplyr::arrange(IndicatorTagID) |>
  dplyr::slice_head(n = 5)

# Use a tag ID to filter indicators in another query
tags <- cvd_indicator_tags()
tag_id <- tags$IndicatorTagID[1]
cvd_indicator(time_period_id = 17, area_id = 3, tag_id = tag_id)
} # }