If you would like to include a survey that isn’t already in the Veeva Library or your customer library, you can configure it using the JSON editor in MyVeeva Studio. The JSON editor uses line-by-line error messages to guide you while you design a survey using JSON. See Sample JSON Survey, Schedule, and Notification Templates for Veeva sample templates that you can use as a reference to configure your own surveys using JSON.

Configuring a Survey Using the JSON Editor

To create a new respondent or site survey using the JSON editor, complete the following steps:

  1. Navigate to a collection.
  2. Select Edit.
  3. In the Surveys tab, select Add Surveys.
  4. From the drop-down menu, select Create New Survey.
  5. When the Create New Survey page opens, use the Survey Configuration field to configure your survey using JSON.
  6. You can select the Preview Survey icon (Preview Survey icon) to preview your survey while you create it. See Previewing a Survey for more information.
  7. Populate the following fields to the left of the JSON editor.
    • Display Name: This is the name that respondents see when they receive the survey.
    • Add to Library: Whether the survey will be added to your customer library as a reusable survey. Select Yes or No.
      • Selecting Yes adds the survey to your customer library for future reuse once this collection is approved.
      • Selecting No won't add the survey to your customer library.
    • Reviewed: Select Yes, No, or N/A. See Tracking Reviewed Surveys for more information.
    • Licensed: Select Yes, No, or N/A. See Tracking Licensed Surveys for more information.
    • Respondent: If you are creating an ePRO survey, select Participant or Caregiver, depending on who is responsible for responding to the survey. You can't change the respondent after the collection is approved.
    • Respondent Burden: Select a value for the burden of the survey. The respondent burden is the perceived difficulty of the survey from a respondent perspective. Options include Very Easy, Easy, Moderate, Hard, and Very Hard.
    • Note that when editing the survey, other fields may become available. See the following sections for more information:
  8. Select Save.

MyVeeva Studio JSON Resources

See the following resources for more information on the JSON:

Configuring As-Needed Display Name

As-needed surveys may be completed multiple times throughout a study. The As-Needed Display Name can be configured to indicate a repetitive task such as “Log Exercise” or “Log Food Intake”. You are required to specify an As-Needed Display Name if one or more schedules for this survey has an available type of “asNeeded”. See Configuration Parameters for Schedules for more information.

Configuring Survey Sequence

Survey sequence represents the order in which surveys should be completed. For example, when a respondent receives surveys with the sequence values 1 and 2, they must complete the survey with a sequence value of 1 before the survey with a sequence value of 2. Additionally, the following parameters apply to survey sequence:

  • You can apply the same sequence value to multiple surveys.
  • The sequence value must be greater than 0 and less than or equal to 1000. You can enter up to four decimal places.
  • You can leave the field empty if the survey doesn’t have to be completed in a certain order.
  • Survey sequence is only available when editing a survey with a schedule.
    • Survey sequence is not available if one or more schedules for this survey has an available type of “asNeeded”.

Uploading Images to Surveys

You can upload .JPG, .PNG, or .GIF images to display in a survey. Images you upload are saved to the survey’s image library. Survey images adapt to the size of a respondent’s device. Images can be used in the following contexts:

  • Above license text
  • Above question or instruction heading text
  • Above numeric rating scales
  • As answers to single- or multiple-choice questions

To upload an image, complete the following steps:

  1. When creating or editing a survey, select the Add Image icon (Add Image icon) above the Survey Configuration field.
  2. Drag-and-drop an image or select Browse to select a file from your computer. For optimal display, we recommend that images in these contexts have the following dimensions (in pixels):
    • License Images: At least 90px height
    • Heading Images: At least 600px height
    • Numeric Rating Scale Images: At least 2350px width
    • Answer Images with Answer Text: At least 300px height
    • Answer Images without Answer Text: At least 450px height
  3. Select Upload.
  4. In the Image Library tab, select the Copy URL icon (Copy URL icon) beneath the image. The image’s unique URL is copied to your clipboard, and you can paste it into the survey JSON configuration. For more information on the contexts in which images are displayed, see the following sections:

Configuring Survey Conditions

Conditions show or hide controlled questions based on the response a respondent provides to one or more controlling questions. See Configuring Conditions for more information.

Configuring Scores

Survey scoring is configured within the survey JSON. See Configuring Scores for more information.

Questions of the following types can be used in scoring calculations:

  • Single Choice
  • Multiple Choice (all selected values will be added up)
  • Number Entry (with a single entry)
  • Numeric Rating Scale
  • Visual Analog Scale

Supported HTML Tags

Surveys can support a variety of HTML tags.

Description Example HTML Tags Example Output
Bold
<b>This text is displayed in bold</b>
<strong>This is another way</strong>
This text is displayed in bold
This is another way
Italic
<i>This text is displayed in italics</i>
<em>This is another way</em>
This text is displayed in italics
This is another way
Underlined
<u>This text is displayed as underlined</u>
This text is displayed as underlined
Paragraphs
<p>Paragraph 1</p>
<p>Paragraph 2</p>

Paragraph 1

Paragraph 2

Line Breaks
Line 1<br>Line 2
Line 1
Line 2
Anchor Link
<a href="https://www.veeva.com/">Veeva website</a>

The following table shows where various HTML tags can be used.

Content Type Bold, Italics, Underline Paragraphs, Break Lines Anchor Links
  • License Text
  • Block Headings
Yes Yes Yes
  • Single Choice Answers
  • Multiple Choice Answers
  • Optional Answers
  • VAS Minimum Label
  • VAS Maximum Label
