# QuestionnairesResource

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

```java
public final class QuestionnairesResource
```

Runs FHIR Questionnaire operations. Get it from [`Ovok.questionnaires()`](/java-sdk/reference/ovok#questionnaires).

## Methods [#methods]

### populate [#populate]

```java
public JsonNode populate(String questionnaireId) throws IOException, InterruptedException
```

Prefills a QuestionnaireResponse with no extra parameters (`POST /fhir/Questionnaire/{id}/$populate`).

**Parameters:**

- `questionnaireId`: the Questionnaire ID

**Returns:** the populate result

**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

```java
public JsonNode populate(
        String questionnaireId,
        JsonNode parameters) throws IOException, InterruptedException
```

Prefills a QuestionnaireResponse (`POST /fhir/Questionnaire/{id}/$populate`).

**Parameters:**

- `questionnaireId`: the Questionnaire ID
- `parameters`: a FHIR Parameters resource, or `null` for none

**Returns:** the populate result

**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

```java
public JsonNode populate(
        String questionnaireId,
        JsonNode parameters,
        RequestOptions options) throws IOException, InterruptedException
```

Prefills a QuestionnaireResponse (`POST /fhir/Questionnaire/{id}/$populate`).

**Parameters:**

- `questionnaireId`: the Questionnaire ID
- `parameters`: a FHIR Parameters resource, or `null` for none
- `options`: per-request options, such as the timeout

**Returns:** the populate result

**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
