OvokClient

Minimal FHIR reader that uses a fixed access token.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.24+fa54770
public final class OvokClient

Minimal FHIR reader that uses a fixed access token. Prefer Ovok for new code.

Constructors

OvokClient

public OvokClient(URI baseUri, String accessToken)

Creates a client with a new HttpClient.

Parameters:

  • baseUri: the Ovok API base URL
  • accessToken: the bearer token sent with every request
public OvokClient(URI baseUri, String accessToken, HttpClient httpClient)

Creates a client that sends requests through the given HttpClient.

Parameters:

  • baseUri: the Ovok API base URL
  • accessToken: the bearer token sent with every request
  • httpClient: the HTTP client to use

Methods

read

public JsonNode read(
        String resourceType,
        String resourceId) throws IOException, InterruptedException

Reads one FHIR resource (GET /fhir/R4/{resourceType}/{resourceId}).

Parameters:

  • resourceType: the FHIR resource type, such as Patient
  • resourceId: the resource ID

Returns: the resource

Throws:

  • OvokApiException: if the API answers with a non-2xx status
  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Last updated on

On this page