Yes Yes No

Previewing a Survey

You can preview a survey from the respondent’s perspective in the survey preview. To preview a survey, locate the survey you want to preview in the survey library, the Surveys tab, or a survey’s JSON editor and select the Preview Survey icon (Preview Survey icon).

In the survey preview, you can preview a survey in a different language (if translations have been uploaded) by using the Language drop-down menu. From the Preview Size settings you can control the size of the device by selecting a predetermined device size, entering width and height for a custom device size, or by rotating the device with the Rotate icon (Rotate icon).

While completing surveys in the preview, you can reset the survey to its original state by selecting the Reset button at any time. After submission, scores (if they were configured) will appear at the top of the survey as a Site Staff would see them. Selecting the Edit button allows you to change the responses and re-submit the survey, which can be helpful in validating scoring configuration.

Universal Survey Parameters

All surveys that you configure using JSON have universal parameters, which are described below.

Parameter JSON Code Example Description Requiredness
Survey Type "surveyType": "ePRO"
  • Identifies if the survey is an ePRO or eClinRO survey
  • Defaults to "ePRO"
Optional
Language Override "languageOverride" : "Patient"
  • Overrides the default language setting, allowing an eClinRO to use patient languages instead of site languages.
  • eClinRO language is defaulted to Site. ePRO language is defaulted to Patient.
Optional
Name "name": "Pain Survey" The official name of the survey Required
Description "description": "A survey about a patient's Pain while participating in a clinical trial" A description of the survey that is displayed in the survey library in a future release Optional
License Text "licenseText": "©Verteo Biopharma. Pain Survey™ is a trademark of the Verteo Institution of Health."
  • The licensing and copyright information of the survey, if applicable
  • A survey's license text is displayed under the title of the survey once it's started by the respondent.
Optional
The block's license image container "licenseImage": {...} The container for the survey license image URL and image description, if applicable Optional
The block's license image URL "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyLicenseLogo.jpg" The URL of the survey image uploaded by a user Optional
The block's license image description "description": "Pain Survey License Image"
  • A description of the license image that can be read by screen readers for blind and low-vision respondents
  • Defaults to "Survey License" if no description is provided
Optional
Additional Details "additionalDetails": "Licensed and reviewed for use in study FEZZIK-07. All rights reserved."
  • Additional details or licensing information for the survey, if applicable
  • A survey's additional details appear on the ePRO collection document for sponsors and sites.
    • Additional details aren't displayed in the survey itself and never appear for respondents.
Optional
Sections Array "sections": []
  • The container of all sections in a survey.
  • A survey can have one section, which contains the blocks array.
Required
Section Name "name": "Section1" The section must be assigned a name, which is only used by the system and does not display to respondents. Required
Blocks Array "blocks": []
  • The container of all blocks in a section in a survey
  • A survey can have one or multiple blocks in each section.
Required

Universal Survey Block Parameters

All blocks in a survey that you configure using JSON have universal parameters, which are described below.

Parameter JSON Code Example Description Requiredness
Survey block type "type": "singleChoice" Each block in a survey must have a survey block type. See the Available Block Types section below for more information about each type's unique parameters. Required
The survey block's unique name "name": "q1" Each block in a survey must be assigned a unique name. It only needs to be unique within the survey; you can reuse block names across surveys. Required
The survey block's heading image container "headingImage": {...} The container for the survey heading image URL and image description, if applicable Optional
The survey block's heading image URL "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyQ1Text.jpg" The URL of the heading image uploaded to MyVeeva Studio Optional
The survey block's heading image description "description": "Pain Survey Question 1 Image"
  • A description of the heading image that can be read by screen readers for blind and low-vision respondents
  • Defaults to "Instructions" if no description is provided on text blocks
  • Defaults to "Question #" if no description is provided on question blocks
Optional
The block's heading text "heading": "How was your mobility today?" Each block in a survey must have a heading that contains text that the respondent acknowledges or responds to Required
The block's number "questionNumber": "1"
  • Each question block can be given a number that's displayed before the heading in the following format:
    • 1. Heading here.
  • If a question with a number is skipped by a condition, the verbiage Question # not applicable is displayed.
  • This can be optionally left blank to not show a number for a block.
  • If a question without a number is skipped by a condition, no verbiage is displayed.
Optional
The survey block's optional answers container "optionalAnswers": [{...},{...},...]
  • The container for the survey block's optional answers, if applicable. This is only allowed on question block types.
  • Each optional answer is an object in the optionalAnswers container.
  • The number of optional answers an optional answers container can contain is unlimited.
Optional
The survey block's optional answer name "name": "q1-notapplicable" Each optional answer in a survey must be assigned a unique name. It only needs to be unique within the question; you can reuse optional answer names across questions. Optional
The survey block's optional answer text "answer": "This question is not applicable to me." The text of the optional answer that's displayed to respondents Optional
The survey block's optional answer score "score": 0
  • The score this question will receive if this answer is selected.
  • For more information, see Configuring Scores.
Optional
Conditions "condition": "condition1"
  • Any block can be given a condition.
  • If that condition is true, the question is displayed for the respondent.
  • Conditions are configured in the JSON after all sections and blocks have been added. See Configuring Conditions.
  • A condition references a controlling question or other conditions, and is used in the controlled question.
Optional

Available Block Types

In the JSON editor, you can configure 9 question types: visual analog scale (VAS), numeric rating scale (NRS), single-choice/verbal rating scale (VRS), multiple-choice, number entry, text entry, date entry, time entry, and datetime entry. You can also configure a text block (instructional text). See below for more information about each block type.

