Pain, at some level, is a universal experience, and as many as one in three Americans suffer chronic pain. But pain is so subjective that physicians struggle to meaningfully evaluate one person’s pain, compare it to another person’s, or even compare the same person’s pain on different days.

Sean Mackey (Image credit: Ian Mackey)

After decades of trying to solve this conundrum, the answer may be in the palm of your hand.

As part of the class Biodesign for Digital Health, a group of medical and computer science students teamed up to create a new mobile app that integrates several types of information to give physicians – and their patients – a better picture of pain and, they hope, a path out of it. The result, called CHOIRmobile, is now headed toward beta testing with the goal of becoming a free digital application for iOS systems.

The problem with pain

Sean Mackey, the Redlich Professor and Chief of the Division of Stanford Pain Medicine, had been working to measure pain for decades. “About 20 years ago,” he said. “I was a brand-new faculty member, predominantly doing clinical work. And Ron Pearl, my department chair, challenged me. He said, ‘How do you know you’re helping patients get better?’ ”

Mackey thought about it and said, “Well, I get hugs. Sometimes I get a fruitcake over the holidays.”

The reality is that pain doctors can’t see pain receding. Or increasing. Mostly, they rely on what patients tell them, but language can be vague and varies from patient to patient.

Mackey became determined to establish accurate and specific measurements and hard data to guide treatment. He designed a survey that patients could fill out, with pen and paper, in a doctor’s office – and spent eight years trying to perfect the questionnaire.

“And I failed miserably,” he said. “Patients hated me. The faculty hated me. The staff hated me. Everybody hated me for doing these surveys that were long and burdensome.”

To devise a new solution, Mackey called Susan Weber and Garrick Olson from Stanford’s Research IT team. This was 2011 and they designed the original CHOIR as a flexible platform to collect high-quality information that patients filled out on a desktop computer at home or in the doctor’s office. Mackey offered the technology to other departments and soon interventional radiology, psychiatry, GI medicine, orthopedics, and others started using it to gather information about their own patients. Since then, CHOIR has expanded its feature set to deliver targeted digital education and therapies, provide custom visualizations of patient data, and perform within clinical research trials.

Making it mobile

CHOIR was a step up from the hand-written surveys but still missed out on crucial data because it could not connect with smartphones and watches, which could passively record useful information about patient mobility, steps, and heart rate.

The CHOIR student team (from left to right): Pranav Gurusankar, Edward Tran, Gaurav Luthria, Bereket Gebregziabher, Andrew Li, and Sharon Cheng. (Image credit: Bereket Gebregziabher)

“At that time, I was told that to build an application that incorporated data from phones would cost me untold millions and take years to develop,” Mackey said.

For advice about upgrading CHOIR to include data from mobile phones, Mackey turned to his colleague Oliver Aalami, a professor of vascular surgery and creator of CardinalKit, an open-source framework that helps researchers build digital health applications for both Apple and Android phones. Aalami suggested Mackey bring the project to Biodesign for Digital Health, a course Aalami teaches in which undergraduate and graduate students learn to create mobile apps using CardinalKit.

In the winter 2022 quarter, undergraduate computer science students Hayden Hoffman and Sharon Cheng and first-year medical students Gaurav Luthria and Bereket Gebregziabher agreed to take CHOIR on.

“We thought Dr. Mackey’s project had a really impressive goal,” Gebregziabher said. “The overarching principles and the framework that they were trying to design was something that we found interesting.”

And challenging.

“We had to think about how to structure surveys that patients could easily do,” Luthria said. “We also had to think about what type of data we wanted to collect, how would we visualize the data, and how do we keep patients engaged in the application?”

Keeping it quick and easy

The biodesign process begins by articulating a specific reason for any innovation in a concise “need statement.” For an updated CHOIR, the students decided that their need statement would be: “We will collect longitudinal data from wearable sensors and pain surveys from people with chronic pain to optimize pain treatments, develop objective biomarkers, and discover safe and effective therapies.”

The team agreed that the survey component needed to fit easily into a person’s day – no driving through traffic to a doctor’s office to answer a lengthy set of questions. And they wanted their innovation to collect information frequently enough to give a complete picture of a person’s pain.

CHOIRmobile prompts people a few times a day to answer two to three minutes of questions on their phones. The app combines those answers with biometric data, like the number of steps taken, the number of stairs climbed, heart rate, and heart rate variability, which is the change from heartbeat to heartbeat and can be an indicator of stress and general health. The app then creates a visual representation to show each moment in time in the context of that day, that week, and the overall experience with pain.

Patients and clinicians both can use CHOIRmobile to see how the pain waxes and wanes over time, or if it stays the same. And with that understanding, they can adjust treatment plans to better serve the patient.

“Now, I’m able to say, ‘Mrs. Jones, I see last week you walked on average 5,000 steps a day and that’s an improvement over what you did the previous week, where you were only at 3,000 steps,’ ” Mackey said.

In conversation, Mackey can help patients assess their progress and set goals for each week to continue improving. “Integrating the data into CHOIR is for clinicians to use, but also for patients to be able to see their own data and act on it,” Mackey said.

The app was also built to be specialty agnostic: if psychologists or psychiatrists or any other medical specialists wanted to use CHOIRmobile to learn more about their patients, the two- to three-minute surveys that ask about pain could be exchanged for surveys that ask about emotions, or exhaustion or something else entirely.

And, as a clinical tool, CHOIRmobile provides valuable information for researchers.

“We can correlate the biometric data that we’re collecting with the question and answers that patients are providing,” Gebregziabher said. “And then we can use that in the future as a proxy for their pain levels.”

The team hopes to start beta-testing the app for clinical use soon. And they continue to gather consent forms for the research study with the hopes that one day, CHOIR can help not only treat but also predict and prevent pain.