Validate user-specified organisation unit ID or name.
Source:R/read_dhis2-helpers.R
check_org_unit.Rd
Check whether a given organisation unit identifier or name is valid within a DHIS2 instance. If a valid name is provided, the corresponding organisation unit ID is returned. Otherwise, an informative error message is thrown.
Arguments
- login
A httr2 request object preconfigured for authentication carrying the base url, user name, and password.
- org_unit
A character denoting the name or id of the organisation unit
- org_units
An optional data frame of organisation units as returned by the
get_organisation_units()
function.