# MedicalNotificationsResource

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

```java
public final class MedicalNotificationsResource
```

Reads and acknowledges medical notification episodes. Get it from [`NotificationsResource.medical()`](/java-sdk/reference/notifications-resource#medical).

## Methods [#methods]

### list [#list]

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

Lists medical notification episodes (`GET /v1/slim/notifications/medical`).

**Parameters:**

- `query`: query parameters; `codes` must be a list of 1 to 32 LOINC codes or `PI`
- `options`: per-request options, such as the timeout

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

**Throws:**

- [`OvokValidationException`](/java-sdk/reference/ovok-validation-exception): if `codes` is invalid
- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### recent [#recent]

```java
public JsonNode recent(
        Map<String, ?> query,
        RequestOptions options) throws IOException, InterruptedException
```

Lists recent medical notifications (`GET /v1/slim/notifications/recent/medical`).

**Parameters:**

- `query`: query parameters; `null` values are skipped
- `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

### retrieve [#retrieve]

```java
public JsonNode retrieve(
        String episodeId,
        RequestOptions options) throws IOException, InterruptedException
```

Gets one medical episode (`GET /v1/slim/notifications/medical/{episodeId}`).

**Parameters:**

- `episodeId`: the episode 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

### acknowledge [#acknowledge]

```java
public JsonNode acknowledge(
        String episodeId,
        RequestOptions options) throws IOException, InterruptedException
```

Acknowledges a medical episode (`POST /v1/slim/notifications/medical/{episodeId}/ack`).

**Parameters:**

- `episodeId`: the episode 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
