We recommend checking the Veeva Library or your customer library to use an existing survey before you configure a new one. If you want to create a survey that isn’t already in a library, you can configure it using the JSON editor in Veeva ePRO Studio. The JSON editor uses line-by-line error messages to guide you in configuring the survey.

See Sample JSON Survey, Schedule, and Notification Templates for Veeva’s 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 survey using the JSON editor, complete the following steps:

  1. Access 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. Add information for the following fields next to the JSON editor.
    • Details
      • Display Label: This text is the label that respondents see when they receive the survey.
      • As-Needed Display Label: This field is only available when you add an as-needed schedule to the survey. As-needed surveys may be completed as many times as needed when they are available. 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 Label if one or more schedules for this survey has an available type of “asNeeded”. See Configuration Parameters for Schedules for more information.
      • Name: This is the reference name that you use when referring to the survey in the other areas of the collection, such as in rules.
    • Access
      • Restrict Data: Select Yes if you want to restrict the data for the survey and prevent site staff and internal users from being able to see the data from this survey, or No if all users should be able to see data from this survey. By default, surveys are not restricted.
      • Respondent: This field is only available if you are creating an ePRO survey, which is defined in the Survey JSON. Select Participant or Caregiver, to indicate who should receive and respond to the survey. You can’t change the respondent after the collection is approved.
      • Sequence: The survey sequence represents the order in which surveys are required to 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. This field is only available when you include schedules that do not include an as-needed schedule to the survey. 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.
    • Additional Information
      • Add to Library: This selection indicates 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.
        • This field is only available when creating a survey. After a survey is created, you cannot change the selection.
      • 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 Burden: Select a value to represent the burden of the survey. The respondent burden is the perceived difficulty of the survey for respondents to complete. Options include Very Easy, Easy, Moderate, Hard, and Very Hard.
  8. Select Save.

Studio JSON Resources

See the following resources for more information on the JSON:

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 [Image Here] 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 context about where images can be displayed, see the following sections:

Configuring Survey Conditions

Conditions show or hide controlled questions based on the response provided 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

You can only use anchor links in license text and block headings, but all other HTML tags can be used in the following locations:

  • License Text
  • Block Headings
  • Single Choice Answers
  • Multiple Choice Answers
  • Optional Answers
  • VAS Minimum Label
  • VAS Maximum Label
Description Example HTML Tags Example Output
Bold
<strong>This text is displayed in bold</strong>
This text is displayed in bold
Italic
<em>This text is displayed in italics</em>
This text is displayed in italics
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>

Configuring Tables

To create a new table in a survey, complete the following steps:

  1. Set the following universal section parameters:
    1. Add a new section, and set the section type to Table.
    2. In the table section, add the tableColumns object. You can configure up to 6 columns in a table.
    3. To keep the table heading on screen while scrolling, add the optional stickyTableHeading parameter.
    4. To set a section-level condition that determines whether a section is displayed, add the condition parameter.
  2. Set the following universal survey block parameters:
    1. Add the position parameter for each block in a table section. This position is specified using a standard spreadsheet-style grid reference, for example, A1 or A1: B2. Blocks can span multiple rows or columns.
    2. To set a block-level condition that determines whether a block is displayed, add the condition parameter. Unlike blocks within serial sections, these are displayed as read-only until the condition is met. When all blocks in a row are conditional and the condition is not met, the row is not displayed at all.
  1. Add any headings that you want the site user to see in text blocks. You can add images in the headings.
  2. Add other blocks to define the contents of the table, and ensure that you include any text elements that you want the user to see, such as labels and placeholders. Also ensure that you also add all other headings for the blocks, because they are displayed in reporting.

Previewing a Survey

To preview a survey from the respondent’s perspective, find the survey you want to preview and select the Preview Survey icon (Preview Survey icon). When editing a survey, the action is only available if all the JSON code is valid.

To preview a survey in a different language (if translations have been uploaded), select the language from the Language drop-down menu.

To see how the survey is displayed on different devices, use the Preview Size menu to select a predetermined device size, enter the width and height for a custom device size, or rotate the preview device with the Rotate icon (Rotate icon) in the Preview Size Settings.

To reset the survey to it’s original state while completing surveys in the preview, select the Reset button at any time. After submitting the survey, you will view a read-only version of the completed survey as a site staff member would see it. Any configured scores are displayed at the top of the survey. Select the Edit button to change the responses and re-submit the survey. Viewing the scores of survey submissions with various responses can help you validate scoring configuration.

Universal Survey Parameters

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

Parameter Data Type Description JSON Code Example Requiredness
Survey Type String, with set options:
  • ePRO
  • eClinRO
  • Identifies whether the survey is an ePRO or eClinRO survey.
  • If no survey type is added, ePRO is selected by default.
"surveyType": "ePRO" Optional
Language Override String, with set options:
  • Patient
  • Site
  • Overrides the default language setting, allowing an eClinRO to use patient languages instead of site languages.
  • If no language override is provided, the following options are seleted by default:
    • eClinRO: Site
    • ePRO: Patient
