api_endpoint: Generate an API Endpoint

Description Usage Arguments Details Value

View source: R/API.R

Description

Create an API endpoint to query kits from the analytics.

Usage

1
2
3
4
5
6
7
8
9
api_endpoint(
  baseurl = "https://clone.psi-mis.org/",
  dimension_dx = c("dQTWxMDtAiW", "mOGarPwHuFc", "JKSFbYxvXDn"),
  category = "n5ODfcdD1YQ",
  category_option = "YF8v2OSxWKl",
  dimension_ou = "rP1W74RpNWF",
  dimension_pe = "THIS_MONTH",
  completed_only = "false"
)

Arguments

baseurl

A string, the base URL of a PSI - MIS. Default is PSI - MIS clone server.

dimension_dx

A string or character vector, data elements or indicators uid. The defaults are Oraq (id: mOGarPwHuFc) and Insti (id: dQTWxMDtAiW) kits bought data elements uids.

category

A string, category UID. Default; KE HIVST - Distribution channels (id: n5ODfcdD1YQ)

category_option

A string, the distribution model. Default is hotspot (id: YF8v2OSxWKl)

dimension_ou

A string or character vector, the orgUnit UID. Default is Kenya (id: rP1W74RpNWF).

dimension_pe

A string or character vector, DHIS2 period. The default is THIS_MONTH

completed_only

Logical, whether to pull only the completed events. The default is false.

Details

api_endpoint constructs an API endpoint to query HIV self testing kits from the analytics resource. The default endpoint will query insti and oraq kits distributed via hotpots.

Value

A string, An API endpoint.


psi-mis/hivstr documentation built on Jan. 28, 2021, 7:40 a.m.