RegisterViewModel

class RegisterViewModel @Inject constructor(val registerRepository: RegisterRepository, val configurationRegistry: ConfigurationRegistry, val sharedPreferencesHelper: SharedPreferencesHelper, val resourceDataRulesExecutor: ResourceDataRulesExecutor) : ViewModel

Constructors

Link copied to clipboard
@Inject
constructor(registerRepository: RegisterRepository, configurationRegistry: ConfigurationRegistry, sharedPreferencesHelper: SharedPreferencesHelper, resourceDataRulesExecutor: ResourceDataRulesExecutor)

Properties

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
suspend fun emitSnackBarState(snackBarMessageConfig: SnackBarMessageConfig)
Link copied to clipboard
fun filterRegisterData(searchText: String)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun paginateRegisterData(registerId: String, loadAll: Boolean = false, clearCache: Boolean = false)

This function paginates the register data. An optional clearCache resets the data in the cache (this is necessary after a questionnaire has been submitted to refresh the register with new/updated data).

Link copied to clipboard
fun retrieveRegisterConfiguration(registerId: String, paramMap: Map<String, String>? = emptyMap()): RegisterConfiguration
Link copied to clipboard
fun retrieveRegisterUiState(registerId: String, screenTitle: String, params: Array<ActionParameter>? = emptyArray(), clearCache: Boolean)
Link copied to clipboard
fun updateRegisterFilterState(registerId: String, questionnaireResponse: QuestionnaireResponse)