"languageOverride" : "Patient" Optional
Label String The official label of the survey. This label is displayed in the collection and is not displayed for respondents. "label": "Pain Survey" Required
Description String A description of the survey that provides additional context about the survey in the JSON. The description is not displayed to respondents. "description": "A survey about a patient's Pain while participating in a clinical trial" Optional
License Text String
  • The licensing and copyright information of the survey, if applicable.
  • The license text is displayed in the survey under the title.
"licenseText": "©Verteo Biopharma. Pain Survey™ is a trademark of the Verteo Institution of Health." Optional
License Image URL string
  • The container for the survey license image URL and description, if applicable.
  • Image: the URL of the license image uploaded to Studio.
  • Description: A description of the license image that can be read by screen readers for visually-impaired respondents.
    • Survey License is added by default if no description is provided.
"licenseImage": {
  "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyLicenseLogo.jpg",
  "description": "Pain Survey License Image"
}
Optional
Review Prompt Boolean, with set options:
  • true
  • false
Determines whether a prompt is displayed at the end of the survey instructing the respondent to review their responses before submitting. “reviewPrompt”: true Required
Additional Details String
  • Additional details or licensing information for the survey, if applicable.
  • A survey's additional details are displayed on the ePRO collection document for sponsors and sites.
    • Additional details aren't displayed on the survey itself for respondents.
"additionalDetails": "Licensed and reviewed for use in study FEZZIK-07. All rights reserved." Optional
Sections Array None
  • The container of all sections in a survey.
  • A survey can have one or more sections, which contain the blocks array.
  • Section parameters are defined below.
"sections": [] Required

Universal Section Parameters

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

Parameter Data Type Description JSON Code Example Requiredness
Unique name String The section must be assigned a unique name, which is only used by the system and is not displayed to respondents. "name": “section1” Required
Type String, with set options:
  • serial
  • table
  • Describes the type of section, and whether the section will display questions one by one (serial) or all at once in a grid (table).
  • The table type can only be used if the surveyType is eClinRO.
  • If no type is added, then the section is treated as serial by default.
"type": “serial” Optional
Condition Boolean, with set options:
  • true
  • false
  • If the condition evaluates to true, the section is displayed for the respondent.
  • Refers to one of the conditions in the survey’s conditions array.
  • Condition cannot reference a block that is in the current section or a future section.
  • See Configuring Conditions for more information.
"condition": null Optional
Heading String
  • The heading that is displayed at the top of the section.
  • Max characters: 200.
  • See Supported HTML Tags for information about what formatting is supported.
  • Images cannot be used in section headings.
"heading": “Over the last 7 days have you…” Optional
Sticky Heading Boolean, with set options:
  • true
  • false
  • Determines whether the section heading will stay visible when you scroll down the page.
  • If the parameter is not provided, it is treated as false by default.
"stickyHeading": true Optional
Table Columns Heading:
String

Width:
Floating point number
  • An array of up to 6 columns that are displayed on the table can be added.
  • A heading and width value must be provided for each column.
  • Headings
    • Can have a maximum of 200 characters.
    • See Supported HTML Tags for information about what formatting is supported.
  • Width
    • The sum of the widths across all columns has to be 1.
    • You can use up to 2 decimal places, such as .25.
    • Minimum Width: .15.
"tableColumns": [
  {
    "heading" : "Finger", //A
    "width" : 0.6
  },
  {
    "heading" : "Yes/No/Not Accessible", //B
    "width" : 0.2
  },
]
Required if Type is table
Sticky Table Heading Boolean, with set options:
  • true
  • false
  • Determines whether the table heading will stay visible when you scroll down the page.
  • Can only be used with a type of table.
  • If the parameter is not provided, it is treated as false by default.
"stickyTableHeading": true
  • Optional if Type is table
  • Not allowed when the section type is serial
Blocks Array None The container of all blocks in a section in a survey. "blocks": [] Required

Universal Survey Block Parameters

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

Parameter Data Type Description JSON Code Example Requiredness
Survey block type String, with option of 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. "type": "singleChoice" Required
Unique name String 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. "name": "q1" Required
Heading image Image:
URL string

Description:
String
  • The container for the block heading image URL and image description, if applicable.
  • Image: the URL of the heading image uploaded to Studio.
  • Description: A description of the heading image that can be read by screen readers for visually-impaired respondents.
    • Instructions is added by default if no description is provided and the block is a text block.
    • Question # is added by default if no description is provided and the block is a question block.
"headingImage": {
  "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyQ1Text.jpg",
  "description": "Pain Survey Question 1 Image"
}
Optional
Heading text String
  • Each block in a survey must have a heading that contains text that the respondent acknowledges or responds to.
  • When the block is in a table, the heading will only be displayed for text blocks. All other blocks still require the heading, which is used for reporting.
