Skip to main content

Surveys

Surveys are configurable questionnaires that collect structured responses from participants. They are one of the primary tools for active data collection in mindLAMP.

ActivitySpec: lamp.survey

Configurationโ€‹

Surveys are created and managed through the dashboard's Activities tab.

Creating a New Surveyโ€‹

  1. Log in to the dashboard and navigate to the Activities tab.
  2. Click + Add and select Survey Instrument.
  3. Select the group you wish to add the survey to.
  4. Title your survey.
  5. Press the blue (+) icon to add questions.
  6. Select a question type and enter the question text.
  7. For types with options (List, Multi-Select, Slider, Rating, Matrix), add response options.
  8. Optionally add descriptions to questions or individual options.
  9. Double-check for typos, then press Save.

Question Typesโ€‹

mindLAMP surveys support 10 question types:

TypeDescriptionResponse Format
TextFree-form text box for detailed responsesFree-text string
BooleanYes / No choice"True" or "False"
ListVertical radio buttons with custom optionsSelected option text
Multi-SelectCheckboxes โ€” one or more optionsComma-separated string
SliderHorizontal slider with custom optionsNumeric string
Short AnswerSingle-line input for brief responsesFree-text string
RatingNumeric rating optionsNumeric string
TimeHours and minutes in HH:MM format (15-min increments)Time string (e.g., "14:30")
LikertFixed 4-point scaleNumeric string (0โ€“3)
MatrixGroups related items sharing the same response scaleSelected option text

Question Type Examplesโ€‹

BooleanTextList
Boolean โ€” Yes/No choiceText โ€” Free-form responseList โ€” Radio buttons
Multi-SelectSliderShort Answer
Multi-Select โ€” CheckboxesSlider โ€” Horizontal sliderShort Answer โ€” Single-line input
RatingTimeLikert
Rating โ€” Numeric ratingTime โ€” HH:MM pickerLikert โ€” Fixed 4-point scale
note

The Likert type is fixed at 4 points and cannot be modified. For custom scales, use List or Slider instead.

Configuring Matrix Questionsโ€‹

Matrix questions group multiple related items that share the same response scale, displayed as a table with items as rows and options as columns. To create a matrix:

  1. Add the first question using the response type you want for the entire matrix (e.g., List, Boolean, Likert, Multi-Select, or Rating). This question defines the shared response options and becomes the first row.
  2. Add subsequent questions with the Matrix type. Each Matrix-type question becomes an additional row in the same table, inheriting the response options from the first question.

The first item's type determines the input style for all rows โ€” radio buttons for List/Boolean/Likert, checkboxes for Multi-Select, or rating controls for Rating. Column headers show the option descriptions (if provided) and values.

Editing and Managing Questionsโ€‹

  • Reorder โ€” Drag questions to rearrange their order.
  • Duplicate โ€” Copy an existing question as a starting point for a new one.
  • Delete โ€” Press the trash can icon to remove questions or options.

Embedding Imagesโ€‹

Questions can include embedded images using HTML or Markdown within the question text or descriptions. For portability, consider encoding images as base64 data URIs.

Importing Pre-Built Surveysโ€‹

Instead of building from scratch, import validated instruments:

  1. Click + Add, then select the import icon.
  2. Select the target group.
  3. Drag or select a JSON file.
  4. Tap Import.

See Import & Export for details.

Validated Instrumentsโ€‹

Pre-built clinical instruments available for import:

InstrumentAbbreviationMeasuresDownload
Patient Health Questionnaire-9PHQ-9Depression severityDaily, Biweekly
Generalized Anxiety Disorder-7GAD-7Anxiety severityDaily
Pittsburgh Sleep Quality IndexPSQISleep qualityMonthly
Perceived Stress ScalePSSPerceived stressโ€”
Prodromal Questionnaire-16PQ-16Prodromal psychosis symptomsโ€”
Warning Signal ScaleWSSWarning signalsBiweekly
Concise Health Risk Tracking Self-Report 16CHRT-SR16Health riskWeekly
Dialectical Behavior Therapy โ€” Ways of CopingD-WAICoping mechanismsโ€”
UCLA Loneliness ScaleUCLA LonelinessLonelinessโ€”

If you have a validated survey instrument to contribute, please contact the mindLAMP team.

Usageโ€‹

Survey launch dialog
Launch dialog โ€” Survey name, question count, and description
Survey question
In progress โ€” Likert-scale question (PHQ-9) with progress indicator

Surveys can appear on the Assess tab and in the Feed when scheduled. Participants answer each question in sequence.

Mid-Survey Behaviorโ€‹

If a participant closes the app mid-survey, progress is auto-saved locally and they can resume or start over on return. No partial responses are sent to the server. See Mid-Activity Behavior for details.

Version Controlโ€‹

The platform automatically tracks changes to survey questions and responses. When updating a survey, consider creating a new version (via Duplicate) instead of modifying the existing one to preserve data integrity.

Tipsโ€‹

  • Use clear, concise question text.
  • Add descriptions to options when the meaning may not be obvious.
  • Test your survey by previewing before scheduling.
  • For validated instruments, use pre-built JSON imports to ensure accuracy.

Dataโ€‹

static_dataโ€‹

Unused for surveys (always {}).

temporal_slicesโ€‹

One entry per question:

FieldTypeDescription
itemstringThe question text as displayed to the participant
valuestringThe selected response. Numeric responses are stored as strings (e.g., "7").
typenullUnused for surveys
durationintegerTime spent on this question in milliseconds
levelnullUnused for surveys

Settings Schemaโ€‹

Survey settings are stored on the activity definition:

{
"name": "Morning Check-In",
"settings": [
{
"text": "How are you feeling today?",
"type": "list",
"required": true,
"options": ["Great", "Good", "Okay", "Poor"]
},
{
"text": "Rate your energy level",
"type": "slider",
"required": false,
"options": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
}
]
}

Exampleโ€‹

{
"timestamp": 1634047106612,
"activity": "e2wxcekbb0typzdtz0pb",
"duration": 3735,
"static_data": {},
"temporal_slices": [
{
"item": "How are you feeling today?",
"value": "Good",
"type": null,
"duration": 2500,
"level": null
},
{
"item": "Rate your sleep quality (0-10)",
"value": "7",
"type": null,
"duration": 1235,
"level": null
}
]
}

Cortex Featuresโ€‹

survey (raw) โ†’ survey_scores (primary) โ†’ survey_results (secondary)

  • survey โ€” Retrieves survey events with individual question responses.
  • survey_scores โ€” Computes aggregate scores per survey category using a configurable scoring dictionary.
  • survey_results โ€” Averages scores for a specified question or category across a time window.

View in Portal | Python SDK | API Reference