API

Index

Docs

FHIRClient.BaseURLType

The base URL for a FHIR server.

The base URL is also called the "Service Root URL"

Summary

struct BaseURL <: Any

Fields

  • uri :: URIs.URI
source
FHIRClient.ClientType

A FHIR client.

Summary

struct Client{V <: FHIRVersion, A <: Authentication} <: Any

Fields

  • fhir_version :: V
  • base_url :: BaseURL
  • auth :: A
source
FHIRClient.FHIRVersionType

Subtypes of FHIRVersion are singleton structs that correspond to versions of the FHIR specification.

Summary

abstract type FHIRVersion <: Any

source
FHIRClient.requestMethod
request(
    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 the client. 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 to HTTP.request and can be set to 1 or 2 for increasingly verbose logging.

  • kwargs...: remaining keyword arguments that are forwarded to JSON3.read for parsing the JSON response.

See also request_json.

source
FHIRClient.request_jsonMethod
request_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 the client. 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 to HTTP.request and can be set to 1 or 2 for increasingly verbose logging.

See also request.

source