Skip to contents

Get all data elements from a specific DHIS2 instance

Usage

get_data_elements(login)

Arguments

login

A httr2_response object returned by the dhis2_login() function

Value

A data frame with the following two columns: the data elements IDs and their corresponding names.

Examples

# establish the connection to the system
dhis2_login <- login(
  type = "dhis2",
  from = "https://smc.moh.gm/dhis",
  user_name = "test",
  password = "Gambia@123"
)
#>  Logged in successfully!

# retrieve the data elements
data_elements <- get_data_elements(login = dhis2_login)