All required parameters must be included in the JSON. Optional parameters can either be included with a value of null, or not included.

Configuring a Visual Analog Scale (VAS) Question Type

The following parameters apply for visual analog scale (VAS) question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "visualScale" Indicates that a block is a visual analog scale (VAS) question Required
In the "blockSettings" node:
The scale's orientation
  • "orientation": "vertical"
  • "orientation": "horizontal"
Indicates whether you want the scale to be displayed in a horizontal or vertical format Required
The scale's minimum value "minNumber": 0 The lowest number on the visual analog scale that a respondent can select Required
The scale's maximum value "maxNumber": 100 The highest number on the visual analog scale that a respondent can select Required
The scale's minimum label "minLabel": "No Pain"
  • The label that shows below the bottom of the visual analog scale
  • If a minimum label isn't provided, no label is displayed beneath the visual analog scale.
Optional
The scale's maximum label "maxLabel": "The worst pain you can imagine"
  • The label that shows above the top of the visual analog scale
  • If a maximum label isn't provided, no label is displayed above the visual analog scale.
Optional
The scale's number frequency "markNumberInterval": 10
  • How often numbers are displayed to the right of the visual analog scale. For example, the example at left would display a number along the scale at 0, 10, 20, etc.
  • If no markNumberInterval is provided, the scale defaults to only show a number at the minimum and maximum numbers.
Optional
The scale's mark frequency "markDisplayInterval": 5
  • How often marks display to the right of the visual analog scale. For example, the example at left would display marks along the scale at 0, 5, 10, etc.
  • If no markDisplayInterval is provided, the scale defaults to only show a mark at the minimum and maximum numbers
Optional
The display option for the respondent's selection
  • "displayResult": true
  • "displayResult": false
  • Represents whether the numeric value of the respondent's selected position is displayed to the left of the scale.
  • Options:
    • true
    • false
  • If no displayResult not provided, the value defaults to false and no result is shown
Optional

Example Visual Analog Scale (VAS) JSON Configuration

The following JSON snippet illustrates the visualScale question parameters that are described above. The configuration below is not reviewed or licensed for use in collections.

{
  "type": "visualScale",
  "name": "q1",
  "questionNumber": "1",
  "heading": "Please tap on the scale to indicate how your health is TODAY.",
  "blockSettings": {
    "orientation": "vertical",
    "minNumber": 0,
    "maxNumber": 100,
    "minLabel": "The worst health you can imagine",
    "maxLabel": "The best health you can imagine",
    "markDisplayInterval": 10,
    "markNumberInterval": 100,
    "displayResult": false
  }
}

Configuring a Numeric Rating Scale (NRS) Question Type

The following parameters apply for numeric rating scale (NRS) question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "numberScale" Indicates that a block is a numeric rating scale (NRS) question type Required
In the "blockSettings" node:
The scale's minimum value "minNumber": 0 The lowest number on the numeric rating scale that a respondent can select Required
The scale's maximum value "maxNumber": 10 The highest number on the numeric rating scale that a respondent can select Required
The scale's image container "answerImage": {...} The container for the numeric rating scale's image URL and description, if applicable Optional
The scale's image URL "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyQ1ScaleImage.jpg" The URL of the numeric rating scale image uploaded to MyVeeva Studio Optional
The scale's image description "description": "A range of emotional faces with an extremely sad face on the far left and an extremely happy face on the far right"
  • A description of the numeric rating scale image that can be read by screen readers for blind or low-vision respondents
  • Defaults to "Number Scale" if no description is provided
Optional
The scale's labels "customMarks": [
 {
  "positions":[0],
  "label": "No Pain"
 },
 {
  "positions":[10],
  "label": "Extreme Pain"
 }
]
  • The labels that show beneath the number options on the scale.
  • The positions parameter indicates the number on the scale where the label is displayed under. Only 1 number can be in the positions array.
  • Labels can be applied to none, some, or all numbers on the scale.
  • If no customMarks is provided, no label appears below the numeric rating scale.
Optional

Example Numeric Rating Scale (NRS) JSON Configuration

The following JSON snippet illustrates the numberScale question parameters that are described above. The configuration below is not reviewed or licensed for use in collections.

{
  "type": "numberScale",
  "name": "q2",
  "questionNumber": "2",
  "heading": "Please select on the scale how much pain you feel today.",
  "blockSettings": {
    "minNumber": 0,
    "maxNumber": 10,
    "answerImage": {
        "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyQ1ScaleImage.jpg",
        "description": "A range of emotional faces with an extremely sad face on the far left and an extremely happy face on the far right"
    },
    "customMarks": [
      {
        "positions":[0],
        "label": "No Pain"
      },
      {
        "positions":[10],
        "label": "Extreme Pain"
      }
    ]
  }
}

Configuring a Single-Choice/Verbal Rating Scale (VRS) Question Type

The following parameters exist for single-choice/verbal rating scale (VRS) question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "singleChoice" Indicates that a block is a single-choice/verbal rating scale (VRS) question type Required
In the "blockSettings" node:
The height of the block's response options
  • "answerHeight": "variable"
  • "answerHeight": "consistent"
  • The height of the block's individual response options that are displayed to a respondent
  • Options:
    • variable
    • consistent
  • If no answerHeight is provided, the answerHeight defaults to variable.
Optional
The display type of the block's response options
  • "displayAsDropdown": true
  • "displayAsDropdown": false
  • Represents whether the block's response options are displayed in a list or in a drop-down menu
  • If no displayAsDropdown is provided, the display type defaults to false/list format.
  • Options:
    • true
    • false
