Package-level declarations

Entrypoint for the Data Access API: basic access to local FHIR resources, namely, the CRUD operations: create, read, update, and delete.

Types

Link copied to clipboard
data class CacheConfiguration(val cacheDir: File, val maxSize: Long)

Configuration for HTTP caching of network requests.

Link copied to clipboard

How database errors should be handled.

Link copied to clipboard
interface FhirEngine

Provides an interface for managing FHIR resources in local storage.

Link copied to clipboard
data class FhirEngineConfiguration(val enableEncryptionIfSupported: Boolean = false, val databaseErrorStrategy: DatabaseErrorStrategy = UNSPECIFIED, val serverConfiguration: ServerConfiguration? = null, val testMode: Boolean = false, val customSearchParameters: List<SearchParameter>? = null)

Configuration for the FHIR Engine, including database setup, error recovery, server connection, and custom search parameters.

Link copied to clipboard

Provides access to the FhirEngine instance.

Link copied to clipboard
data class LocalChange(val resourceType: String, val resourceId: String, val versionId: String? = null, val timestamp: Instant, val type: LocalChange.Type, val payload: String, var token: LocalChangeToken)

Data class for squashed local changes for resource

Link copied to clipboard
data class LocalChangeToken(val ids: List<Long>)
Link copied to clipboard
data class NetworkConfiguration(val connectionTimeOut: Long = 10, val readTimeOut: Long = 10, val writeTimeOut: Long = 10, val uploadWithGzip: Boolean = false, val httpCache: CacheConfiguration? = null)

Configuration for network connection parameters used when communicating with a remote FHIR server.

Link copied to clipboard
Link copied to clipboard
data class SearchResult<R : Resource>(val resource: R, val included: Map<SearchParamName, List<Resource>>?, val revIncluded: Map<Pair<ResourceType, SearchParamName>, List<Resource>>?)

Represents the result of a FHIR search query, containing a matching resource and any referenced resources as specified in the query.

Link copied to clipboard
data class ServerConfiguration(val baseUrl: String, val networkConfiguration: NetworkConfiguration = NetworkConfiguration(), val authenticator: HttpAuthenticator? = null, val httpLogger: HttpLogger = HttpLogger.NONE)

Configuration for connecting to a remote FHIR server.

Functions

Link copied to clipboard
inline suspend fun <R : Resource> FhirEngine.delete(id: String)

Deletes a FHIR resource of type R with the given id from the local storage.

Link copied to clipboard
inline suspend fun <R : Resource> FhirEngine.get(id: String): R

Retrieves a FHIR resource of type R with the given id from the local storage.

Link copied to clipboard
fun <R : Resource> getResourceClass(resourceType: String): Class<R>
fun <R : Resource> getResourceClass(resourceType: ResourceType): Class<R>

Returns the {@link Class} object for the resource type.

Link copied to clipboard

Returns the FHIR resource type.

Link copied to clipboard
suspend fun <A, B> Iterable<A>.pmap(dispatcher: CoroutineDispatcher, f: suspend (A) -> B): List<B>

Implementation of a parallelized map