SharingResource

Shares patient records through invites.

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

Shares patient records through invites. Get it from Ovok.sharing().

Methods

invites

public SharingResource.Invites invites()

Returns the share-invite routes.

Returns: the invite routes

shares

public SharingResource.Shares shares()

Returns the active-share routes.

Returns: the share routes

settings

public SharingResource.Settings settings()

Returns the sharing-settings routes.

Returns: the settings routes

SharingResource.Invites

public static final class Invites

Creates and redeems patient-sharing invites.

Invites.create

public JsonNode create(Object body, RequestOptions options) throws IOException, InterruptedException

Creates a sharing invite (POST /v1/patient-sharing/invites).

Parameters:

  • body: the invite request
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Invites.redeem

public JsonNode redeem(Object body, RequestOptions options) throws IOException, InterruptedException

Redeems a sharing invite (POST /v1/patient-sharing/invites/redeem).

Parameters:

  • body: the redeem request
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

SharingResource.Shares

public static final class Shares

Lists and revokes active shares.

Shares.list

public JsonNode list(RequestOptions options) throws IOException, InterruptedException

Lists active shares (GET /v1/patient-sharing/shares).

Parameters:

  • options: per-request options, such as the timeout

Returns: the shares; missing practitioners, relatedPersons and received groups are empty arrays

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Shares.revoke

public void revoke(
        String consentId,
        RequestOptions options) throws IOException, InterruptedException

Revokes a share (DELETE /v1/patient-sharing/shares/{consentId}).

Parameters:

  • consentId: the Consent ID of the share
  • options: per-request options, such as the timeout

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

SharingResource.Settings

public static final class Settings

Reads and updates the caller's sharing settings.

Settings.retrieve

public JsonNode retrieve(RequestOptions options) throws IOException, InterruptedException

Reads the sharing settings (GET /v1/patient-sharing/settings).

Parameters:

  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Settings.update

public JsonNode update(
        Object settings,
        RequestOptions options) throws IOException, InterruptedException

Replaces the sharing settings (PUT /v1/patient-sharing/settings).

Parameters:

  • settings: the new settings
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • 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