Search

class Search(val type: ResourceType, var count: Int? = null, var from: Int? = null) : BaseSearch

Constructors

Link copied to clipboard
constructor(type: ResourceType, count: Int? = null, from: Int? = null)

Properties

Link copied to clipboard
open override var count: Int?

Count of the maximum expected search results.

Link copied to clipboard
open override var from: Int?

Index from which the matching search results should be returned.

Link copied to clipboard
open override var operation: Operation

Logical operator between the filters.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun filter(dateParameter: DateClientParam, vararg init: DateParamFilterCriterion.() -> Unit, operation: Operation)
open override fun filter(numberParameter: NumberClientParam, vararg init: NumberParamFilterCriterion.() -> Unit, operation: Operation)
open override fun filter(quantityParameter: QuantityClientParam, vararg init: QuantityParamFilterCriterion.() -> Unit, operation: Operation)
open override fun filter(referenceParameter: ReferenceClientParam, vararg init: ReferenceParamFilterCriterion.() -> Unit, operation: Operation)
open override fun filter(stringParameter: StringClientParam, vararg init: StringParamFilterCriterion.() -> Unit, operation: Operation)
open override fun filter(tokenParameter: TokenClientParam, vararg init: TokenParamFilterCriterion.() -> Unit, operation: Operation)
open override fun filter(uriParam: UriClientParam, vararg init: UriParamFilterCriterion.() -> Unit, operation: Operation)
Link copied to clipboard
fun Search.getQuery(isCount: Boolean = false): SearchQuery
Link copied to clipboard
inline fun <R : Resource> Search.has(referenceParam: ReferenceClientParam, init: BaseSearch.() -> Unit)

Provides limited support for the reverse chaining on https://www.hl7.org/fhir/search.html#has. For example: search all Patient that have Condition - Diabetes. This search uses the subject field in the Condition resource. Code snippet:

fun Search.has(resourceType: ResourceType, referenceParam: ReferenceClientParam, init: BaseSearch.() -> Unit)

Provide limited support for reverse chaining on Search (See this).

Link copied to clipboard
inline fun <R : Resource> Search.include(referenceParam: ReferenceClientParam, init: BaseSearch.() -> Unit = {})

Includes additional resources in the search results that reference that reference the resource on which include is being called. The developers may call include multiple times with different ResourceType to allow search api to return multiple referenced resource types.

fun Search.include(resourceType: ResourceType, referenceParam: ReferenceClientParam, init: BaseSearch.() -> Unit = {})

Includes additional resources in the search results that reference the resource on which include is being called. The developers may call include multiple times with different ResourceType to allow search api to return multiple referenced resource types.

Link copied to clipboard
inline fun <R : Resource> Search.revInclude(referenceParam: ReferenceClientParam, init: BaseSearch.() -> Unit = {})
fun Search.revInclude(resourceType: ResourceType, referenceParam: ReferenceClientParam, init: BaseSearch.() -> Unit = {})

Includes additional resources in the search results that reference the resource on which revInclude is being called. The developers may call revInclude multiple times with different ResourceType to allow search api to return multiple referenced resource types.

Link copied to clipboard
open override fun sort(parameter: DateClientParam, order: Order)
open override fun sort(parameter: NumberClientParam, order: Order)

When sorting is applied on a field with repeated values, defined by the value of the repeated values in the resource.

open override fun sort(parameter: StringClientParam, order: Order)

When sorting is applied on a field with repeated values (e.g. Patient.GIVEN ), the order is defined by the value of the repeated values in the resource (e.g. HumanName.given for Patient).