Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun allowOnlineCache(): EqFilterConnector<R, Boolean>

Whether to allow or not cached results for online queries. Its value is 'false' by default.

Link copied to clipboard
fun byAssignedUserMode(): EqFilterConnector<R, AssignedUserMode>

Filter by assigned user mode.

IMPORTANT: this filter has effect if DHIS2 version is 2.32 or later. Otherwise, it is ignored.

Link copied to clipboard
fun byAttribute(attributeId: String): EqLikeItemFilterConnector<R>
Link copied to clipboard
fun byDataValue(dataElement: String): EqLikeItemFilterConnector<R>

Filter the tracked entity for those matching this filter. If this method is called several times, conditions are appended with AND connector.

Link copied to clipboard
fun byEnrollmentStatus(): ListFilterConnector<R, EnrollmentStatus>

Filter by enrollment status. It only applies if a program has been specified in .byProgram.

IMPORTANT: this filter accepts a list of status, but only the first one will be used for the online query because the web API does not support querying by multiple status.

Link copied to clipboard
fun byEventDate(): PeriodFilterConnector<R>

Define an event date filter. It only applies if a program has been specified in .byProgram.

Link copied to clipboard
fun byEventStatus(): ListFilterConnector<R, EventStatus>

Filter by event status. It only applies if a program has been specified in .byProgram.

IMPORTANT: this filter requires that eventStartDate .byEventStartDate and eventEndDate .byEventEndDate are defined.

Link copied to clipboard
fun byFilter(attributeId: String): EqLikeItemFilterConnector<R>

Add a "filter" to the query. If this method is called several times, conditions are appended with AND connector.

Link copied to clipboard
fun byFollowUp(): BoolFilterConnector<R>

Filter by follow up status. It only applies if a program has been specified in .byProgram.

Link copied to clipboard
fun byIncidentDate(): PeriodFilterConnector<R>

Define an incident date filter. It only applies if a program has been specified in .byProgram.

Link copied to clipboard
fun byIncludeDeleted(): EqFilterConnector<R, Boolean>

Whether to include or not deleted tracked entity instances.

IMPORTANT: currently this filter only applies to offline instances.

Link copied to clipboard
fun byLastUpdatedDate(): PeriodFilterConnector<R>

Define an lastUpdated date filter.

Link copied to clipboard
fun byOrgUnitMode(): EqFilterConnector<R, OrganisationUnitMode>

Define the organisation unit mode. See OrganisationUnitMode for more details on the modes.

Link copied to clipboard
fun byOrgUnits(): ListFilterConnector<R, String>

Filter by tracked entity instance organisation unit.

Link copied to clipboard
fun byProgram(): EqFilterConnector<R, String>

Filter by enrollment program. Only one program can be specified.

Link copied to clipboard
fun byProgramDate(): PeriodFilterConnector<R>

Define an enrollment date filter. It only applies if a program has been specified in .byProgram.

Link copied to clipboard
fun byProgramStage(): EqFilterConnector<R, String>

Filter by event program stage. Only one program can be specified.

Link copied to clipboard
fun byProgramStageWorkingList(): EqFilterConnector<R, String>

Apply the filters defined in a ProgramStageWorkingList. It will overwrite previous filters in case they overlap. In the same way, they could be overwritten by subsequent filters.

Link copied to clipboard
fun byQuery(): EqLikeItemFilterConnector<R>
Link copied to clipboard
fun byStates(): ListFilterConnector<R, State>

Filter by sync status.

IMPORTANT: using this filter forces offlineOnly mode.

Link copied to clipboard
fun byTrackedEntities(): ListFilterConnector<R, String>

Filter by trackedEntity uid

Link copied to clipboard
fun byTrackedEntityInstanceFilter(): EqFilterConnector<R, String>

Apply the filters defined in a TrackedEntityInstanceFilter. It will overwrite previous filters in case they overlap. In the same way, they could be overwritten by subsequent filters.

Link copied to clipboard
fun byTrackedEntityType(): EqFilterConnector<R, String>

Filter by TrackedEntityType. Only one type can be specified.

Link copied to clipboard
fun excludeUids(): ListFilterConnector<R, String>
Link copied to clipboard

TrackedEntityInstances coming from local database are shown in first place. Once there are no more results, it continues with TrackedEntityInstances coming from the server. This method may speed up the initial load.

Important: Internet connection is required to use this mode.

Link copied to clipboard
fun offlineOnly(): R

Only TrackedEntityInstances coming from local database are shown in the list.

Link copied to clipboard
fun onlineFirst(): R

TrackedEntityInstances coming from the server are shown in first place. Once there are no more results online, it continues with TrackedEntityInstances in local database.

Important: Internet connection is required to use this mode.

Link copied to clipboard
fun onlineOnly(): R

Only TrackedEntityInstances coming from the server are shown in the list.

Important: Internet connection is required to use this mode.

Link copied to clipboard

Order by tracked entity instance attribute value.

Link copied to clipboard

Order by completion date of the most recent event. This order only applies to local results.

Link copied to clipboard

Order by created date. If a program is provided, it takes the created of most recent enrollment. Otherwise it takes the value of the tracked entity instance.

Link copied to clipboard

Order by enrollment date of most recent enrollment. This order only applies to local results.

Link copied to clipboard

Order by enrollment status.

Link copied to clipboard

Order by most recent event. It takes the event date and, if it is null, it fallbacks to due date. This order only applies to local results.

Link copied to clipboard

Order by incident date of most recent enrollment. This order only applies to local results.

Link copied to clipboard

Order by last updated date. If a program is provided, it takes the last updated of most recent enrollment. Otherwise it takes the value of the tracked entity instance.

Link copied to clipboard

Order by organisation unit name of the tracked entity instance.