fhir_body-methods: Create fhir_body object

fhir_bodyR Documentation

Create fhir_body object

Description

Create fhir_body object

Usage

fhir_body(content, type)

## S4 method for signature 'list,missing'
fhir_body(content)

## S4 method for signature 'list,character'
fhir_body(content, type)

## S4 method for signature 'character,character'
fhir_body(content, type)

Arguments

content

A character vector of length one representing the body for the post in the format specified in type. If you provide a named list here, it will be taken as key value pairs of FHIR search parameters and will be concatenated appropriately. In this case the type will automatically be set to "application/x-www-form-urlencoded". See examples.

type

A string defining the type of the body e.g. "application/x-www-form-urlencoded" or "xml".

Value

An object of type fhir_body.

Examples

#body that could be used in a FHIR search request POSTed to an URL like baseurl/Patient/_search
fhir_body(content = "gender=female&_summary=count", type="application/x-www-form-urlencoded")
fhir_body(content = list("gender" = "female", "_summary" = "count"))

fhircrackr documentation built on Feb. 16, 2023, 8:33 p.m.