Repository

interface Repository

This class provides common functionalities used in the register

Inheritors

Functions

Link copied to clipboard
abstract suspend fun countRegisterData(registerId: String, fhirResourceConfig: FhirResourceConfig? = null, paramsMap: Map<String, String>? = emptyMap()): Long

This function uses the provided registerId to retrieve the register configuration from the registry, then proceeds to count the data based on the configured query parameters

Link copied to clipboard
abstract suspend fun loadProfileData(profileId: String, resourceId: String, fhirResourceConfig: FhirResourceConfig? = null, paramsList: Array<ActionParameter>?): RepositoryResourceData?

This function returns data used on the profile for the given resourceId. Profile configuration is identified by the profileId and contains the queries for filtering the profile data. Data is loaded based on the FhirResourceConfig. When none is provided the configurations identified by the profileId are used.

Link copied to clipboard
abstract suspend fun loadRegisterData(currentPage: Int, registerId: String, fhirResourceConfig: FhirResourceConfig? = null, paramsMap: Map<String, String>? = emptyMap()): List<RepositoryResourceData>

This function loads the desired register configuration using the provided registerId. The data query extracted from the retrieved configuration is used to filter the register data (FHIR resources wrapped in ResourceData