This is a proof-of-concept for the LAMP Automations system. The workflow is detailed below:
- Patient logs into mobile app (iOS/Android)
- Mobile app uses Study configuration to activate device sensor data collection (i.e. which sensors, frequency per sensor, misc. settings)
- Mobile app collects sensor data in background and caches it
- Conditions must be met: device charged/charging + active WiFi connection
- Mobile app bulk uploads cached sensor data to specified server (organization)
- Mobile app individually uploads activity data upon participant’s completion of a session
- API Server processes and stores this data into database
- API Server signals all listeners that new data has arrived (per-study, per-activity, per-participant)
- Automations worker receives new data notification
- Worker searches its installed scripts catalog for scripts that specify a matching trigger condition
- Worker executes scripts, providing the new data notification information to the script
- Scripts (third-party user-specified code) are executed in isolated docker containers
- Script processes the data as it needs and may optionally execute actions
- Example: BIDMC college study script
- Script computes change in daily survey score today vs. yesterday += 3 points
- If condition is met, script selects a random activity (meditation, journaling, placebo) to send to participant
- Script sends message containing activity ID to API server for mobile app push notification
- Participant receives push notification on their mobile device
- Participant opens push notification and starts activity session
- Upon completion of session (i.e. saved a journal entry), activity data is uploaded to server
- Repeat this feedback cycle from step #6
Private Sensors and Tags
lamp.gps.contextualSensor: This was a mindLAMP 1 feature that collected street-level GPS (not lat/long coordinates) with a paired survey asking about social and environmental context (who you were with and where you were) between 5-30 min of taking a survey in the app.
lamp.demographicsTag: This holds processed clinical scale data from when a patient is onboarded onto a study (i.e. via paper-pencil surveys or RedCap, etc.)
beiwe.*Sensors: The full list of these Sensors is below; these are migrated sensors from when the Beiwe app was used alongside mindLAMP 1.
lamp.dashboard.survey_descriptionTags: These were placeholder tags for the mindLAMP v1 to v2 migration; the Activity API was not fixed at the time and did not support activity icons, descriptions, etc. and so these Tags were required on each customized Activity.
lamp.dashboard.credential_rolesTag: The Care Team feature allowed attaching a separate Tag with a dictionary, where each key matched a Credential set on the Participant; the values for each key (the Credential's email address) was a name, photo, and description of the individual's role in the care team. This is no longer supported as a feature.
lamp.nameTag: This added backwards-compatible support for the
lamp.messagingTag: This added backwards-compatible support for the Conversations feature of the dashboard.
lamp.dashboard.welcome_dismissedTag: Unknown; this Tag was never used.
lamp.selectedSensorsTags: Due to bugs in the earliest version of the mindLAMP v2 dashboard, these tags held an array of studies, activities, or sensors that were selected by the currently logged in Researcher. This is now defunct and should not be used (
localStorageshould be used instead).