View source: R/sample_resources.R
| fhir_get_resource_ids | R Documentation |
Download the resource (aka logical) IDs of all resources matching the FHIR search request build from the resource type and search
parameters specified in resource and parameters. This function does not download the entire resources, but only extracts their IDs
using the _elements parameter of FHIR Search.
fhir_get_resource_ids(
base_url,
resource,
parameters = NULL,
username = NULL,
password = NULL,
token = NULL,
add_headers = NULL,
verbose = 0
)
base_url |
A character vector of length one specifying the base URL of the FHIR server, e.g. |
resource |
A character vector of length one or fhir_resource_type object with the resource type to be searched, e.g. |
parameters |
Optional. Either a length 1 character vector containing properly formatted FHIR search parameters, e.g.
|
username |
A character vector of length one containing the username for basic authentication. |
password |
A character vector of length one containing the password for basic authentication. |
token |
A character vector of length one or object of class httr::Token, for bearer token authentication (e.g. OAuth2). See |
add_headers |
A named character vector of custom headers to add to the HTTP request, e.g. |
verbose |
An integer of length 1 containing the level of verbosity. Defaults to 0. |
For more information on authentication options, please see the help page of fhir_search()
A character vector containing the resource (aka logical) IDs of all requested resources.
fhir_search(), fhir_get_resources_by_ids()
#the try({}, silent = TRUE) statement is only there to catch errors when the server is down
#you can skip it when the server is reachable
try({
fhir_get_resource_ids(
base_url = 'https://vonk.fire.ly/R4',
resource = "Patient",
parameters = "gender=female", verbose=1)
}, silent = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.