# PatientsResource

Canonical page: https://docs.ovok.com/java-sdk/reference/patients-resource

```java
public final class PatientsResource
```

Manages Slim patients. Get it from [`SlimResource.patients()`](/java-sdk/reference/slim-resource#patients).

## Methods [#methods]

### thresholds [#thresholds]

```java
public PatientThresholdsResource thresholds()
```

Returns the per-patient threshold routes.

**Returns:** the threshold routes

### list [#list]

```java
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 [#retrieve]

```java
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 [#create]

```java
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 [#update]

```java
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 [#delete]

```java
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 [#everything]

```java
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 [#currentvitals]

```java
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