"heading": "How was your mobility today?" Required
Question number Positive integer
  • Each question block can be given a number that’s displayed before the heading in the following format:
    • 1. Heading here.
  • If a question block with a number is skipped by a condition, the verbiage Question # not applicable is displayed.
  • This parameter can be optionally left blank to not show a number for a block.
    • If a question block without a number is skipped by a condition, no verbiage is displayed.
"questionNumber": "1" Optional
Optional answers container None
  • 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.
  • An optional answers container can contain an unlimited number of optional answers.
  • This parameter is not supported when the block is in a table section.
"optionalAnswers":
[{...},{...},...]
  • Optional
  • Not allowed when the section type is table
An optional answer’s unique name String 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. "name": "q1-notapplicable" Required for an optional answer
An optional answer’s answer text String The text of the optional answer that’s displayed to respondents. "answer": "This question is not applicable to me." Required for an optional answer
An optional answer’s score Positive integer
  • The score this question will receive if this answer is selected.
  • For more information, see Configuring Scores.
"score": 0 Optional for an optional answer
Position String, in the format of a grid reference
  • The row and column you want the block to be in.
  • You position the blocks in the columns and rows using letters to identify the column, and numbers to identify the rows. So the first row is A1, B1, C1, and so on. The second row is A2, B2, C2, and so on.
  • This is displayed after the section heading row.
  • See Configuring Tables for more information.
  • See Appendix A for a JSON Example that shows a table.
"position" : "A1:B2"
  • Required when the section type is table
  • Not allowed when the section type is serial
Condition String
  • If the condition evaluates to true, the block is displayed for the respondent.
  • Refers to a condition that is defined in the survey’s conditions array. See Configuring Conditions for more details.
  • The condition cannot reference a block that is after this block.
  • In a table section:
    • Blocks with conditions will be visible but disabled and empty until the condition is met.
    • If all blocks in a row have conditions that are not met, the entire row is hidden.
"condition": "condition1" Optional

Available Block Types

Blocks belong to one of two categories: text block or question block types. Text blocks are instructional text for the respondent to acknowledge. Question types require the respondent to provide a response. You can configure the following question types:

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 Text Block

The following parameters exist for text blocks:

Parameter Data Type Description JSON Code Example Requiredness
Survey block type String Indicates a block is a text block type. "type": "text" Required
Heading String The text that is displayed to a respondent. "heading": "This survey will ask you about your pain TODAY. Select OK to continue." Required

Example Text Block JSON Configuration

The following JSON snippet illustrates the text block parameters 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."
}

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

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

Parameter Data Type Description JSON Code Example Requiredness
Survey block type String, with set option of singleChoice Indicates a block is a single-choice/verbal rating scale (VRS) question type. "type": "singleChoice" Required
In the "blockSettings" parameter:
The height of the block's response options String, with set options:
  • variable
  • consistent
  • The height of the block’s individual response options that are displayed to a respondent
  • If no answerHeight is provided, the variable string is selected by default.
"answerHeight": "variable" Optional
The display type of the block’s response options Boolean, with set options:
  • true
  • false
  • Represents whether the block’s response options are displayed in a list or in a drop-down menu.
  • If no boolean is set, the false/list format is selected by default.
"displayAsDropdown": true Optional Cannot be used for questions that include images as answers
In the "answerSet" parameter:
Answers None
  • 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.
  • An answers container can contain an unlimited number of optional answers.
  • Each response option (answer) includes the parameters below.
"answers": [{...}, {...}, …] Required
In each “answer” object:
Name String
  • 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.
"name": "1" Required
Answer text String The text of a response option that’s displayed to the respondent. "answer": "I have severe pain" Optional
Either answer text or an answer image must be provided
Answer's image container Image:
URL string

Description:
String
  • The container for the answer image URL and description, if applicable.
  • Image: the URL of the answer image uploaded to Studio.
  • Description: a description of the answer image that can be read by screen readers for visually-impaired respondents.
    • Answer [Number] is displayed by default if no description is provided, and the number is the order in which the answer is displayed.
"answerImage": {
  "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",
  "description": "An emotional face showing extreme pain"
}
Optional
Either answer text or an answer image must be provided
Score Whole number The score this question will receive if this answer is selected. "score": 1 Optional

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

The following JSON snippet illustrates the singleChoice question parameters 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 Data Type Description JSON Code Example Requiredness
The survey block type String, with set option of multipleChoice Indicates a block is a multiple-choice question type. "type": "multipleChoice" Required
In the "blockSettings" node:
The height of the block’s response options String, with set options:
  • variable
  • consistent
  • The height of the block’s individual response options that are displayed to a respondent.
  • If no answerHeight is provided, the variable string is selected by default.
"answerHeight": "variable" Optional
The display type of the block’s response options Boolean, with set options:
  • true
  • false
  • Represents whether the block’s response options are displayed in a list or in a drop-down menu.
  • If no boolean is set, the false/list format is selected by default.
""displayAsDropdown": true Optional
Cannot be used for questions that include images as answers
In the "answerSet" parameter:
Answers None
  • 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.
  • An answers container can contain an unlimited number of optional answers.
  • Each response option (answer) includes the parameters below.