Optional (cannot be used for questions that include images as answers)
In the "answerSet" node:
The block's answerSet ["answerSet": {...}] The container for the block's answer set Required
Answers "answers": [{...}, {...}, …]
  • The container of individual response options a respondent can select for a given question.
  • Each response option for a given question is an object in the answers container.
  • The number of response options an answers container can contain is unlimited.
Required
Name "name": "1"
  • The unique backend name of an answer option
  • Answer names only need to be unique within the question they're configured for; you can reuse answer names across multiple questions in a survey.
Required
Answer text "answer": "I have severe pain" The text of a response option that's displayed to the respondent Optional (either answer text or an answer image must be provided)
The answer's image container "answerImage": {...} The container for the answer image URL and description, if applicable Optional (either answer text or an answer image must be provided)
The answer's image URL "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg" The URL of the answer image uploaded to MyVeeva Studio Optional (either answer text or an answer image must be provided)
The answer's image description "description": "An emotional face showing extreme pain"
  • A description of the answer image that can be read by screen readers for blind or low-vision respondents
  • Defaults to "Answer #" if no description is provided
Optional

Example Single-Choice/Verbal Rating Scale (VRS) JSON Configuration

The following JSON snippet illustrates the singleChoice question parameters that are described above. The configuration below is not reviewed or licensed for use in collections.

{
  "type": "singleChoice",
  "name": "q3",
  "questionNumber": "3",
  "heading": "How is your pain today?",
  "answerSet": {
    "answers": [
      {
        "name": "1",
        "answer": "",
        "score": 0,
        "answerImage": {
            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",
            "description": "An emotional face showing no pain"
            }
      },
      {
        "name": "2",
        "answer": "",
        "score": 1,
        "answerImage": {
            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA2Image.jpg",
            "description": "An emotional face showing slight pain"
            }
      },
      {
        "name": "3",
        "answer": "",
        "score": 2,
        "answerImage": {
            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA3Image.jpg",
            "description": "An emotional face showing moderate pain"
             }
      },
      {
        "name": "4",
        "answer": "",
        "score": 3,
        "answerImage": {
            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA4Image.jpg",
            "description": "An emotional face showing severe pain"
            }
      },
    ]
  }
}
{
  "type": "singleChoice",
  "name": "q4",
  "questionNumber": "4",
  "heading": "How much physical activity did you perform today?",
  "blockSettings": {
        "answerHeight": "constant",
        "displayAsDropdown": true
},
  "answerSet": {
    "answers": [
      {
        "name": "1",
        "answer": "No physical activity",
        "score": 10
      },
      {
        "name": "2",
        "answer": "Light physical activity",
        "score": 20
      },
      {
        "name": "3",
        "answer": "Moderate physical activity",
        "score": 30
      },
      {
        "name": "4",
        "answer": "A large amount of physical activity",
        "score": 40
      },
    ]
  }
}

Configuring a Multiple-Choice Question Type

The following parameters exist for multiple-choice question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "multipleChoice" Indicates that a block is a multiple-choice question type Required
In the "blockSettings" node:
The height of the block's response options
  • "answerHeight": "variable"
  • "answerHeight": "consistent"
  • The height of the block's individual response options that are displayed to a respondent
  • Options:
    • variable
    • consistent
  • If no answerHeight is provided, the answerHeight defaults to variable.
Optional
The display type of the block's response options
  • "displayAsDropdown": true
  • "displayAsDropdown": false
  • Represents whether the block's response options are displayed in a list or in a drop-down menu
  • If no displayAsDropdown is provided, the display type defaults to false/list format.
  • Options:
    • true
    • false
Optional
In the "answerSet" node:
The block's answerSet ["answerSet": {...}] The container for the block's answer set Required
Answers "answers": [{...}, {...}, …]
  • The container of individual response options a respondent can select for a given question.
  • Each response option for a given question is an object in the answers container.
  • The number of response options an answers container can contain is unlimited.
Required
Name "name": "q1"
  • The unique backend name of an answer option.
  • Answer names only need to be unique within the question they're configured for; you can reuse answer names across multiple questions in a survey.
Required
Answer text "answer": "Walking" The text of a response option that's displayed to a respondent Optional (either answer text or an answer image must be provided)
Score "score": 1 The score this question will receive if this answer is selected Optional
The answer's image container "answerImage": {...} The container for the answer image URL and description, if applicable Optional (either answer text or an answer image must be provided)
The answer's image URL "image": "https://patients.myveeva.com/>assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg" The URL of the answer image uploaded to MyVeeva Studio Optional (either answer text or an answer image must be provided)
The answer's image description "description": "A person walking"
  • A description of the answer image that can be read by screen readers for blind and low-vision respondents
  • Defaults to "Answer #" if no description is provided
Optional

Example Multiple-Choice JSON Configuration

The following JSON snippet illustrates the multipleChoice question parameters that are described above. The configuration below is not reviewed or licensed for use in collections.

{
         "type": "multipleChoice",
         "name": "q1",
         "questionNumber": "1",
         "heading": "Select all the over-the-counter pain medications you took this week.",
         "blockSettings": {
             "answerHeight": "variable"
            "displayAsDropdown": true
         },
         "answerSet": {
             "answers": [
                  {
                      "name": "q1-1",
                    "answer": "Acetaminophen",
                     "score": 8
                  },
                  {
                    "name": "q1-2",
                    "answer": "Naproxen sodium",
                     "score": 8
                  },
                  {
                    "name": "q1-3",
                    "answer": "Aspirin",
                     "score": 5
                  },
                  {
                    "name": "q1-4",
                    "answer": "Ibuprofen",
                     "score": 3
                  }
            ]
      }
},
 
