get_data_sets_by_level: Retrieves Data Set Reporting Rate Metrics

View source: R/get_datasets_by_level.R

get_data_sets_by_levelR Documentation

Retrieves Data Set Reporting Rate Metrics

Description

[Experimental] get_data_sets_by_level() fetches the data set reporting metrics. The metric can be REPORTING_RATE, REPORTING_RATE_ON_TIME, ACTUAL_REPORTS, ACTUAL_REPORTS_ON_TIME, EXPECTED_REPORTS.

Usage

get_data_sets_by_level(
  dataset_ids,
  start_date,
  end_date = NULL,
  level = 1,
  org_ids = NULL,
  ...,
  call = caller_env()
)

Arguments

dataset_ids

Required vector of data sets IDs for which to retrieve data. Required.

start_date

Optional start date to retrieve data. It is required and in the format YYYY-MM-dd.

end_date

Optional ending date for data retrieval (default is the current date).

level

Required desired organisation level of data (default: level 1) .

org_ids

Optional list of organization units IDs to be filtered.

...

Other options that can be passed onto DHIS2 API.

call

The caller environment.

Value

A tibble with detailed information, including:

  • Geographical identifiers (country, subnational, district, facility, depending on level)

  • Reporting period (month, year, fiscal year)

  • The reporting metric can be REPORTING_RATE, REPORTING_RATE_ON_TIME, ACTUAL_REPORTS, ACTUAL_REPORTS_ON_TIME, EXPECTED_REPORTS.

See Also

  • get_organisations_by_level() for getting the organisations units

  • get_data_sets() for retrieving the data sets

Examples


# The MoH 745 Cancer Screening Program Monthly Summary Form
dataset_id = c('WWh5hbCmvND')

# Download data from February 2023 to current date
data <- get_data_sets_by_level(dataset_ids = dataset_id,
                               start_date = '2023-02-01')
data


khisr documentation built on Oct. 7, 2024, 1:11 a.m.