PatientsResource

Manages Slim patients.

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

Manages Slim patients. Get it from SlimResource.patients().

Methods

thresholds

public PatientThresholdsResource thresholds()

Returns the per-patient threshold routes.

Returns: the threshold routes

list

public Page<JsonNode> list(
        Map<String, ?> query,
        RequestOptions options) throws IOException, InterruptedException

Lists patients (GET /v1/slim/patient).

Parameters:

  • query: query parameters, sent as given
  • options: per-request options, such as the timeout

Returns: the first page; iterating it loads the next pages

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

retrieve

public JsonNode retrieve(
        String patientId,
        RequestOptions options) throws IOException, InterruptedException

Reads one patient (GET /v1/slim/patient/{patientId}).

Parameters:

  • patientId: the patient ID
  • 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

create

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

Creates a patient (POST /v1/slim/patient).

Parameters:

  • body: the patient to create
  • 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

update

public JsonNode update(
        String patientId,
        Object body,
        RequestOptions options) throws IOException, InterruptedException

Replaces a patient (PUT /v1/slim/patient/{patientId}).

Parameters:

  • patientId: the patient ID
  • body: the updated patient
  • 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

delete

public void delete(
        String patientId,
        RequestOptions options) throws IOException, InterruptedException

Deletes a patient (DELETE /v1/slim/patient/{patientId}).

Parameters:

  • patientId: the patient ID
  • 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

everything

public JsonNode everything(
        String patientId,
        RequestOptions options) throws IOException, InterruptedException

Reads a patient with everything linked to it (GET /v1/slim/patient/{patientId}/$everything).

Parameters:

  • patientId: the patient ID
  • 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

currentVitals

public JsonNode currentVitals(
        String patientId,
        RequestOptions options) throws IOException, InterruptedException

Reads a patient's current vitals (GET /v1/slim/patient/{patientId}/current-vitals).

Parameters:

  • patientId: the patient ID
  • 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