{
       "type": "multipleChoice",
       "name": "q1",
       "questionNumber": "1",
       "heading": "Which physical activities did you perform today?",
       "answerSet": {
               "answers": [
                      {
                          "name": "q1-1",
                           "answer": "",
                           "score": 3,
                          "answerImage": {
                            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",
                            "description": "A person walking"
                                  }
                    },
                    {
                           "name": "q1-2",
                           "answer": "",
                           "score": 3,
                          "answerImage": {
                            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA2Image.jpg",
                            "description": "A person cooking"
                                  }
                    },
                    {
                           "name": "q1-3",
                           "answer": "",
                           "score": 3,
                          "answerImage": {
                            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA3Image.jpg",
                            "description": "A person doing light housekeeping"
                                  }
                    },
                    {
                           "name": "q1-4",
                           "answer": "",
                           "score": 3,
                          "answerImage": {
                            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA4Image.jpg",
                            "description": "A person swimming"
                                  }
                    }
               ]
        }
}

Configuring a Number Entry Question Type

The following parameters apply for number entry question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "numberEntry" Indicate that a block is a number entry question type Required
The block's answerSet ["answerSet": {...}] The container for the block's answer set Required
In the "answerSet" node:
Answers "answers": [{...}, {...}, …]
  • The container of response parameters for the question.
  • answerSet.answers can contain up to 2 answer objects.
Required
Name "name": "water"
  • The unique backend name of an answer option.
  • Answer names only need to be unique within the question they're configured for; you can reuse answer names across multiple questions in a survey.
Required
Label "label": "Cups" The text label of a number entry field that's displayed to respondents Optional (required if there are two answer objects)
Placeholder "placeholder": "Number of Cups"
  • The text placeholder in the number entry field that's displayed to respondents.
  • The placeholder is replaced by the value the respondent enters in the number entry field.
Optional
Minimum Number "minNumber": 0
  • The minimum value that a respondent can enter in the field as a response.
  • Only positive numbers are allowed.
  • An error is displayed to the respondent if they attempt to enter a value lower than the minNumber value.
Required
Maximum Number "maxNumber": 20
  • The maximum value that a respondent can enter in the field as a response.
  • Only positive numbers are allowed.
  • An error is displayed to the respondent if they attempt to enter a value higher than the maxNumber valuee.
Required
Increment "increment": 0.5
  • The increment value that responses must be a multiple of.
  • If respondents should only be able to enter any whole number, enter an increment value of 1.
  • If respondents should be able to enter any number with up to one decimal place, enter an increment value of 0.1.
  • You can configure increments of any positive whole number or decimal value.
Required

Example Number Entry JSON Configuration

The following JSON snippet illustrates the numberEntry question parameters that are described above. The configuration below is not reviewed or licensed for use in a collection.

{
  "type": "numberEntry",
  "name": "q1",
  "heading": "How long did you exercise today?",
  "questionNumber": "1",
  "answerSet": {
    "answers": [
      {
        "name": "hr",
        "label": "Hours",
        "placeholder": "Number of Hours",
        "minNumber": 0,
        "maxNumber": 24,
        "increment": 1
      },
      {
        "name": "min",
        "label": "Minutes",
        "placeholder": "Number of Minutes",
        "minNumber": 0,
        "maxNumber": 59,
        "increment": 1
      }
    ]
  }
}

Configuring a Text Entry Question Type

The following parameters apply for text entry question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "textEntry" Indicates that a block is a text entry question type Required
In the "blockSettings" node:
Label "label": "Prescribed Medications" The text label of a text entry field that's displayed to respondents Optional
Placeholder "placeholder": "Enter all medications that are currently prescribed to you. You may exclude over-the-counter medications such as vitamins."
  • The text placeholder in the text entry field that's displayed to respondents.
  • The placeholder is replaced by the value the respondent enters in the text entry field.
Optional
The entered text's maximum character length "maxLength": 1000 The maximum number of characters that a respondent can enter as a response. The maximum value you can enter is 1,500. Required

Example Text Entry JSON Configuration

The following JSON snippet illustrates the textEntry question parameters that are described above. The configuration below is not reviewed or licensed for use in collections.

{
  "type": "textEntry",
  "heading": "What medications are you currently prescribed?",
  "questionNumber": "1",
  "blockSettings": 
  {
    "label": "Prescribed Medications",
    "placeholder": "Enter all medications that are currently prescribed to you. You may exclude over-the-counter medications such as vitamins.",
    "maxLength": 1000
  }
}

Configuring a Date Entry Question Type

A date entry question asks the respondent to respond by entering a date. To create a date entry question, you must configure a minimum and maximum valid date. You can optionally configure a default date that is displayed to respondents in the response field. Minimum, maximum, and default date parameters can be static or dynamic values.

Dynamic values are calculated from the point in time at which the respondent is responding to the question. For example, if the maximum date is dynamic with an offset of 3 days, the latest date in the future that a respondent can enter as a response is 3 days after the current date. If the respondent is responding on October 1, 2022, the latest date they can enter as a response is October 4, 2022.

Date Entry Question Universal Parameters

