RelationshipService

Functions

Link copied to clipboard

Returns all the relationship types relevant to the given enrollment (program uid). The list includes the side of the Enrollment (FROM or TO). If the Enrollment might be in both sides, the list will include two entries for the same relationship type, one for each side.

Link copied to clipboard

Returns all the relationship types relevant to the given event (program stage uid). The list includes the side of the Event (FROM or TO). If the Event might be in both sides, the list will include two entries for the same relationship type, one for each side.

Link copied to clipboard
abstract fun getRelationshipTypesForTrackedEntities(trackedEntityType: String, programUid: String? = null): List<RelationshipTypeWithEntitySide>

Returns all the relationship types relevant to the given trackedEntityType and program (optional). The list includes the side of the TrackedEntity (FROM or TO). If the TrackedEntity might be in both sides, the list will include two entries for the same relationship type, one for each side.

Link copied to clipboard
abstract fun hasAccessPermission(relationshipType: RelationshipType): Boolean