# \donttest{
#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({
#find IDs of Patient resources representing Homer Simpson
ids <- fhir_get_resource_ids(
base_url = 'https://hapi.fhir.org/baseR4',
resource = "Patient",
parameters = "name=Homer&name=Simpson")
#Download all corresponding resources
bundles <- fhir_get_resources_by_ids(
base_url = 'https://hapi.fhir.org/baseR4',
resource = "Patient",
ids = ids)
#have a look at the resources
fhir_crack(
bundles,
fhir_table_description(
resource = "Patient",
cols = list(
ID = "id",
given = "name/given",
family = "name/family")))
}, silent = TRUE)
# }
Run the code above in your browser using DataLab