Ga naar hoofdinhoud

Fill Out Requests

A fill_out_request specifies a list of questionnaires that need to be filled out within a certain timespan. At opened/reminder/expired a callback is made to the callback url.

Create a FillOutRequest

Sample request

POST /api/v1/dossiers/:dossier_id/fill_out_request
Status: 200 OK
{
"id": 1234
}

Parameters

NameTypeDescription
dossier_idstringRequired. Unique identifier for the patient to be subscribed.
fill_out_requesthashRequired. attributes (see below).

fill_out_request attributes:

NameTypeDescription
questionnaire_keysarray of stringRequired. List of questionnaires that need to be filled out.
respondent_typestringDefaults to patient_version.
callback_urlstringURL to call on events (see below).
remindersarray of integerList of offsets in seconds after open_from to make a reminder callback.
open_fromintegerUnix timestamp for when the questionnaires can be filled out. Defaults to Time.now
open_tillintegerUnix timestamp for when the questionnaires expire. Default to never.

Callbacks

For each event the callback url is called with the following params:

nameTypeDescription
dossier_idstringThe dossier the fill out request was created for.
eventstringThe name of the event (opened/reminder/expired)
fill_out_request_idinteger
urlstringurl to fill in all open questionnaires (not just the ones for this fill out request).

The callback url should contain the authentication for the request.