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:
- Access a collection.
- Select Edit.
- In the Surveys tab, select Add Surveys.
- From the drop-down menu, select Create New Survey.
- When the Create New Survey page opens, use the Survey Configuration field to configure your survey using JSON.
- You can select the Preview Survey icon () to preview your survey while you create it. See Previewing a Survey for more information.
- 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.
- Add to Library: This selection indicates whether the survey will be added to your customer library as a reusable survey. Select Yes or No.
- Details
- Select Save.
Studio JSON Resources
See the following resources for more information on the JSON:
- Universal Survey Parameters
- Universal Survey Block Parameters
- Available Block Types
- Configuring Conditions
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:
- When creating or editing a survey, select the Add Image icon () above the Survey Configuration field.
- 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
- Select Upload.
-
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>
Important: Replace the following special characters in the href parameter to ensure that the link opens correctly:
|
Configuring Tables
To create a new table in a survey, complete the following steps:
- Set the following universal section parameters:
- Add a new section, and set the section type to Table.
- In the table section, add the tableColumns object. You can configure up to 6 columns in a table.
- To keep the table heading on screen while scrolling, add the optional stickyTableHeading parameter.
- To set a section-level condition that determines whether a section is displayed, add the condition parameter.
- Set the following universal survey block parameters:
- 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.
- 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.
Note: You cannot add the optionalAnswer container for tables.
- Add any headings that you want the site user to see in text blocks. You can add images in the headings.
- 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.
Note: You cannot add images in answerSets, and NRS and VAS scales are not supported for tables.
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 (). 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 () 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:
|
| "surveyType": "ePRO" |
Optional |
Language Override | String, with set options:
|
|
"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 |
|
"licenseText": "©Verteo Biopharma. Pain Survey™ is a trademark of the Verteo Institution of Health." |
Optional |
License Image | URL string |
|
"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:
|
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 |
|
"additionalDetails": "Licensed and reviewed for use in study FEZZIK-07. All rights reserved." |
Optional |
Sections Array | None |
|
"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:
|
|
"type": “serial” |
Optional |
Condition | Boolean, with set options:
|
|
"condition": null |
Optional |
Heading | String |
|
"heading": “Over the last 7 days have you…” |
Optional |
Sticky Heading | Boolean, with set options:
|
|
"stickyHeading": true |
Optional |
Table Columns | Heading: String Width: Floating point number |
|
"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:
|
|
"stickyTableHeading": true |
|
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 |
|
"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 |
|
"heading": "How was your mobility today?" |
Required |
Question number | Positive integer |
|
"questionNumber": "1" |
Optional |
Optional answers container | None |
|
"optionalAnswers": [{...},{...},...] |
|
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 |
|
"score": 0 |
Optional for an optional answer |
Position | String, in the format of a grid reference |
|
"position" : "A1:B2" |
|
Condition | String |
|
"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:
|
|
"answerHeight": "variable" |
Optional |
The display type of the block’s response options | Boolean, with set options:
|
|
"displayAsDropdown": true |
Optional Cannot be used for questions that include images as answers |
In the "answerSet" parameter: | ||||
Answers | None |
|
"answers": [{...}, {...}, …] |
Required |
In each “answer” object: | ||||
Name | String |
|
"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 |
|
"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:
|
|
"answerHeight": "variable" |
Optional |
The display type of the block’s response options | Boolean, with set options:
|
|
""displayAsDropdown": true |
Optional Cannot be used for questions that include images as answers |
In the "answerSet" parameter: | ||||
Answers | None |
|
"answers": [{...}, {...}, …] |
Required |
In each “answer” object: | ||||
Name | String |
|
"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
Note: This question type is not supported when the block is in a table section.
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 |
|
"increment": 1 |
Optional |
The scale's answer image | Image: URL string Description: String |
|
"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 |
|
"customMarks": [ |
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
Note: This question type is not supported when the block is in a table section.
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:
|
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 |
|
"increment": 1 |
Optional |
The scale’s minimum label | String |
|
"minLabel": "No Pain" |
Optional |
The scale’s maximum label | String |
|
"maxLabel": "The worst pain you can imagine" |
Optional |
The scale’s number frequency | Positive integer |
|
"markNumberInterval": 10 |
Optional |
The scale’s mark frequency | Positive integer |
|
"markDisplayInterval": 5 |
Optional |
The display option for the respondent’s selection | Boolean, with set options:
|
|
"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 |
|
"answers": [{...}, {...}] |
Required |
In each “answer” object: | ||||
Name | String |
|
"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 |
|
"placeholder": "Number of Cups" |
Optional |
Minimum Number | Whole number |
|
"minNumber": 0 |
Required |
Maximum Number | Whole number |
|
"maxNumber": 20 |
Required |
Increment | Number |
|
"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 |
|
"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 |
|
"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":{ |
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:
|
The type of the date’s minimum value. | "type": "static" |
Required |
Static minimum value | String |
|
"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:
|
|
|
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:
|
The type of the date’s maximum value. | "type": "static" |
Required |
Static maximum value | String |
|
"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:
|
|
|
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 |
|
|
Optional |
Default response type | String, with set options:
|
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 |
|
"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:
|
|
|
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": { |
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 |
|
"minValue": {...} |
Optional |
Minimum value type | String, with set options:
|
|
"type": "dynamic" |
Required if the minValue object exists |
Static minimum value | String |
|
"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:
|
|
|
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 |
|
"maxValue": {...} |
Optional |
Maximum value type | String, with set options:
|
|
"type": "static" |
Required if the maxValue object exists |
Static maximum value | String |
|
"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:
|
|
|
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 |
|
|
Optional |
Default response type | String, with set options:
|
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 |
|
"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:
|
|
|
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": { |
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:
|
The type of the datetime’s minimum value. | "type": "static" |
Required |
Static minimum value | String |
|
"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:
|
|
|
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:
|
The type of the datetime’s maximum value. | "type": "dynamic" |
Required |
Static maximum value | String |
|
|
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:
|
|
|
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 |
|
|
Optional |
Default response type | String, with set options:
|
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 |
|
"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:
|
|
|
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": []
}