The following universal parameters apply for date entry question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "date" Indicates that a block is a date question type Required
The date entry question's blockSettings container "blockSettings":{
  "minValue": {...},
  "maxValue": {...},
  "default": {...}
}
Contains all minimum, maximum, and default value parameters for the date entry question's configuration Required

The following tables describe how to configure the minimum, maximum, and default date parameters for date entry questions. All three parameters that are described below are contained in the blockSettings container that is described above.

Date Entry Question Minimum Value Parameters

Minimum Value Parameter JSON Code Example Description Requiredness
The date's minimum value container "minValue": {...} The container for the date's minimum value parameters that are described below Required
The date's minimum value type
  • "type": "static"
  • "type": "dynamic"
  • The type of the date's minimum value
  • Options:
    • static
    • dynamic
Required
The date's static minimum value "value": "2000-01-01"
  • The minimum date value that a respondent can enter as a response.
  • You must provide a calendar date in YYYY-MM-DD format.
Required if the type is static
The date's dynamic minimum value offset container
  • "offset":{
      "value": -10,
      "unit": "days"
    }
  • "offset": null
  • Represents the amount of time offset from the current date at which the respondent is answering the block.
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • days
    • weeks
    • months
    • years
  • At left, the first example means the date that is 10 days before the current date.
  • At left, the second example means the current date. You can also exclude the parameter entirely.
Optional (only allowed if the type is dynamic)

Date Entry Question Maximum Value Parameters

Maximum Value Parameter JSON Code Example Description Requiredness
The date's maximum value container "maxValue": {...} The container for the date's maximum value parameters that are described below Required
The date's maximum value type
  • "type": "static"
  • "type": "dynamic"
  • The type of the date's maximum value
  • Options:
    • static
    • dynamic
Required
The date's static maximum value "value": "2022-12-02"
  • The maximum date value that a respondent can enter as a response.
  • You must provide a calendar date in YYYY-MM-DD format.
Required if the type is static
The date's dynamic maximum value offset container
  • "offset":{
      "value": 3,
      "unit": "months"
    }
  • "offset": null
  • Represents the amount of time offset from the current date at which the respondent is answering the block
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • days
    • weeks
    • months
    • years
  • At left, the first example means 3 months after the current date.
  • At left, the second example means the current date. You can also exclude the parameter entirely.
Optional (only allowed if the type is static)

Date Entry Question Default Value Parameters

Default Value Parameter JSON Code Example Description Requiredness
The block's default response container
  • "default": {...}
  • "default": null
  • The container for the parameters of the block's default response that is displayed to a respondent.
  • If no default response should display to a respondent, no container is necessary or you can use the value null. If you use null, the default parameters below are irrelevant.
Optional
The block's default response type
  • "type": "static"
  • "type": "dynamic"
  • The type of the block's default response that is displayed to a respondent
  • Options:
    • static
    • dynamic
Required if the default object exists
The block's static default response value "value": "2022-12-02"
  • The value of the block's default response that is displayed to a respondent.
  • You must provide a calendar date in YYYY-MM-DD format.
Required if the type is static
The block's dynamic default response offset container
  • "offset":{
      "value": -1,
      "unit": "months"
    }
  • "offset": null
  • Represents the amount of time offset from the current date at which the respondent is answering the block.
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • days
    • weeks
    • months
    • years
  • At left, the first example means one month before the current date.
  • At left, the second example means the current date.
Optional (only allowed if the type is dynamic)
Example Date JSON Configuration

The following JSON snippet illustrates the date entry question parameters that are described above. The configuration below is not reviewed or licensed for use in collections.

{
          "type": "date",
          "name": "q1",
          "heading": "When was your last injection?",
          "questionNumber": "1",
          "blockSettings": {
            "minValue": {
              "type": "static",
              "value": "2022-01-01"
            },
            "maxValue": {
              "type": "static",
              "value": "2022-12-31"
            },
            "default": null
          }
        },
{
          "type": "date",
          "name": "q2",
          "heading": "When was your last dose of the study drug?",
          "questionNumber": "2",
          "blockSettings": {
            "minValue": {
              "type": "dynamic",
           "offset": {
                "value": -1,
                "unit": "weeks"
              }
 
            },
            "maxValue": {
              "type": "dynamic",
              "value": "null"
            },
            "default": {
              "type": "dynamic",
              "offset": {
                "value": -1,
                "unit": "days"
              }
 
          }
        },

Configuring a Time Entry Question Type

A time entry question asks the respondent to respond by entering a time. You can optionally configure a minimum and maximum valid time. If you don’t configure a minimum or maximum time, the minimum defaults to 00:00 and the maximum defaults to 23:59, meaning all times are allowed. You can optionally configure a default time that is displayed to respondents in the response field. Minimum, maximum, and default time parameters can be static or dynamic values.

Dynamic values are calculated from the point in time at which the respondent is responding to the survey. For example, if the minimum time is dynamic with an offset of -30 minutes, the earliest time in the past that a respondent can enter as a response is 30 minutes before the current time. If the respondent is responding at 11:00, the earliest time they can enter is 10:30.

Time Entry Question Universal Parameters

The following universal parameters apply for time entry question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "time" Indicates that a block is a time question type Required
The time entry question's blockSettings container "blockSettings": {
  "minValue": {...},
  "maxValue": {...},
  "default": {...}
}
Contains all minimum, maximum, and default value parameters for the time entry question's configuration Optional

The following tables describe how to configure the minimum, maximum, and default time parameters for time entry questions. All three parameters that are described below are contained in the blockSettings container that is described above.

Time Entry Question Minimum Value Parameters

