Aller au contenu
For the complete DHIS2 documentation index, see llms.txt.

Program indicator engine

The SDK includes its own Program Indicator engine for the evaluation of in-line Program Indicators. These kind of indicators are evaluated within the context of an enrollment or an event (single or tracker) and they are usually placed in the data entry form offering additional information to the data encoder. This means that, even though they are regular Program Indicators and can be calculated across enrollments, they have provide useful information within a single enrollment.

A good example, "Average time between visits".

A bad example, "Number of active TEIs": it would always be 1.

In order to trigger the Program Indicator Engine, just execute:

d2.programModule()
    .programIndicatorEngine()
    .getEnrollmentProgramIndicatorValue(<enrollment-uid>, <program-indicator-uid>);

d2.programModule()
    .programIndicatorEngine()
    .getEventProgramIndicatorValue(<event-uid>, <program-indicator-uid>);

If the evaluation of the "filter" component returns false, the result is null.

Compatibility
Type Les éléments Web Android SDK
Mathématiques : Parenthèse Oui Oui
Plus (+) Oui Oui
Moins (-) Oui Oui
Puissance (^) Oui Oui
Multiplier (*) Oui Oui
Diviser (/) Oui Oui
Pourcentage (%) Oui Oui
Logique : NON Oui Oui
! Oui Oui
AND Oui Oui
&& Oui Oui
OU Oui Oui
|| Oui Oui
Comparaison : Égal (==) Oui Oui
Pas égal (!=) Oui Oui
GT (>) Oui Oui
Inférieur à (<) Oui Oui
Supérieur ou égal à (>=) Oui Oui
Inférieur ou égal à (<=) Oui Oui
Fonctions : FirstNonNull Oui Oui
Greatest Oui Oui
If Oui Oui
IsNotNull Oui Oui
IsNull Oui Oui
Least Oui Oui
Log Oui Oui
Log10 Oui Oui
PeriodOffset - Non
Fonctions D2: D2AddDays Oui Oui
D2Ceil Oui Oui
D2Concatenate Oui Oui
D2Condition Oui Oui
D2Count Oui Oui
D2CountIfCondition Oui Oui
D2CountIfValue Oui Oui
D2DaysBetween Oui Oui
D2Floor Oui Oui
D2HasValue Oui Oui
D2Left Oui Oui
D2Length Oui Oui
D2MaxValue Non Oui
D2MinutesBetween Oui Oui
D2MinValue Non Oui
D2Modulus Oui Oui
D2MonthsBetween Oui Oui
D2Oizp Oui Oui
D2RelationshipCount Oui Oui
D2Right Oui Oui
D2Round Oui Oui
D2Split Oui Oui
D2Substring Oui Oui
D2ValidatePattern Oui Oui
D2WeeksBetween Oui Oui
D2YearsBetween Oui Oui
D2Zing Oui Oui
D2Zpvc Oui Oui
D2LastEventDate Oui Non
D2AddControlDigits Oui Non
D2CheckControlDigits Oui Non
D2ZScoreWFA Oui Non
D2ZScoreWFH Oui Non
D2ZScoreHFA Oui Non
D2InOrgUnitGroup Oui Non
D2HasUserRole Oui Non
Variables : AnalyticsPeriodEnd Non Non
AnalyticsPeriodStart Non Non
CreationDate Non Oui
CurrentDate Oui Oui
CompletedDate Non Oui
DueDate Oui Oui
EnrollmentCount Oui Oui
EnrollmentDate Oui Oui
EnrollmentStatus Non Oui
EventStatus Oui Oui
EventCount Oui Oui
ExecutionDate Oui Oui
EventDate Oui Oui
IncidentDate Oui Oui
OrgunitCount Non Non
ProgramStageId Oui Oui
ProgramStageName Oui Oui
SyncDate Non Non
TeiCount Oui Oui
ValueCount Oui Oui
ZeroPosValueCount Oui Oui
Autre : Constante Oui Oui
ProgramStageElement Oui Oui
Attribut de programme Oui Oui
PS_EVENTDATE Oui Oui