QuestionnaireResponsesResource

Submits QuestionnaireResponses and extracts data from them.

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

Submits QuestionnaireResponses and extracts data from them. Get it from Ovok.questionnaireResponses().

Methods

submit

public JsonNode submit(JsonNode response) throws IOException, InterruptedException

Creates a QuestionnaireResponse in a FHIR transaction.

Parameters:

  • response: the QuestionnaireResponse to create

Returns: the transaction response

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
public JsonNode submit(
        JsonNode response,
        RequestOptions options) throws IOException, InterruptedException

Creates a QuestionnaireResponse in a FHIR transaction.

Parameters:

  • response: the QuestionnaireResponse to create
  • options: per-request options, such as the timeout

Returns: the transaction response

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

submitWithObservations

public JsonNode submitWithObservations(
        JsonNode response,
        List<JsonNode> observations) throws IOException, InterruptedException

Creates a QuestionnaireResponse and Observations in one FHIR transaction.

Parameters:

  • response: the QuestionnaireResponse to create
  • observations: Observations to create in the same transaction

Returns: the transaction response

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
public JsonNode submitWithObservations(
        JsonNode response,
        List<JsonNode> observations,
        RequestOptions options) throws IOException, InterruptedException

Creates a QuestionnaireResponse and Observations in one FHIR transaction.

Parameters:

  • response: the QuestionnaireResponse to create
  • observations: Observations to create in the same transaction
  • options: per-request options, such as the timeout

Returns: the transaction response

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

extract

public JsonNode extract(String questionnaireResponseId) throws IOException, InterruptedException

Extracts resources from a QuestionnaireResponse (POST /fhir/QuestionnaireResponse/{id}/$extract).

Parameters:

  • questionnaireResponseId: the QuestionnaireResponse ID

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
public JsonNode extract(
        String questionnaireResponseId,
        RequestOptions options) throws IOException, InterruptedException

Extracts resources from a QuestionnaireResponse (POST /fhir/QuestionnaireResponse/{id}/$extract).

Parameters:

  • questionnaireResponseId: the QuestionnaireResponse 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