Import data from DHIS2
Arguments
- login
A httr2_response object returned by the
dhis2_login()function- org_unit
A character with the organisation unit ID or name
- program
A character with the program ID or name
Examples
if (FALSE) { # \dontrun{
# login to the DHIS2 instance
dhis2_login <- login(
type = "dhis2",
from = "https://smc.moh.gm/dhis",
user_name = "test",
password = "Gambia@123"
)
program = "E5IUQuHg3Mg"
org_unit = "GcLhRNAFppR"
data <- read_dhis2(
login = dhis2_login,
org_unit = org_unit,
program = program
)
# fetch data from the test DHIS2 instance
dhis2_login <- login(
type = "dhis2",
from = "https://play.im.dhis2.org/stable-2-42-1",
user_name = "admin",
password = "district"
)
org_unit <- "DiszpKrYNg8"
program <- "IpHINAT79UW"
data <- read_dhis2(
login = dhis2_login,
org_unit = org_unit,
program = program
)
} # }