has
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:
FhirEngine.search<Patient> {
has<Condition>(Condition.SUBJECT) {
filter(Condition.CODE, Coding("http://snomed.info/sct", "44054006", "Diabetes"))
}
}
Content copied to clipboard
fun Search.has(resourceType: ResourceType, referenceParam: ReferenceClientParam, init: BaseSearch.() -> Unit)
Provide limited support for reverse chaining on Search (See this).
Example usage (Search for all Patients with Condition - Diabetes):
fhirEngine.search<Patient> {
has(resourceType = ResourceType.Condition, referenceParam = (Condition.SUBJECT) {
filter(Condition.CODE, Coding("http://snomed.info/sct", "44054006", "Diabetes"))
}
}
Content copied to clipboard