Analytics

Analytics

new Analytics(version)

Source:

This represents the Analytics Fetcher for processing for making Web API calls

Example
const analytics = Fn.Analytics();
Parameters:
Name Type Default Description
version Number 25

The version of dhis analytics structure to use

Extends

Members

url

Source:
Overrides:

Gets the url for fetching

Methods

get() → {ProgressPromise}

Source:
Inherited From:

Gets the running process started

Returns:
Type
ProgressPromise

getDependecyFetchResults() → {ProgressPromise}

Source:
Inherited From:

Get Dependency results

Returns:
Type
ProgressPromise

getSanitizedAnalyticsMetadata(analyticMetadata, version) → {Object}

Source:

Standardizes the analytics metadata object

Parameters:
Name Type Description
analyticMetadata Object

The analytics metadata object

version Number

The version of dhis analytics structure to use

Returns:
  • Object with the analytics metadata
Type
Object

setData(dx) → {Analytics}

Source:

Sets the data for the fetch

Parameters:
Name Type Description
dx string

The id of the data to get

Returns:
  • Object with the analytics interaction properties
Type
Analytics

setDimension(dim, value) → {Analytics}

Source:

Sets the dimension for the fetching of the analytics

Parameters:
Name Type Description
dim string

Dynamic Dimension identifier

value string

Dynamic dimension options identifiers

Returns:

Object with the analytics interaction properties

Type
Analytics

setOrgUnit(ou) → {Analytics}

Source:

Sets the organisation unit for the fetching of the analytics

Parameters:
Name Type Description
ou string

Organisation unit

Returns:

Object with the analytics interaction properties

Type
Analytics

setParameters(parameters) → {Fetcher}

Source:
Inherited From:

Set paremeters

Parameters:
Name Type Description
parameters Object

The parameters to be passed to the url

Returns:
  • Object of the fetcher
Type
Fetcher

setPeriod(pe) → {Analytics}

Source:

Sets the period for the fetch

Parameters:
Name Type Description
pe string

The id of the period to get data from

Returns:

Object with the analytics interaction properties

Type
Analytics

setSelections(parameters) → {Analytics}

Source:

Sets the data,period and organisation unit from function input parameters object for the fetching of the analytics

Parameters:
Name Type Description
parameters string

Rule parameters

Returns:

Object with the analytics interaction properties

Type
Analytics

standardizeAnalytics(analyticsObject, version) → {AnalyticsResult}

Source:

Standardizes the analytics object

Parameters:
Name Type Default Description
analyticsObject Object

The analytics object

version Number 25

The version of dhis analytics structure to use

Returns:
  • Object with the analytics results
Type
AnalyticsResult