View Source Kindling.Client (kindling v1.0.2)

FHIR API client.

Summary

Types

The FHIR access token. Used when :auth_mode is :bearer or :basic. Ignored when :auth_mode is :open.

The base URL of the FHIR server. Often (but not always), includes the FHIR version in the URL path.

A string that is the ID of a FHIR resource.

t()

Configuration of a FHIR client.

Types

@type access_token() :: String.t()

The FHIR access token. Used when :auth_mode is :bearer or :basic. Ignored when :auth_mode is :open.

Link to this type

fhir_server_base_url()

View Source
@type fhir_server_base_url() :: String.t()

The base URL of the FHIR server. Often (but not always), includes the FHIR version in the URL path.

@type resource_id() :: String.t()

A string that is the ID of a FHIR resource.

@type t() :: %{
  base_url: fhir_server_base_url(),
  access_token: access_token(),
  auth_mode: :bearer | :basic | :open
}

Configuration of a FHIR client.

Functions

Link to this function

convert_response(other, resource_module)

View Source
Link to this function

create(client, resource_module, attrs, opts \\ [], req_fn \\ &Kindling.Client.Req.post/2)

View Source
Link to this function

delete(client, resource_module, id, opts \\ [], req_fn \\ &Kindling.Client.Req.delete/2)

View Source
Link to this function

read(client, resource_module, id, opts \\ [], req_fn \\ &Kindling.Client.Req.get/2)

View Source

Make a read REST request against a FHIR API server, for a resource of type resource_module and the id id. Returns a schema struct of the results, or an error.

opts:

  • headers: additional HTTP request headers to send with the request, as a list of {key, value} pairs.
Link to this function

search(client, resource_module, params \\ [], opts \\ [], req_fn \\ &Kindling.Client.Req.get/2)

View Source

Make a search REST request against a FHIR API server, for a resource of type resource_module using the search params params.

Returns a schema struct of the results (usually a FHIR bundle), or an error.

opts:

  • headers: additional HTTP request headers to send with the request, as a list of {key, value} pairs.
Link to this function

update(client, resource_module, id, attrs, opts \\ [], req_fn \\ &Kindling.Client.Req.put/2)

View Source