getDataPackOrgUnits: Pull list of Org Units approved for use in Data Packs from...

View source: R/getPSNUs.R

getDataPackOrgUnitsR Documentation

Pull list of Org Units approved for use in Data Packs from DATIM based on provided country UIDs.

Description

Queries DATIM to extract tibble of Org Units approved for use in Data Pack target setting.

Usage

getDataPackOrgUnits(
  include_mil = TRUE,
  include_DREAMS = TRUE,
  additional_fields = NULL,
  use_cache = TRUE,
  cop_year = NULL,
  d2_session = dynGet("d2_default_session", inherits = TRUE)
)

Arguments

include_mil

Logical. If TRUE, will also include _Military nodes related to country_uids. Default is TRUE.

include_DREAMS

Logical. If TRUE, will also include DREAMS organisation units.

additional_fields

Character string of any fields to return from DATIM API other than those returned by default.

use_cache

If TRUE, will first check to see if a cached export of Data Pack Org Units already exists. If so, will use this cached version to save time.

cop_year

COP Year to use for tailoring functions. Remember, FY22 targets = COP21.

d2_session

DHIS2 Session id. R6 datimutils object which handles authentication with DATIM.

Value

Tibble of Data Pack Org Units.


pepfar-datim/datapackr documentation built on April 14, 2024, 10:35 p.m.