"answers": [{...}, {...}, …] Required
In each “answer” object:
Name String
  • 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.
"name": "1" Required
Answer text String The text of a response option that’s displayed to a respondent. "answer": "Walking" Optional
Either answer text or an answer image must be provided
Answer's image container Image:
URL string

Description:
String
The container for the answer image URL and description, if applicable. "answerImage": {
  "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",
  "description": "An emotional face showing extreme pain"
}
Optional
Either answer text or an answer image must be provided
Score Whole number The score this question will receive if this answer is selected. "score": 1 Optional

Example Multiple-Choice JSON Configuration

The following JSON snippet illustrates the multipleChoice question parameters 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 Numeric Rating Scale (NRS) Question Type

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

Parameter Data Type Description JSON Code Example Requiredness
Survey block type String, with a set value of numberScale Indicates a block is a numeric rating scale (NRS) question type. "type": "numberScale" Required
In the "blockSettings" parameter:
The scale’s minimum value Whole number The lowest number on the numeric rating scale that a respondent can select. "minNumber": 0 Required
The scale’s maximum value Whole number The highest number on the numeric rating scale that a respondent can select. "maxNumber": 10 Required
The scale’s increment Whole number, with a set value of 1
  • The increment value that responses must be a multiple of.
  • Only a value of 1 is allowed.
"increment": 1 Optional
The scale's answer image Image:
URL string

Description:
String
  • The container for the numeric rating scale’s image URL and description, if applicable.
  • The image is displayed above the numeric rating scale.
  • Image: The URL of the numeric rating scale image uploaded to Studio.
  • Description: A description of the numeric rating scale image that can be read by screen readers for visually-impaired respondents.
    • Number Scale is added by default if no description is provided.
"answerImage": {
  "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.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"
}
Optional
The scale’s labels Positions:
Whole number

