search

inline suspend fun <R : Resource> FhirEngine.search(init: Search.() -> Unit): List<SearchResult<R>>

Searches the database and returns a list of resources matching the Search specifications.

Example:

fhirEngine.search<Patient> {
filter(Patient.GIVEN, {
value = "Kiran"
modifier = StringFilterModifier.MATCHES_EXACTLY
})
}

Return

A list of SearchResult objects containing the matching resources and any included references.

Parameters

init

The lambda expression used to configure the Search object.


suspend fun FhirEngine.search(xFhirQuery: String): List<SearchResult<Resource>>
suspend fun FhirEngine.search(resourceType: ResourceType, init: Search.() -> Unit): List<SearchResult<Resource>>