FHIRClient.Authentication
— TypeSupertype of the various authentication types.
Summary
abstract type Authentication <: Any
FHIRClient.BaseURL
— TypeThe base URL for a FHIR server.
The base URL is also called the "Service Root URL"
Summary
struct BaseURL <: Any
Fields
- uri :: URIs.URI
FHIRClient.Client
— TypeA FHIR client.
Summary
struct Client{V <: FHIRVersion, A <: Authentication} <: Any
Fields
- fhir_version :: V
- base_url :: BaseURL
- auth :: A
FHIRClient.FHIRVersion
— TypeSubtypes of FHIRVersion
are singleton structs that correspond to versions of the FHIR specification.
Summary
abstract type FHIRVersion <: Any
FHIRClient.R4
— TypeFHIR version R4.
Summary
abstract type Authentication <: Any
FHIRClient.request
— Methodrequest(
T, client::Client, verb::AbstractString, path::AbstractString;
<keyword arguments>
)
Perform a request with target path
and method verb
(such as "GET"
or "POST"
) for the FHIR client
, and parse the JSON response with JSON3 as an object of type T
.
Arguments
body = nothing
: JSON body of the request.headers::AbstractDict = Dict{String, String}()
: headers of the request.query::Union{AbstractDict, Nothing} = nothing
: query parameters.require_base_url::Symbol = :strict
: to what extent the requested URL has to match the base URL of theclient
. Possible values are::strict
(requested URL has to start with the base URL),:host
(host and scheme of the requested URL and base URL have to be equal),:scheme
(scheme of the requested URL and base URL have to be equal),:no
(requested URL does not have to match the base URL).
verbose::Int = 0
: Verbosity of the logging of the request and response processes. The keyword argument is forwarded toHTTP.request
and can be set to1
or2
for increasingly verbose logging.kwargs...
: remaining keyword arguments that are forwarded toJSON3.read
for parsing the JSON response.
See also request_json
and request_raw
.
FHIRClient.request_json
— Methodrequest_json(
client::Client, verb::AbstractString, path::AbstractString;
<keyword arguments>
)
Perform a request with target path
and method verb
(such as "GET"
or "POST"
) for the FHIR client
, and parse the JSON response with JSON3.
Arguments
body::Union{JSON3.Object, Nothing} = nothing
: JSON body of the request.headers::AbstractDict = Dict{String, String}()
: headers of the request.query::Union{AbstractDict, Nothing} = nothing
: query parameters.require_base_url::Symbol = :strict
: to what extent the requested URL has to match the base URL of theclient
. Possible values are::strict
(requested URL has to start with the base URL),:host
(host and scheme of the requested URL and base URL have to be equal),:scheme
(scheme of the requested URL and base URL have to be equal),:no
(requested URL does not have to match the base URL).
verbose::Int = 0
: Verbosity of the logging of the request and response processes. The keyword argument is forwarded toHTTP.request
and can be set to1
or2
for increasingly verbose logging.
See also request
and request_raw
.
FHIRClient.request_raw
— Methodrequest_raw(
client::Client, verb::AbstractString, path::AbstractString;
<keyword arguments>
)
Perform a request with target path
and method verb
(such as "GET"
or "POST"
) for the FHIR client
, and return the body of the response as String
.
Arguments
body::Union{AbstractString, Nothing} = nothing
: body of the request.headers::AbstractDict = Dict{String, String}()
: headers of the request.query::Union{AbstractDict, Nothing} = nothing
: query parameters.require_base_url::Symbol = :strict
: to what extent the requested URL has to match the base URL of theclient
. Possible values are::strict
(requested URL has to start with the base URL),:host
(host and scheme of the requested URL and base URL have to be equal),:scheme
(scheme of the requested URL and base URL have to be equal),:no
(requested URL does not have to match the base URL).
verbose::Int = 0
: Verbosity of the logging of the request and response processes. The keyword argument is forwarded toHTTP.request
and can be set to1
or2
for increasingly verbose logging.
See also request_json
and request
.