Label:
String
  • The labels that show beneath the number options on the scale.
  • The positions parameter indicates the number on the scale where the label displays under. Only 1 number can be in the positions array.
  • Labels can be applied to none, some, or all numbers on the scale.
    • The system will automatically size all labels.
    • You can use an empty string """" as a spacer to make other labels wrap to a smaller width.
  • If no customMarks is provided, no labels are displayed below the numeric rating scale.
"customMarks": [
 {
  "positions":[0],
  "label": "No Pain"
 },
 {
  "positions":[10],
  "label": "Extreme Pain"
 }
]
Optional

Example Numeric Rating Scale (NRS) JSON Configuration

The following JSON snippet illustrates the numberScale question parameters. 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,
    "increment": 1,
    "answerImage": {
    	"image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyQ1ScaleImage.jpg",
    	"description": "A range of emotional faces with an extremely happy face on the far left and an extremely sad face on the far right"
    },
    "customMarks": [
      {
        "positions":[0],
        "label": "No Pain"
      },
      {
        "positions":[10],
        "label": "Extreme Pain"
      }
    ]
  }
}

Configuring a Visual Analog Scale (VAS) Question Type

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

Parameter Data Type Description JSON Code Example Requiredness
Survey block type String, with set option of visualScale Indicates a block is a visual analog scale (VAS) question. "type": "visualScale" Required
In the "blockSettings" parameter:
The scale’s orientation String, with set options:
  • vertical
  • horizontal
Indicates whether you want the scale to be displayed in a horizontal or vertical format. "orientation": "vertical" Required
The scale's minimum value Positive integer The lowest number on the visual analog scale that a respondent can select. "minNumber": 0 Required
The scale’s maximum value Positive integer The highest number on the visual analog scale that a respondent can select. "maxNumber": 100 Required
The scale’s increment Whole number, with a set value of 1
  • The increment value that responses must be a multiple of.
  • Only a value of 1 is allowed.
"increment": 1 Optional
The scale’s minimum label String
  • The label that shows the minimum value of the visual analog scale.
  • If a minimum label isn’t provided, no label is displayed.
"minLabel": "No Pain" Optional
The scale’s maximum label String
  • The label that shows the maximum value of the visual analog scale.
  • If a maximum label isn’t provided, no label is displayed.
"maxLabel": "The worst pain you can imagine" Optional
The scale’s number frequency Positive integer
  • How often numbers are displayed along the visual analog scale.
  • In the example, the numbers would be displayed along the scale at 0, 10, 20, etc.
  • If no integer is provided, only the marks at the minimum and maximum numbers are displayed.
"markNumberInterval": 10 Optional
The scale’s mark frequency Positive integer
  • How often marks are displayed to the right of the visual analog scale.
  • In the example, the marks would be displayed along the scale at 0, 5, 10, etc.
  • If no integer is provided, only the marks at the minimum and maximum numbers are displayed.
"markDisplayInterval": 5 Optional
The display option for the respondent’s selection Boolean, with set options:
  • true
  • false
  • Represents whether the numeric value of the respondent’s selected position is displayed.
  • If the boolean is not set, false is selected by default and no result is displayed.
"displayResult": true Optional

Example Visual Analog Scale (VAS) JSON Configuration

The following JSON snippet illustrates the visualScale question parameters 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 Number Entry Question Type

The following parameters apply for number entry question types:

Parameter Data Type Description JSON Code Example Requiredness
Survey block type String, with a set option of numberEntry Indicates a block is a number entry question type. "type": "numberEntry" Required
In the "answerSet" parameter:
Answers None
  • The container of response parameters for the question.
  • The answers parameter can contain up to 2 answer objects representing 2 input fields.
"answers": [{...}, {...}] Required
In each “answer” object:
Name String
  • 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.
"name": "water" Required
Label String The text label of a number entry field that’s displayed to respondents. "label": "Cups" Required if two answer objects are added
Placeholder String
  • 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.
"placeholder": "Number of Cups" Optional
Minimum Number Whole number
  • 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.
"minNumber": 0 Required
Maximum Number Whole number
  • 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 value.
"maxNumber": 20 Required
Increment Number
  • 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.
"increment": 0.5 Required

Example Number Entry JSON Configuration

The following JSON snippet illustrates the numberEntry question parameters 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 Data Type Description JSON Code Example Requiredness
Survey block type String, with a set option of textEntry Indicates a block is a text entry question type. "type": "textEntry" Required
In the "blockSettings" parameter:
Label String The text label of a text entry field that’s displayed to respondents. "label": "Prescribed Medications" Optional
Placeholder String
  • 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.
"placeholder": "Enter all medications that are currently prescribed to you. You may exclude over-the-counter medications such as vitamins." Optional
The entered text’s maximum character length Positive integer
  • The maximum number of characters that a respondent can enter as a response.
  • The maximum value you can enter is 1,500.
"maxLength": 1000 Required

Example Text Entry JSON Configuration

The following JSON snippet illustrates the textEntry question parameters 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 displays 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 Data Type Description JSON Code Example Requiredness
Survey block type String, with a set option of date Indicates a block is a date question type. "type": "date" Required
Date entry question’s blockSettings container None Contains all minimum, maximum, and default value parameters for the date entry question’s configuration. "blockSettings":{
  "minValue": {...},
  "maxValue": {...},
  "default": {...}
}
Required

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

Date Entry Question Minimum Value Parameters

Parameter Data Type Description JSON Code Example Requiredness
Minimum value container None The container for the date's minimum value parameters that are described below. "minValue": {...} Required
Minimum value type String, with set options:
  • static
  • dynamic
The type of the date’s minimum value. "type": "static" Required
Static minimum value String
  • The minimum date value that a respondent can enter as a response.
  • You must provide a calendar date in YYYY-MM-DD format.
"value": "2000-01-01" Required if the type is static
Dynamic minimum value offset container with value and unit Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
  • days
  • weeks
  • months
  • years
  • The time value that a respondent can enter as a response, in relation to the current date at which the respondent is answering the block.
  • The first example means the date that is 10 days before the current date.
  • The second example means the current date. You can also exclude the parameter to use the current date.
  • "offset":{
      "value": -10,
      "unit": "days"
    }
  • "offset": null
Optional
Only allowed if the type is dynamic

Date Entry Question Maximum Value Parameters

Parameter Data Type Description JSON Code Example Requiredness
Maximum value container None The container for the date’s maximum value parameters described below. "maxValue": {...} Required
Maximum value type String, with set options:
  • static
  • dynamic
The type of the date’s maximum value. "type": "static" Required
Static maximum value String
  • The maximum date value that a respondent can enter as a response.
  • You must provide a calendar date in YYYY-MM-DD format.
"value": "2022-12-02" Required if the type is static
Dynamic maximum value offset container with unit and value Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
  • days
  • weeks
  • months
  • years
  • The time value that a respondent can enter as a response, in relation to the current date at which the respondent is answering the block.
  • The first example means the date that is 3 months after the current date.
  • The second example means the current date. You can also exclude the parameter to use the current date.
  • "offset":{
      "value": 3,
      "unit": "months"
    }
  • "offset": null
Optional
Only allowed if the type is static

Date Entry Question Default Value Parameters

Parameter Data Type Description JSON Code Example Requiredness
Default response container None
  • The container for the parameters of the block’s default response that displays 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.
  • "default": {...}
  • "default": null
Optional
Default response type String, with set options:
  • static
  • dynamic
The type of the block’s default response that displays to a respondent. "type": "static" Required if the default object exists
Static default response value String
  • The value of the block’s default response that displays to a respondent.
  • You must provide a calendar date in YYYY-MM-DD format.
"value": "2022-12-02" Required if the type is static
Dynamic default response offset container with value and unit Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
  • days
  • weeks
  • months
  • years
  • The time value that a respondent can enter as a response, in relation to the current date at which the respondent is answering the block.
  • The first example means the date that is one month before the current date.
  • The second example means the current date. You can also exclude the parameter to use the current date.
  • "offset":{
      "value": -1,
      "unit": "months"
    }
  • "offset": null
Optional (only allowed if the type is dynamic)
Example Date JSON Configuration

The following JSON snippet illustrates the date entry question parameters 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, 00:00 is the minimum that is displayed by default,and 23:59 is the maximum that is displayed by default, meaning all times are allowed. You can optionally configure a default time that displays 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 Data Type Description JSON Code Example Requiredness
Survey block type String Indicates a block is a time question type. "type": "time" Required
Time entry question’s blockSettings container None Contains all minimum, maximum, and default value parameters for the time entry question’s configuration. "blockSettings": {
  "minValue": {...},
  "maxValue": {...},
  "default": {...}
}
Optional

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

Time Entry Question Minimum Value Parameters

Parameter Data Type Description JSON Code Example Requiredness
The time's minimum value container None
  • The container for the time’s minimum value parameters described below.
  • If respondents do not need to be able to select a minimum value, you don't need to include this container or you can use the value null, and you can ignore the minimum value parameters below.
"minValue": {...} Optional
Minimum value type String, with set options:
  • static
  • dynamic
  • The time’s minimum value type.
  • You can’t mix static and dynamic minimum and maximum values.
"type": "dynamic" Required if the minValue object exists
Static minimum value String
  • The minimum time value that a respondent can enter as a response.
  • You must provide a time in 24-hour format.
"value": "00:00" Required if the type is static
Dynamic minimum value offset container with value and unit Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
  • minutes
  • hours
  • The time value that a respondent can enter as a response, in relation to the current time at which the respondent is answering the block.
  • The first example means the time that is 10 hours before the current time.
  • The second example means the current time. You can also exclude the parameter to use the current time.
  • "offset":{
      "value": -10,
      "unit": "hours"
    }
  • "offset": null
Optional
Only allowed if the type is dynamic

Time Entry Question Maximum Value Parameters

Parameter Data Type Description JSON Code Example Requiredness
Maximum value container None
  • The container for the time’s maximum value parameters described below.
  • If no maximum value that a respondent should be able to select exists, you don't need to include this container or you can use the value null, and you can ignore the maximum value parameters below.
"maxValue": {...} Optional
Maximum value type String, with set options:
  • static
  • dynamic
  • The type of the time’s maximum value.
  • You can’t mix static and dynamic minimum and maximum values.
"type": "static" Required if the maxValue object exists
Static maximum value String
  • The maximum time value that a respondent can enter as a response.
  • You must provide a time in 24-hour format.
"value": "23:59" Required if the type is static
Dynamic maximum value offset container with value and unit Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
  • minutes
  • hours
  • The maximum time value that a respondent can enter as a response, in relation to the current time at which the respondent is answering the block.
  • The first example means the time that is 1 hour after the current time.
  • The second example means the current time. You can also exclude the parameter to use the current time.
  • "offset":{
      "value": 1,
      "unit": "hours"
    }
  • "offset": null
Optional
Only allowed if the type is static

Time Entry Question Default Value Parameters

Parameter Data Type Description JSON Code Example Requiredness
Default response container None
  • The container for the parameters of the block’s default response that displays 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, you can ignore the default value parameters below.
  • "default": {...}
  • "default": null
Optional
Default response type String, with set options:
  • static
  • dynamic
The type of the block’s default response that displays to a respondent. "type": "dynamic" Required if the default object exists
Static default response value String
  • The value of the block’s default response that displays to a respondent.
  • You must provide a time in 24-hour format.
"value": "12:00" Required if the type is static
Dynamic default response offset container with value and unit Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
  • minutes
  • hours
  • The maximum time value that a respondent can enter as a response, in relation to the current time at which the respondent is answering the block.
  • The first example means the time that is 1 hour before the current time.
  • The second example means the current time. You can also exclude the parameter to use the current time.
  • "offset":{
      "value": -1,
      "unit": "hour"
    }
  • "offset": null
Optional
Only allowed if the type is dynamic

Example Time Entry JSON Configuration

The following JSON snippet illustrates the time entry question parameters described above. The configuration below is not reviewed or licensed for use in 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 displays 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 Data Type Description JSON Code Example Requiredness
Survey block type String, with set option of dateTime Indicates a block is a datetime question type. "type": "dateTime" Required
Datetime entry question’s blockSettings container None Contains all minimum, maximum, and default value parameters for the datetime entry question’s configuration. "blockSettings": {
  "minValue": {...},
  "maxValue": {...},
  "default": {...}
}
Required

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.

Datetime Entry Question Minimum Parameters

Parameter Data Type Description JSON Code Example Requiredness
Minimum value container None The container for the datetime’s minimum value parameters described below. "minValue": {...} Required
Minimum value type String, with set options:
  • static
  • dynamic
The type of the datetime’s minimum value. "type": "static" Required
Static minimum value String
  • The minimum datetime value that a respondent can enter as a response.
  • You must provide a datetime in YYYY-MM-DDTHH:MM format.
"value": "2000-01-01T00:00" Required if the type is static
Dynamic minimum value offset container with value and unit Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
  • minutes
  • hours
  • days
  • weeks
  • months
  • years
  • The minimum datetime value that a respondent can enter as a response, in relation to the current datetime at which the respondent is answering the block.
  • The first example means the datetime that is 10 days before the current datetime.
  • The second example means the current time. You can also exclude the parameter to use the current time.
  • "offset":{
      "value": -10,
      "unit": "days"
    }
  • "offset": null
Optional
Only allowed if the type is dynamic

Datetime Entry Question Maximum Parameters

The following universal parameters apply for datetime entry question types.

Parameter Data Type Description JSON Code Example Requiredness
Maximum value container None The container for the datetime’s maximum value parameters described below. "maxValue": {...} Required
Maximum value type String, with set options:
  • static
  • dynamic
The type of the datetime’s maximum value. "type": "dynamic" Required
Static maximum value String
  • The maximum datetime value that a respondent can enter as a response.
  • You must provide a datetime in YYYY-MM-DDTHH:MM format.
  • "value": "2022-12-31T23:59"
  • "value": -1
  • "value": null
Required if the type is static
Dynamic maximum value offset container with value and unit Value:
Positive or negative integer

Unit:
String, with set options:
  • minutes
  • hours
  • days
  • weeks
  • months
  • years
  • The maximum time value that a respondent can enter as a response, in relation to the current datetime at which the respondent is answering the block.
  • The first example means the datetime that is 3 months after the current datetime.
  • The second example means the current datetime. You can also exclude the parameter to use the current time.
    • "offset":{
        "value": 3,
        "unit": "months"
      }
    • "offset": null
    Optional
    Only allowed if the type is dynamic

    Datetime Entry Question Default Parameters

    The following universal parameters apply for datetime entry question types.

    Parameter Data Type Description JSON Code Example Requiredness
    Default response container None
    • The container for the parameters of the block’s default response that displays 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.
    • "default": {...}
    • "default": null
    Optional
    Default response type String, with set options:
    • static
    • dynamic
    The type of the block’s default response that displays to a respondent. "type": "static" Required if the default object exists
    Static default response value String
    • The value of the block’s default response that displays to a respondent.
    • You can provide a datetime in YYYY-MM-DDTHH:MM format, a date in YYYY-MM-DD format, or a time in 24-hour format.
    "value": "2022-12-31T12:00" Required if the type is static
    Dynamic default response offset container with value and unit Offset: object

    Value:
    Positive or negative integer

    Unit:
    String, with set options:
    • minutes
    • hours
    • days
    • weeks
    • months
    • years
    • The datetime value that a respondent can enter as a response, in relation to the current date at which the respondent is answering the block.
    • The first example means the datetime that is one month before the current datetime.
    • The second example means the current datetime. You can also exclude the parameter to use the current time.
    • "offset":{
        "value": -1,
        "unit": "months"
      }
    • "offset": null
    Optional
    Only allowed if the type is dynamic
    Example Datetime JSON Configuration

    The following JSON snippet illustrates the datetime entry question parameters. 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": {
                    "unit": 1,
                    "value": "months"
                  }
                },
                "default": {
                  "type": "static",
                  "value": "2023-01-01"
              }
            }
    

    Appendix A

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

    The following JSON snippet illustrates the singleChoice question parameters within the context of a table section. The configuration below is not reviewed or licensed for use in collections.

    {
     "surveyType": "eClinRO",
     "name": "Fingers / Toes",
     "description": "Fingers and Toes Survey",
     "licenseText": null,
     "additionalDetails": null,
     "sections": [
       {
           "name": "finger",
           "type" : "table",
           "condition": null,
           "heading" : "Finger",
           "stickyHeading" : false,
           "stickyTableHeading" : false,
           "tableColumns": [
               {
                   "heading" : "Finger", //A
                   "width" : 0.6
               },
               {
                   "heading" : "Yes/No/Not Accessible", //B
                   "width" : 0.2
               },
               {
                   "heading" : "Circumference involved digit (mm)", //C
                   "width" : 0.2
               },
               {
                 "heading" : "Is contralateral assessable?", //D
                 "width" : 0.6
             },
             {
                 "heading" : "Circumference contraleral Digit? (mm)", //E
                 "width" : 0.2
             },
             {
                 "heading" : "Tenderness", //F
                 "width" : 0.2
             }
           ],
           "blocks" : [
               // ROW 1
               {
                   "type": "text",
                   "name": "Right1Finger",
                   "position" : "A1",
                   "condition": null,
                   "heading": "Right 1st finger (thumb)"
               },
               {
                   "type": "singleChoice",
                   "name": "Right1FingerYN",
                   "position" : "B1",
                   "condition": null,
                   "heading": "Right 1st Finger - Yes/No/NotAccessible",
                   "questionNumber": "1a",
                   "answerSet": {
                       "answers": [
                       {
                           "answer": "Yes",
                           "name": "1"
                       },
                       {
                           "answer": "No",
                           "name": "2"
                       },
                       {
                           "answer": "Not Accessible",
                           "name": "3"
                       }
                       ]
                   },
                   "blockSettings": null
               },
               {
                   "type": "numberEntry",
                   "name": "Right1FingerCID",
                   "position" : "C1",
                   "condition": null,
                   "heading": "Right 1st Finger - Circumference involved digit",
                   "questionNumber": "1b",
                   "answerSet": {
                     "answers": [
                       {
                         "name": "1",
                         "label": "mm",
                         "placeholder": "mm",
                         "minNumber": 0,
                         "maxNumber": 100,
                         "increment": 1
                       }
                     ]
                   }
                 },
                 {
                   "type": "singleChoice",
                   "name": "Right1FingerICAYN",
                   "position" : "D1",
                   "condition": null,
                   "heading": "Right 1st Finger - Is contralateral accessible?",
                   "questionNumber": "1c",
                   "answerSet": {
                       "answers": [
                       {
                           "answer": "Yes",
                           "name": "1"
                       },
                       {
                           "answer": "No",
                           "name": "2"
                       }
                       ]
                   },
                   "blockSettings": null
               },
               {
                   "type": "numberEntry",
                   "name": "Right1FingerCCD",
                   "position" : "E1",
                   "condition": null,
                   "heading": "Right 1st Finger - Circumference contralateral digit",
                   "questionNumber": "1d",
                   "answerSet": {
                     "answers": [
                       {
                         "name": "1",
                         "label": "mm",
                         "placeholder": "mm",
                         "minNumber": 0,
                         "maxNumber": 100,
                         "increment": 1
                       }
                     ]
                   }
                 },
                 {
                   "type": "singleChoice",
                   "name": "Right1FingerTYN",
                   "position" : "F1",
                   "condition": null,
                   "heading": "Right 1st Finger - Tenderness",
                   "questionNumber": "1e",
                   "answerSet": {
                       "answers": [
                       {
                           "answer": "Yes",
                           "name": "1"
                       },
                       {
                           "answer": "No",
                           "name": "2"
                       }
                       ]
                   },
                   "blockSettings": null
               },
               //ROW 2
               {
                   "type": "text",
                   "name": "Right2Finger",
                   "position" : "A2",
                   "condition": null,
                   "heading": "Right 2nd finger (index)"
               },
               {
                   "type": "singleChoice",
                   "name": "Right2FingerYN",
                   "position" : "B2",
                   "condition": null,
                   "heading": "Right 2nd Finger - Yes/No/NotAccessible",
                   "questionNumber": "2a",
                   "answerSet": {
                       "answers": [
                       {
                           "answer": "Yes",
                           "name": "1"
                       },
                       {
                           "answer": "No",
                           "name": "2"
                       },
                       {
                           "answer": "Not Accessible",
                           "name": "3"
                       }
                       ]
                   },
                   "blockSettings": null
               },
               {
                   "type": "numberEntry",
                   "name": "Right2FingerCID",
                   "position" : "C2",
                   "condition": null,
                   "heading": "Right 2nd Finger - Circumference involved digit",
                   "questionNumber": "2b",
                   "answerSet": {
                     "answers": [
                       {
                         "name": "1",
                         "label": "mm",
                         "placeholder": "mm",
                         "minNumber": 0,
                         "maxNumber": 100,
                         "increment": 1
                       }
                     ]
                   }
                 },
                 {
                   "type": "singleChoice",
                   "name": "Right2FingerICAYN",
                   "position" : "D2",
                   "condition": null,
                   "heading": "Right 2nd Finger - Is contralateral accessible?",
                   "questionNumber": "2c",
                   "answerSet": {
                       "answers": [
                       {
                           "answer": "Yes",
                           "name": "1"
                       },
                       {
                           "answer": "No",
                           "name": "2"
                       }
                       ]
                   },
                   "blockSettings": null
               },
               {
                   "type": "numberEntry",
                   "name": "Right2FingerCCD",
                   "position" : "E2",
                   "condition": null,
                   "heading": "Right 2nd Finger - Circumference contralateral digit",
                   "questionNumber": "2d",
                   "answerSet": {
                     "answers": [
                       {
                         "name": "1",
                         "label": "mm",
                         "placeholder": "mm",
                         "minNumber": 0,
                         "maxNumber": 100,
                         "increment": 1
                       }
                     ]
                   }
                 },
                 {
                   "type": "singleChoice",
                   "name": "Right2FingerTYN",
                   "position" : "F2",
                   "condition": null,
                   "heading": "Right 2nd Finger - Tenderness",
                   "questionNumber": "2e",
                   "answerSet": {
                       "answers": [
                       {
                           "answer": "Yes",
                           "name": "1"
                       },
                       {
                           "answer": "No",
                           "name": "2"
                       }
                       ]
                   },
                   "blockSettings": null
               }
    //ROW 3
    // ...
           ]
       }
     ],
     "conditions": [],
     "scores": []
    }
    
    1. This question type is not supported when the block is in a table section.  2