Description Usage Arguments Details Examples
An alternative way to specify a query is by creating a searchParams object
and pass this to the fhirClient's
searchByQuery. The searchParams class has a set of fluent calls to allow you
to easily construct more complex queries.
Based on the official HL7 FHIR .NET API.
1 2 3 4 5 6 7 8 9 10 11 |
A searchParams
object that contains all specified search criteria.
Elements defined at the root level in the Resource.
The search parameters to filter the Resources on. Each given string is a combined key/value pair (separated by '=').
Paths to include in the search.
Name of the parameter to order by.
Direction of the order. Can be asc or desc (ascending and descending).
The number of returned Resources per page.
$new()
Creates a new searchParams object.
$select()
Specify the elements to be returned as part of a Resource.
$where()
Specify on which parameters to filter.
$include()
Specify the paths to include.
$orderBy()
Specify the order to return the results.
$limitTo()
Specify how many Resources should be returned in a single page of a Bundle.
$countOnly()
Specifiy to just return a count of the matching Resources, without returning the actual matches.
$summaryOnly()
Specify to return only those elements marked as "summary" in the base definition of the Resource(s).
$textOnly()
Specify to return only the "text" element, the 'id' element, the 'meta' element, and only top-level mandatory elements.
$dataOnly()
Specify to remove the text element.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# Setting up a fhirClient
client <- fhirClient$new("http://vonk.furore.com")
# Creating a new searchParams object
query <- searchParams$new()
query$select(c("name", "birthDate"))$where("given:exact=Peter")$orderBy("family")
peters <- client$searchByQuery(query, "Patient")
# equivalent:
# client$search("Patient", c("_elements=name,birthDate","given:exact=Peter", "_sort=family"))
while(!is.null(bundle)){
# Do something useful
peters <- client$continue(peters)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.