Digital phenotyping research platform

Harvard T.H. Chan School of Public Health: Beiwe

Sample accelerometer data collected by Beiwe

Sample accelerometer data collected by Beiwe. Image from Torous, John & Kiang, Mathew & Lorme, Jeanette & Onnela, Jukka-Pekka. (2016). New Tools for New Research in Psychiatry: A Scalable and Customizable Platform to Empower Data Driven Smartphone Research. JMIR Mental Health. 3. e16. 10.2196/mental.5165.

Overview

Beiwe is a HIPAA-compliant digital phenotyping app used in medical and academic research studies. It runs in the background on a participant's smartphone, collects data on their movement and activity, and delivers surveys to them. Zagaran built most of the Android version of the app, part of the iOS version, and most of the server infrastructure for collecting data. Data analysis is mostly handled by the Onnela Lab at Harvard's T. H. Chan School of Public Health.

Originally funded by a 2013 NIH Director's New Innovator Award to Dr. Jukka-Pekka Onnela, Beiwe started when Zagaran began work on it in 2014. It was originally designed for a single academic study, but interest from other researchers led to Beiwe being turned into a customizable platform for running studies with different parameters; in 2017, it was made open source. Beiwe has now been used to study different conditions including depression, schizophrenia, and ALS, and has collected participant data for clinical trials. While activity tracking has since been built into apps like Apple's Health app on iOS, Beiwe provides unique value because it gives researchers access to the raw data and the methods used to process it, making the data more usable and reliable than what's collected by Apple Health.

Challenging requirements

Developing Beiwe presented many challenges. Beiwe collects a lot of passive sensor data from phones, primarily from the accelerometer, gyroscope, and GPS, all of which consume significant energy and reduce battery life. Apple and Google also periodically change the iOS and Android operating systems to restrict the behavior of apps running in the background, which means that every year, Beiwe needs to be updated to run using different APIs and system/user permissions, and sometimes the fundamental data collection framework needs to be overhauled to keep it working.

Architectural evolution

Originally, Beiwe was optimized to download surveys at study enrollment and run logic on the phone for when to display those surveys. That architecture enabled participants to complete surveys even if they were offline. Over time, however, fewer and fewer participants lacked mobile data plans, while more and more researchers wanted to be able to customize surveys during the study, and even run custom logic for when to send survey notifications. To enable the more complex survey logic, Zagaran overhauled the architecture, moving surveys from being prescheduled on the phone to being triggered by push notifications from the Beiwe server.

Zagaran also added features to make many parameters of the app customizable, depending on what research study the participant is enrolled in. Researchers on the study can change the types of data collected and the frequencies at which they're collected, wording throughout the app, and some of the security requirements. Surveys in the app are richly customizable as well: there are audio recording prompts and on-screen surveys; the latter include several question types (including multiple choice, open response, and slider questions), branching logic, and randomization.

Because Beiwe is designed to be a fully transparent and reproducible platform for data collection and analysis, anyone can run their own Beiwe deployment, which is unusual for research software. Zagaran has built and maintained public architecture, tools, and documentation for running an independent Beiwe instance on Amazon Web Services.

Zagaran's role and Beiwe's impact

In addition to building, operating, and maintaining the Beiwe apps and the primary server deployments (run by the Onnela Lab), Zagaran has built customizations and run Beiwe deployments for other research organizations, including a large pharmaceutical company.

Beiwe has been used to run hundreds of research studies around the world, including predicting relapses in schizophrenia patients, measuring depression over time, and tracking heart health.

More Projects

Check out our other projects

Illustration of documents advancing along a transit line toward approval

Major Transit Authority

Enterprise Document Management

Modernizing complex document workflows to scale from pilot to enterprise-wide use

Document Management

Workflow Automation

Massachusetts Public Housing

CHAMP (Massachusetts EOHLC)

Public Housing Portal

Replacing decentralized paper applications with a single statewide housing portal

Centralized Application Portal

Workflow Automation

Data Pipelines

Illustration of manufacturing workflow stages converging into an approved prosthetic

Medtech Company

Manufacturing Workflow Automation

Transforming manual prosthetic production into an automated, engineer-reviewed pipeline

Healthcare

Manufacturing

Illustration of a safety hazard resolved through rail oversight into a compliance checklist

State Rail Transit Safety

Rail Safety Management Platform

Consolidating spreadsheets and legacy tools into a single source of truth for rail transit safety oversight

Safety and Audit

Regulatory Compliance

Illustration of engineering activity data transformed by AI into a tax credit document

TaxCredit.ai

R&D Tax Credit Automation

Turning engineering data into audit-ready R&D tax credit studies with AI

AI

Tax Software

Massachusetts Rental Voucher Program

CHAMP (Massachusetts EOHLC)

Rental Voucher Program Expansion

Expanding a statewide housing platform to support mobile and project-based rental vouchers

Housing

Case Management

Workflow Design

Illustration of supplier spreadsheets consolidated into a centralized compliance reporting platform

Compliance Platform (Massachusetts DOER)

Renewable Energy Compliance Reporting

Moving statewide renewable energy compliance reporting from spreadsheets to a centralized platform

Energy & Sustainability

Regulatory Compliance

Teachly Seating Chart

Teachly (Harvard Kennedy School)

Teaching and Participation Feedback Tool

Giving instructors data-driven feedback to make class participation more inclusive

Education Software

LTI Integration

Statewide vacancy and waiver management

CHAMP (Massachusetts EOHLC)

Vacancy and Waiver Management

Replacing a fragmented legacy system with unified statewide vacancy and waiver workflows

Public Housing

Workflow Modernization

Compliance & Reporting

Illustration of a renewable energy application guided through submission, review, and approval

Application Portal (Massachusetts DOER)

Renewable Energy Certification

Rebuilding a legacy certification portal as a streamlined platform for the full application lifecycle

Energy & Sustainability

Application and Certification

Ready to start?

Request a quote and get started