انتقل إلى المحتوى
For the complete DHIS2 documentation index, see llms.txt.

Program Indicators

The following is a comprehensive list of all Program indicator variables available in DHIS2, and notes on whether or not these have been implemented in the Android Capture app.

Any issues around using a particular feature with Android are highlighted with an exclamation mark.

legend description
Component implemented
Component not implemented (rule fails)
Not applicable
Work in progress. Feature not completely implemented yet or with unexpected behaviour already reported.

Common functions to use in a program indicator expression or filter

Function Description Status Notes on implementation
if Evaluates the boolean expression and if true returns the true expression value, if false returns the false expression value. The arguments must follow the rules for any indicator expression.
isNull Returns true if the element value is missing (null), otherwise false.
isNotNull Returns true if the element value is not missing (not null), otherwise false.
firstNonNull Returns the value of the first element that is not missing (not null). Can be provided any number of arguments. Any argument may also be a numeric or string literal, which will be returned if all the previous objects have missing values.
greatest Returns the greatest (highest) value of the expressions given. Can be provided any number of arguments.
least Returns the least (lowest) value of the expressions given. Can be provided any number of arguments.

(d2) Functions to use in a program indicator expression or filter

Function Description Status Notes on implementation
addDays Produces a date based on the first argument date, adding the second argument number of days.
ceil Rounds the input argument up to the nearest whole number.
condition Evaluates the boolean expression and if true returns the true expression value, if false returns the false expression value. The conditional expression must be quoted. The true-expr and false-expr arguments must follow the rules of any program indicator expression (including functions).
count Counts the number of data values that has been collected for the given program stage and data element in the course of the enrollment. The argument data element is supplied with the #{programStage.dataElement} syntax.
countIfCondition Counts the number of data values that matches the given condition criteria for the given program stage and data element in the course of the enrollment. The argument data element is supplied with the #{programStage.dataElement} syntax. The condition is supplied as a expression in single quotes.
countIfValue Counts the number of data values that matches the given literal value for the given program stage and data element in the course of the enrollment. The argument data element is supplied with the #{programStage.dataElement} syntax. The value can be a hard coded text or number.
countIfZeroPos Counts the number of values that is zero or positive entered for the source field in the argument.
daysBetween Produces the number of days between two data elements/attributes of type date.
floor Rounds the input argument down to the nearest whole number.
hasUserRole Returns true if current user has this role otherwise false.
hasValue Returns true if the data element/attribute has a value.
inOrgUnitGroup Evaluates whether the current organisation unit is in the argument group. The argument can be defined with either ID or organisation unit group code.
left Evaluates to the left part of a text, num-chars from the first character.
length Find the length of a string.
minutesBetween Produces the number of minutes between two data elements/attributes of type “date and time”.
modulus Produces the modulus when dividing the first with the second argument.
monthsBetween Produces the number of full months between the first and second argument.
oizp Returns one if the expression is zero or positive, otherwise returns zero.
relationshipCount Produces the number of relationships of the given type that is connected to the enrollment or event. When no type is given, all types are counted.
right Evaluates to the right part of a text, num-chars from the last character.
round Rounds the input argument to the nearest whole number.
split RSplit the text by delimiter, and keep the nth element(0 is the first).
substring Evaluates to the part of a string specified by the start and end character number.
validatePatten Evaluates to true if the input text is an exact match with the supplied regular expression pattern.
weeksBetween Produces the number of full weeks between two data elements/attributes of type date.
yearsBetween Produces the number of years between the first and second argument.
zing Returns zero if the expression is negative, otherwise returns the expression value.
zpvc Returns the number of numeric zero and positive values among the given object arguments.

Variables to use in a program indicator expression or filter

Variable type Description of variable type Status Notes on implementation
Event Date
event_date
The date of when the event took place.
Creation Date*
creation_date
The date of when an event or enrollment was created in the system.
Due Date
due_date
The date of when an event is due.
Sync Date*
sync_date
The date of when the event or enrollment was last synchronized with the Android app.
Incident Date
incident_date
The date of the incidence of the event.
Enrollment Date (not visible on UI)
enrollment_date
The date of when the tracked entity instance was enrolled in the program.
Enrollment Status
enrollment_status
Can be used to include or exclude enrollments in certain statuses.
Current Date
current_date
The current date.
Completed Date The date the event is completed.
Value Count
value_count
The number of non-null values in the expression part of the event.
Zero or positive value count
zero_pos_value_count
The number of numeric positive values in the expression part of the event.
Event Count
event_count
The count of events (useful in combination with filters).
Enrollment Count
enrollment_count
The count of enrollments (useful in combination with filters). Indicators in the Android App are calculated in the domain of one TEI enrollment. Value always 1.
TEI Count
tei_count
The count of tracked entity instances (useful in combination with filters). Indicators in the Android App are calculated in the domain of one TEI enrollment. Value always 1.
Program Stage Name
program_stage_name
Can be used in filters for including only certain program stages in a filter for tracker programs.
Program Stage ID
program_stage_id
Can be used in filters for including only certain program stages in a filter for tracker programs.
Reporting Period Start
reporting_period_start
Can be used in filters or expressions for comparing any date to the first date in each reporting period. Indicators in the Android App are calculated in the domain of one TEI enrollment.
Reporting Period End
reporting_period_end
Can be used in filters or expressions for comparing any date to the last inclusive date in each reporting period. Indicators in the Android App are calculated in the domain of one TEI enrollment.
Organisation Unit Count
organisationunit_count
.

Documentation Reference