Minimum Value Parameter JSON Code Example Description Requiredness
The time's minimum value container "minValue": {...}
  • The container for the time's minimum value parameters that are described below
  • If no minimum value should be available for a respondent to select, you don't need to use a container or you can use the value null, and you can ignore the minimum value parameters below.
Optional
The time's minimum value type
  • "type": "static"
  • "type": "dynamic"
  • The type of the time's minimum value
  • Options:
    • static
    • dynamic
Required if the minValue object exists
The time's static minimum value "value": "00:00"
  • The minimum time value that a respondent can enter as a response.
  • You must provide a time in 24-hour format.
Required if the type is static
The time's dynamic minimum value offset container
  • "offset":{
      "value": -10,
      "unit": "hours"
    }
  • "offset": null
  • Represents the amount of time offset from the current time at which the respondent is answering the block.
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • minutes
    • hours
  • At left, the first example means the time that is 10 hours before the current time.
  • At left, the second example means the current time. You can also exclude the parameter entirely.
Optional (only allowed if the type is dynamic)

Time Entry Question Maximum Value Parameters

Maximum Value Parameters JSON Code Example Description Requiredness
The time's maximum value container "maxValue": {...} The container for the time's maximum value parameters that are described below Optional
The time's maximum value type
  • "type": "static"
  • "type": "dynamic"
  • The type of the time's maximum value
  • Options:
    • static
    • dynamic
Required if the maxValue object exists
The time's static maximum value "value": "23:59"
  • The maximum time value that a respondent can enter as a response.
  • You must provide a time in 24-hour format.
Required if the type is static
The time's dynamic maximum value offset container
  • "offset":{
      "value": 1,
      "unit": "hours"
    }
  • "offset": null
  • Represents the amount of time offset from the current time at which the respondent is answering the block
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • minutes
    • hours
  • At left, the first example means 1 hour after the current time.
  • At left, the second example means the current time. The parameter can also be excluded entirely.
Optional (only allowed if the type is static)

Time Entry Question Default Value Parameters

Default Value Parameters JSON Code Example Description Requiredness
The block's default response container
  • "default": {...}
  • "default": null
  • The container for the parameters of the block's default response that is displayed to a respondent
  • If no default response should display to a respondent, no container is necessary or you can use the value null. If you use null, the default parameters below are irrelevant.
Optional
The block's default response type
  • "type": "static"
  • "type": "dynamic"
  • The type of the block's default response that is displayed to a respondent
  • Options:
    • static
    • dynamic
Required if the default object exists
The block's static default response value "value": "12:00"
  • The value of the block's default response that is displayed to a respondent.
  • You must provide a time in 24-hour format.
Required if the type is static
The block's dynamic default response offset container
  • "offset":{
      "value": -1,
      "unit": "hour"
    }
  • "offset": null
  • Represents the amount of time offset from the current time at which the respondent is answering the block.
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • minutes
    • hours
  • At left, the first example means one hour before the current time.
  • At left, the second example means the current time. You can also exclude the parameter entirely.
Optional (only allowed if the type is dynamic)

Example Time Entry JSON Configuration

The following JSON snippet illustrates the time entry question parameters that are described above. The configuration below is not reviewed or licensed for use in ePRO collections.

        {
          "type": "time",
          "name": "q1",
          "heading": "What time did you wake up today?",
          "questionNumber": "1",
          "blockSettings": {
            "minValue": {
              "type": "static",
              "value": "00:00"
            },
            "maxValue": {
              "type": "static",
              "value": "23:59"
            },
            "default": {
              "type": "static",
              "value": "07:00"
            }
          }
        },
        {
          "type": "time",
          "name": "q2",
          "heading": "What time was your last injection?",
          "questionNumber": "2",
          "blockSettings": {
            "minValue": {
              "type": "dynamic",
              "offset": {
                "value": -24,
                "unit": "hours"
              }
            },
            "maxValue": {
              "type": "dynamic",
              "offset": null
            },
            "default": null
          }
        },

Configuring a Datetime Entry Question Type

A datetime entry question asks the respondent to respond by entering a date and time. To configure a datetime entry question, you must configure a minimum and maximum valid datetime. You can optionally configure a default date, time, or datetime that is displayed to respondents in the response field. Minimum, maximum, and default datetime parameters can be static or dynamic values.

Dynamic values are calculated from the point in time at which the respondent is responding to the survey question. For example, if the minimum datetime is dynamic with an offset of -24 hours, the earliest datetime in the past that a respondent can enter as a response is 24 hours before the current datetime. If the respondent is responding at 11:00 on October 1, 2022, the earliest datetime they can enter is 11:00 on September 30, 2022.

Datetime Entry Question Universal Parameters

The following universal parameters apply for datetime entry question types:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "dateTime" Indicates that a block is a datetime question type Required
The datetime entry question's blockSettings container "blockSettings": {
  "minValue": {...},
  "maxValue": {...},
  "default": {...}
}
Contains all minimum, maximum, and default value parameters for the datetime entry question's configuration Required

The following tables describe how to configure the minimum, maximum, and default datetime parameters for datetime entry questions. All three parameters that are described below are contained in the blockSettings container that is described above

Datetime Entry Question Minimum Value Parameters

Minimum Value Parameter JSON Code Example Description Requiredness
The datetime's minimum value container "minValue": {...} The container for the datetime's minimum value parameters that are described below Required
The datetime's minimum value type
  • "type": "static"
  • "type": "dynamic"
  • The type of the datetime's minimum value
  • Options:
    • static
    • dynamic
