fhir_request: fhir_request

View source: R/fhir_url.R

fhir_requestR Documentation

fhir_request

Description

A Wrapper for fhir_url

Usage

fhir_request(url, resource = NULL, parameters = NULL, url_enc = TRUE)

Arguments

url

The same as for fhir_url().

resource

The same as for fhir_url(). Defaults to NULL.

parameters

The same as for fhir_url(). Defaults to NULL.

url_enc

The same as for fhir_url(). Defaults to TRUE.

Value

The same as for fhir_url().

Examples

#provide full FHIR search request
fhir_request(url = "http://hapi.fhir.org/baseR4/Patient?gender=male&_summary=count")

#provide base url and resource type
fhir_request(
   url      = "http://hapi.fhir.org/baseR4",
   resource = "Patient"
 )

#parameters in one string
fhir_request(
   url        = "http://hapi.fhir.org/baseR4",
   resource   = "Patient",
   parameters = "gender=male&_summary=count"
 )

#parameters as a named character
fhir_request(
   url        = "http://hapi.fhir.org/baseR4",
   resource   = "Patient",
   parameters = c("gender" = "male", "_summary" = "count")
 )

#parameters as a named list
fhir_request(
   url        = "http://hapi.fhir.org/baseR4",
   resource   = "Patient",
   parameters = list("gender" = "male", "_summary" = "count")
 )

POLAR-fhiR/fhircrackr documentation built on Dec. 24, 2024, 3:06 a.m.