Required
The datetime's static minimum value "value": "2000-01-01T00:00"
  • The minimum datetime value that a respondent can enter as a response.
  • You must provide a datetime in YYYY-MM-DDTHH:MM format
Required if the type is static
The datetime's dynamic minimum value offset container
  • "offset":{
      "value": -10,
      "unit": "days"
    }
  • "offset": null
  • Represents the amount of time offset from the current datetime at which the respondent is answering the block.
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • minutes
    • hours
    • days
    • weeks
    • months
    • years
  • At left, the first example means the datetime that is 10 days before the current datetime.
  • At left, the second example means the current datetime. You can also exclude the parameter entirely.
Optional (only allowed if the type is dynamic)

Datetime Entry Question Maximum Value Parameters

Maximum Value Parameter JSON Code Example Description Requiredness
The datetime's maximum value container "maxValue": {...} The container for the datetime's maximum value parameters that are described below Required
The datetime's maximum value type
  • "type": "static"
  • "type": "dynamic"
  • The type of the datetime's maximum value
  • Options:
    • static
    • dynamic
Required
The datetime's static maximum value
  • "value": "2022-12-31T23:59"
  • "value": -1
  • "value": null
  • The maximum datetime value that a respondent can enter as a response.
  • You must provide a datetime in YYYY-MM-DDTHH:MM format.
Required if the type is static
The date's dynamic maximum value offset container
  • "offset":{
      "value": 3,
      "unit": "months"
    }
  • "offset": null
  • Represents the amount of time offset from the current datetime at which the respondent is answering the block.
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • minutes
    • hours
    • days
    • weeks
    • months
    • years
  • At left, the first example means 3 months after the current datetime.
  • At left, the second example means the current datetime. You can also exclude the parameter entirely.
Optional (only allowed if the type is dynamic)

Datetime Entry Question Default Value Parameters

Default Value Parameters JSON Code Example Description Requiredness
The block's default response container
  • "default": {...}
  • "default": null
  • The container for the parameters of the block's default response that is displayed to a respondent
  • If no default response should display to a respondent, no container is necessary or you can use the value null. If you use null, the default parameters below are irrelevant.
Optional
The block's default response type
  • "type": "static"
  • "type": "dynamic"
  • The type of the block's default response that is displayed to a respondent
  • Options:
    • static
    • dynamic
Required if the default object exists
The block's static default response value "value": "2022-12-31T12:00"
  • The value of the block's default response that is displayed to a respondent.
  • You must provide a datetime in YYYY-MM-DDTHH:MM format.
Required if the type is static
The block's dynamic default response offset container
  • "offset":{
      "value": -1,
      "unit": "months"
    }
  • "offset": null
  • Represents the amount of time offset from the current datetime at which the respondent is answering the block.
  • offset.value can be a positive or negative integer.
  • offset.unit can be:
    • minutes
    • hours
    • days
    • weeks
    • months
    • years
  • At left, the first example means one month before the current datetime.
  • At left, the second example means the current datetime. You can also exclude the parameter entirely.
Optional (only allowed if the type is dynamic)

Additional Details

If a date unit is used as the offset unit (days, weeks, months, years), the resulting datetime depends on whether the value is a negative or positive number:

  • If the offset value is negative, the resulting datetime is 00:00 on the day that’s [value] [units] from the datetime at which the respondent is answering the block.
    • Example: The minimum value is dynamic and -1 week. If the respondent is responding at 07:00 on October 20, 2022, the earliest datetime they can enter as a response is 00:00 on October 13, 2022.
  • If the offset value is positive, the resulting datetime is 23:59 on the day that’s [value] [units] from the datetime at which the respondent is answering the block.
    • Example: The maximum value is dynamic and +3 days. If the respondent is responding at 07:00 on October 20, 2022, the latest datetime they can enter as a response is 23:59 on October 23, 2022.
Example Datetime JSON Configuration

The following JSON snippet illustrates the datetime entry question parameters that are described above. The configuration below is not reviewed or licensed for use in collections.

        {
          "type": "dateTime",
          "name": "q1",
          "heading": "When did you last eat a meal?",
          "questionNumber": "1",
          "blockSettings": {
            "minValue": {
              "type": "dynamic",
              "offset": {
                "value": -1,
                "unit": "days"
            },
            "maxValue": {
              "type": "dynamic",
              "offset": null
            },
            "default": {
              "type": "dynamic",
              "offset": null
              }
            }
          }
        },
        {
          "type": "dateTime",
          "name": "q2",
          "condition": "condition3",
          "heading": "When did you last visit your primary care physician?",
          "questionNumber": "2",
          "blockSettings": {
            "minValue": {
              "type": "static",
              "value": "2022-01-01T00:00"
            },
            "maxValue": {
              "type": "dynamic",
              "offset": null
            },
            "default": {
              "type": "dynamic",
              "offset": {
                "value": -1,
                "unit": "months"
            }
          }
        }

Configuring a Text Block

The following parameters exist for text/text blocks:

Parameter JSON Code Example Description Requiredness
The survey block type "type": "text" Indicates that a block is a text block type Required
Heading "heading": "This survey will ask you about your pain TODAY. Select OK to continue."
  • The text that is displayed to a respondent.
  • You can't configure responses to a text block.
Required

Example Text Block JSON Configuration

The following JSON snippet illustrates the text block parameters that are described above. The configuration below is not reviewed or licensed for use in collections.

{
  "type": "text",
  "name": "instruction",
  "heading": "This survey will ask you about your pain TODAY. Select OK to continue.",
}