This work may not be copied, distributed, displayed, published, reproduced, transmitted, modified, posted, sold, licensed, or used for commercial purposes. By downloading this file, you are agreeing to the publisher’s Terms & Conditions.

Brief Report

Development and Theoretical Approach to an Adaptive Text Message Program to Promote Well-Being and Health Behaviors in Primary Care Patients

Sean Legler, MDa; Christopher M. Celano, MDb,c; Adela Amador, RNd; Austen Novis, BSd; Senan Ebrahim, BAc; and Jeff C. Huffman, MDb,c,*

Published: October 25, 2018

A majority of individuals with chronic medical conditions do not fully follow recommendations about health behaviors, and deficits in health education, motivation, support, and well-being all likely play a role. This report describes the theory, programming, development, and implementation process for a machine learning-based, adaptive, once-daily text message intervention to address this public health problem. The intervention aims to promote psychological well-being and provide education and support around health behaviors. The platform allows patients to provide real-time feedback about each message, and the machine learning algorithm then delivers subsequent messages that are increasingly tailored to individuals’ preferred message content.

Prim Care Companion CNS Disord 2018;20(5):18br02353

To cite: Legler S, Celano CM, Amador A, et al. Development and theoretical approach to an adaptive text message program to promote well-being and health behaviors in primary care patients. Prim Care Companion CNS Disord. 2018;20(5):18br02353.

To share:

aDepartment of Medicine, University of Minnesota Medical School, Minneapolis, Minnesota

bDepartment of Psychiatry, Massachusetts General Hospital, Boston, Massachusetts

cHarvard Medical School, Boston, Massachusetts

dDepartment of Primary Care, East Boston Neighborhood Health Center, Boston, Massachusetts

*Corresponding author: Jeff C. Huffman, MD, Massachusetts General Hospital 55 Fruit St, Boston, MA, USA 02114 (

The majority of the 117 million Americans1 with chronic medical conditions are unable to adhere to recommended health behaviors, including physical activity, healthy eating, or medications,2,3 and such nonadherence is linked to disease progression and poor health outcomes.3,4 Existing in-person health behavior programs have important limitations. These programs are often intensive and time-consuming, are only attended by a minority of patients, and are not personalized to the specific needs of a given patient.5-8 Such programs could greatly benefit from a more personalized approach, as individualized and patient-centered health programs, customized to the specific needs of each patient, may be needed to optimally improve outcomes.9,10

Mobile health (mHealth)-based programs, which utilize wireless devices to deliver health-related information or interventions, may address limitations of existing, in-person health programs. mHealth protocols can deliver intervention content on demand wherever and whenever patients may need them, providing needed flexibility and accessibility. Among mHealth interventions, text message interventions (TMIs) may be particularly useful. Compared to downloading and interfacing with mobile apps, which can be more time-consuming and complex, TMIs are exceedingly simple and present minimal burden for patients.

While prior TMIs for health behavior promotion have had mixed results,11-13 several enhancements could increase their effectiveness. First, a TMI that concurrently targets psychological well-being and health education and support to take a multipronged approach to promoting health behaviors and optimizing overall function may be useful. Positive psychological well-being has been independently and prospectively linked to greater subsequent health behavior participation in those with chronic medical conditions.14 Positive psychology interventions,15 which utilize short tasks to promote well-being, have been effective in medical populations16-20 and are well-suited to the brief messaging in TMIs.

In addition, TMIs could provide personalized content via an adaptive, machine learning-based platform to deliver messaging that best fits patients’ specific situations, preferences, and needs. When a machine learning algorithm is utilized, feedback from participants about the utility of each message can be used to select and send the type of messages that the individual finds most useful in self-managing his or her illness. For example, a patient that finds messages regarding physical activity and stress reduction particularly useful would receive more of those types of messages, whereas a patient that preferred diet-focused messages might receive more messages related to his or her eating habits. Increasing evidence shows that personalized medicine approaches that tailor content of health promotion programs to the needs of individuals are better accepted and more effective than traditional one-size-fits-all approaches.21-23

  • Personalized interventions to promote health behaviors appear to be more effective than one-size-fits-all approaches.
  • Patients increasingly want to use their mobile devices to obtain health content.
  • Utilization of adaptive text message programs that provide specific health information based on patient input might provide a personalized experience and promote health.

In this report, we describe the theoretical underpinnings, programming, logistics, and rollout of a personalized TMI protocol that uses a feedback-based reinforcement algorithm to deliver subsequent messages from a bank of potentially relevant messages; we do not present results. The intervention has been designed specifically for primary care patients in a community health setting with a high proportion of underserved patients. Because primary care physicians serve as the main physician contact for patients with a variety of medical illnesses, implementation of such an intervention in the primary care setting may be particularly powerful.



In preparation for a clinical demonstration project, we conceptualized and developed a machine learning-based TMI to promote psychological well-being and health behavior adherence among English- or Spanish-speaking primary care patients. In this program, patients receive 1 text message each day and offer feedback about the usefulness of each message. This feedback is then used by an algorithm to select the next message sent to the patient. An intensive, iterative development process was followed by logistical preparation for clinical implementation/demonstration in an urban community health primary care clinic.

Intervention Development

Intervention model. We aimed to target health behaviors in the TMI via a 2-pronged approach that included content to promote well-being and direct education and suggestions regarding specific health behaviors. We utilized this combined psychological-behavioral approach because both components may impact health behavior adherence through overlapping, but distinct, pathways (Supplementary Figure 1 provides additional detail).

Specifically, health education and goal-setting messages can lead to greater intention to change, more feelings of control,24,25 and greater motivation/self-efficacy,24-27 and these constructs are associated with increased participation in health behaviors.28-30 Similarly, positive psychology exercises can lead to motivation and self-efficacy. However, they are also directly associated with reduction of depression and improvement in optimism, positive affect, and other markers of well-being,31-33 which are also associated with health behaviors.34-37 These combined and complementary effects of positive psychology and health content may be much more powerful in this complex and vulnerable population than either approach alone. Combined health behavior-psychological interventions have been successful in medical patients38 but thus far have been designed only for the minority of patients with clinical depression. This intervention was designed to be much more widely applicable.

Intervention content. Given that a large number of messages would be needed for an adaptive TMI that could provide a wide variety of intervention content to participants and be applicable to patients with a broad range of conditions, behavior goals, and preferences, we accessed numerous sources for text message content. These sources included publicly available messages and information from (1) prior positive psychology intervention and TMI studies in healthy and medically ill populations,15,39,40 (2) national health organizations, (3) existing psychotherapeutic interventions (eg, cognitive-behavioral therapy), and (4) our team’s previous work delivering positive psychology and health-related content in prior intervention studies.18,41 These messages were reviewed and adapted for brevity and relevance to this population and resulted in a total of 320 potential messages (Table 1 includes sample messages).

Table 1

Click figure to enlarge

The messages were divided into 5 message types for this initial trial: (1) positive psychology activities performed alone, (2) positive psychology activities performed with others, (3) physical activity messages, (4) healthy eating messages, and (5) stress-reduction messages. We chose these 3 health behaviors (physical activity, healthy eating, and stress reduction) for this initial intervention because they have been associated with improved health outcomes42-44 and would be relevant to the vast majority of primary care patients.2

Figure 1

Click figure to enlarge

Algorithm creation. In short, we used an algorithm (Figure 1) that recorded the proportion of messages that were liked or disliked for each message type and then began to more frequently provide messages of the favored message types (Supplementary Table 1 provides more detail about algorithm creation). While the 5 message types described previously were used to develop this initial clinical demonstration project, this adaptive system can use a larger number of message types. Furthermore, multiple attributes (eg, positive psychology-based, type of health behavior) can be assigned to a single message, and the algorithm can make decisions on the basis of these attributes instead of a single overall message type (Supplementary Figure 2). For example, a given message might encourage performing physical activity with a friend, which might mean this message is labeled as both prosocial and physical activity related.

Message delivery. To deliver messages, we utilized existing HIPPA-compliant, institutional review board-approved, firewalled servers and services to host the database and the adaptive messaging algorithm and then send automated messages. Utilizing these services, this dynamic messaging system can receive participant feedback about messages in real time, incorporate this feedback into dynamically updated personal preferences, and use those preferences to send increasingly personalized messages to the participant (Supplementary Table 1 provides more detail about message delivery).

Pilot Demonstration Project

The adaptive TMI, and an earlier fixed-message TMI, were piloted at an urban community health primary care clinic. This center provides care for a substantial proportion of racial and ethnic minority patients (78.0% of total patients), especially Hispanic/Latino patients (70.8%), with 60.4% of patients identified as being best served in a language other than English (Spanish in nearly all cases).55 Staff from the TMI development team (S.L.) met with clinical staff to introduce the program and procedures for enrolling participants, and the program was initiated in January 2017.

In terms of enrollment criteria, the program was initially open to patients in the health center’s chronic disease management program with ≥ 1 chronic medical condition (eg, diabetes, coronary heart disease); after this initial test period, the program was offered to all patients identified by clinicians as in need of assistance or support in integrating health behaviors into their daily lives. Willing patients joined by text messaging the word join to the designated phone number to initiate the automated program (Figure 2).

Figure 2

Click figure to enlarge

We first utilized a fixed text message program (all patients got the same messages) to test the logistics of enrolling participants in the clinical demonstration program and deploying the text messages. Then, we began utilizing the adaptive TMI. In both the fixed-message and adaptive TMIs, participants received 1 text message per day. Text messages were translated into Spanish, and participants could receive messages in English or Spanish according to their preference. Participants, if desired, also recorded a first name or nickname, and messages used this salutation for further personalization. Text messages were sent each day beginning at the time of enrollment. In the adaptive text messaging model, following each text message, participants were asked whether the message was helpful or not. Their response to this question was then recorded and utilized by the algorithm to choose a message for subsequent days.

Seventy-four patients enrolled in the initial fixed-message program, and enrollment for the adaptive text message program is ongoing as of July 2018. All participants in both phases thus far have successfully initiated the program on their cell phone and received text messages. The demonstration project team is collecting data on rates of enrollment, text message reception, and message feedback (for the adaptive program) to assess the feasibility and acceptability of the program.



We successfully conceptualized and created an adaptive, machine learning-based TMI that combines psychological and health education content for an underserved primary care population in English and Spanish using existing mHealth technology.

TMIs have been used in health promotion, with mixed but promising effects on cardiovascular health promotion.11-13 Such interventions should be applicable to a very wide range of patients, given that 95% of American adults own a cellular phone,45 and as opposed to mobile apps, TMIs work well with less-expensive phones (eg, nonsmartphones) or data plans, making them accessible to underserved populations. Our protocol expands on prior work by being the first health behavior TMI, to our knowledge, that includes both English and Spanish content and the first to combine health-related messaging with content specifically designed to promote facets of psychological well-being that are linked to cardiac health behaviors.46,47

Perhaps most importantly, this is the first TMI, to our knowledge, to utilize an adaptive, personalized approach to messaging using a machine learning approach based on content type. This approach can match messaging with participants’ needs and preferences and can provide a precision medicine approach to health promotion. Other programs, such as cardiac rehabilitation, have used participant preferences at intervals to tailor programming, but this is the first to provide ongoing, daily tailoring throughout such a program to dynamically meet participants’ needs.

This intervention is early in development, and many questions remain. First, it will be important to obtain results from this clinical project to determine total rates of successful message delivery and rates of feedback to the daily messages to assess feasibility and acceptability in greater depth. In addition, interviews with a representative sample of participants can provide additional data on patient experience. Even if it does appear that this intervention is feasible and well accepted in this real-world primary care setting, more work is needed to assess its effects on well-being, health behavior change, and specific metrics of health (eg, lipid levels).

Future development and evaluations of adaptive TMI projects should determine an optimal duration of the intervention, assess effects of the intervention on health-related outcomes, and study the program in a broad cohort of patients from numerous sites to assess whether it is feasible and effective in the widest group of real-world populations.

Submitted: July 13, 2018; accepted August 9, 2018.

Published online: October 25, 2018.

Potential conflicts of interest: None.

Funding/support: This clinical demonstration project was supported by the Harvard Medical School Center for Primary Care Agents of Change Grant Project (to Dr Legler). Time for analysis and article preparation was funded by the National Institutes of Health through grants R01HL113272 and R21DK109313 (to Dr Huffman) and K23HL123607 (to Dr Celano).

Role of the sponsor: The sponsors had no role in the design, interpretation, or publication of this report.

Disclaimer: The content is solely the responsibility of the authors and does not represent the official views of the National Institutes of Health.

Supplementary material: See accompanying pages.


1. Ward BW, Schiller JS, Goodman RA. Multiple chronic conditions among US adults: a 2012 update. Prev Chronic Dis. 2014;11:E62. PubMed CrossRef

2. Middleton KR, Anton SD, Perri MG. Long-term adherence to health behavior change. Am J Lifestyle Med. 2013;7(6):395-404. PubMed CrossRef

3. Reddigan JI, Riddell MC, Kuk JL. The joint association of physical activity and glycaemic control in predicting cardiovascular death and all-cause mortality in the US population. Diabetologia. 2012;55(3):632-635. PubMed CrossRef

4. Yang Q, Cogswell ME, Flanders WD, et al. Trends in cardiovascular health metrics and associations with all-cause and CVD mortality among US adults. JAMA. 2012;307(12):1273-1283. PubMed CrossRef

5. Carroll J, Winters P, Fiscella K, et al. Process evaluation of practice-based diabetes prevention programs: what are the implementation challenges? Diabetes Educ. 2015;41(3):271-279. PubMed CrossRef

6. Matthews L, Kirk A, Macmillan F, et al. Can physical activity interventions for adults with type 2 diabetes be translated into practice settings? a systematic review using the RE-AIM framework. Transl Behav Med. 2014;4(1):60-78. PubMed CrossRef

7. Bastiaens H, Sunaert P, Wens J, et al. Supporting diabetes self-management in primary care: pilot-study of a group-based programme focusing on diet and exercise. Prim Care Diabetes. 2009;3(2):103-109. PubMed CrossRef

8. Osborn CY, Amico KR, Cruz N, et al. Development and implementation of a culturally tailored diabetes intervention in primary care. Transl Behav Med. 2011;1(3):468-479. PubMed CrossRef

9. Hermens H, op den Akker H, Tabak M, et al. Personalized coaching systems to support healthy behavior in people with chronic conditions. J Electromyogr Kinesiol. 2014;24(6):815-826. PubMed CrossRef

10. Wallace MP, Moodie EE. Personalizing medicine: a review of adaptive treatment strategies. Pharmacoepidemiol Drug Saf. 2014;23(6):580-585. PubMed CrossRef

11. Chow CK, Redfern J, Hillis GS, et al. Effect of lifestyle-focused text messaging on risk factor modification in patients with coronary heart disease: a randomized clinical trial. JAMA. 2015;314(12):1255-1263. PubMed CrossRef

12. Hall AK, Cole-Lewis H, Bernhardt JM. Mobile text messaging for health: a systematic review of reviews. Annu Rev Public Health. 2015;36(1):393-415. PubMed CrossRef

13. Pfaeffli Dale L, Whittaker R, Jiang Y, et al. Text message and internet support for coronary heart disease self-management: results from the Text4Heart randomized controlled trial. J Med Internet Res. 2015;17(10):e237. PubMed CrossRef

14. DuBois CM, Beach SR, Kashdan TB, et al. Positive psychological attributes and cardiac outcomes: associations, mechanisms, and interventions. Psychosomatics. 2012;53(4):303-318. PubMed CrossRef

15. Seligman ME, Steen TA, Park N, et al. Positive psychology progress: empirical validation of interventions. Am Psychol. 2005;60(5):410-421. PubMed CrossRef

16. Celano CM, Albanese AM, Millstein RA, et al. Optimizing a positive psychology intervention to promote health behaviors following an acute coronary syndrome: the Positive Emotions after Acute Coronary Events-III (PEACE-III) randomized factorial trial. Psychosom Med. 2018;80(6):526-534. PubMed CrossRef

17. Mohammadi N, Aghayousefi A, Nikrahan GR, et al. A randomized trial of an optimism training intervention in patients with heart disease. Gen Hosp Psychiatry. 2018;51:46-53. PubMed CrossRef

18. Huffman JC, Millstein RA, Mastromauro CA, et al. A positive psychology intervention for patients with an acute coronary syndrome: treatment development and proof-of-concept trial. J Happiness Stud. 2016;17(5):1985-2006. PubMed CrossRef

19. Moskowitz JT, Carrico AW, Duncan LG, et al. Randomized controlled trial of a positive affect intervention for people newly diagnosed with HIV. J Consult Clin Psychol. 2017;85(5):409-423. PubMed CrossRef

20. Cheung EO, Cohn MA, Dunn LB, et al. A randomized pilot trial of a positive affect skill intervention (lessons in linking affect and coping) for women with metastatic breast cancer. Psychooncology. 2017;26(12):2101-2108. PubMed CrossRef

21. Antypas K, Wangberg SC. An internet- and mobile-based tailored intervention to enhance maintenance of physical activity after cardiac rehabilitation: short-term results of a randomized controlled trial. J Med Internet Res. 2014;16(3):e77. PubMed CrossRef

22. Beckie TM, Beckstead JW. The effects of a cardiac rehabilitation program tailored for women on their perceptions of health: a randomized clinical trial. J Cardiopulm Rehabil Prev. 2011;31(1):25-34. PubMed CrossRef

23. Morrison L, Moss-Morris R, Michie S, et al. Optimizing engagement with internet-based health behaviour change interventions: comparison of self-assessment with and without tailored feedback using a mixed methods approach. Br J Health Psychol. 2014;19(4):839-855. PubMed CrossRef

24. Bean MK, Powell P, Quinoy A, et al. Motivational interviewing targeting diet and physical activity improves adherence to paediatric obesity treatment: results from the MI Values randomized controlled trial. Pediatr Obes. 2015;10(2):118-125. PubMed CrossRef

25. Smith DE, Heckemeyer CM, Kratt PP, et al. Motivational interviewing to improve adherence to a behavioral weight-control program for older obese women with NIDDM: a pilot study. Diabetes Care. 1997;20(1):52-54. PubMed CrossRef

26. Goodarzi M, Ebrahimzadeh I, Rabi A, et al. Impact of distance education via mobile phone text messaging on knowledge, attitude, practice and self-efficacy of patients with type 2 diabetes mellitus in Iran. J Diabetes Metab Disord. 2012;11(1):10. PubMed CrossRef

27. Franklin VL, Waller A, Pagliari C, et al. A randomized controlled trial of Sweet Talk, a text-messaging system to support young people with diabetes. Diabet Med. 2006;23(12):1332-1338. PubMed CrossRef

28. Boudreau F, Godin G. Participation in regular leisure-time physical activity among individuals with type 2 diabetes not meeting Canadian guidelines: the influence of intention, perceived behavioral control, and moral norm. Int J Behav Med. 2014;21(6):918-926. PubMed CrossRef

29. Plotnikoff RC, Trinh L, Courneya KS, et al. Predictors of physical activity in adults with type 2 diabetes. Am J Health Behav. 2011;35(3):359-370. PubMed CrossRef

30. Moreau M, Gagnon MP, Boudreau F. Development of a fully automated, web-based, tailored intervention promoting regular physical activity among insufficiently active adults with type 2 diabetes: integrating the I-change model, self-determination theory, and motivational interviewing components. JMIR Res Protoc. 2015;4(1):e25. PubMed

31. Meevissen YM, Peters ML, Alberts HJ. Become more optimistic by imagining a best possible self: effects of a two week intervention. J Behav Ther Exp Psychiatry. 2011;42(3):371-378. PubMed CrossRef

32. Bolier L, Haverman M, Westerhof GJ, et al. Positive psychology interventions: a meta-analysis of randomized controlled studies. BMC Public Health. 2013;13(1):119. PubMed CrossRef

33. Cohn MA, Pietrucha ME, Saslow LR, et al. An online positive affect skills intervention reduces depression in adults with type 2 diabetes. J Posit Psychol. 2014;9(6):523-534. PubMed CrossRef

34. Emmons RA, McCullough ME. Counting blessings versus burdens: an experimental investigation of gratitude and subjective well-being in daily life. J Pers Soc Psychol. 2003;84(2):377-389. PubMed CrossRef

35. Giltay EJ, Geleijnse JM, Zitman FG, et al. Lifestyle and dietary correlates of dispositional optimism in men: The Zutphen Elderly Study. J Psychosom Res. 2007;63(5):483-490. PubMed CrossRef

36. Peterson JC, Charlson ME, Hoffman Z, et al. A randomized controlled trial of positive-affect induction to promote physical activity after percutaneous coronary intervention. Arch Intern Med. 2012;172(4):329-336. PubMed CrossRef

37. Steptoe A, Wright C, Kunz-Ebrecht SR, et al. Dispositional optimism and health behaviour in community-dwelling older people: associations with healthy ageing. Br J Health Psychol. 2006;11(pt 1):71-84. PubMed CrossRef

38. Safren SA, Gonzalez JS, Wexler DJ, et al. A randomized controlled trial of cognitive behavioral therapy for adherence and depression (CBT-AD) in patients with uncontrolled type 2 diabetes. Diabetes Care. 2014;37(3):625-633. PubMed CrossRef

39. Moskowitz JT, Hult JR, Duncan LG, et al. A positive affect intervention for people experiencing health-related stress: development and non-randomized pilot test. J Health Psychol. 2012;17(5):676-692. PubMed CrossRef

40. Legler S, Celano CM, Beale EE, et al. Use of text messages to increase positive affect and promote physical activity in patients with heart disease: the Promoting Activity in Cardiac patients via Text messages (PACT) pilot study [published online January 18, 2018]. Curr Psychol. CrossRef

41. Celano CM, Albanese AM, Millstein RA, et al. Optimizing a positive psychology intervention to promote health behaviors after an acute coronary syndrome: the Positive Emotions After Acute Coronary Events III (PEACE-III) randomized factorial trial. Psychosom Med. 2018;80(6):526-534. PubMed

42. Lahti J, Holstila A, Lahelma E, et al. Leisure-time physical activity and all-cause mortality. PLoS One. 2014;9(7):e101548. PubMed CrossRef

43. Chow CK, Jolly S, Rao-Melacini P, et al. Association of diet, exercise, and smoking modification with risk of early cardiovascular events after acute coronary syndromes. Circulation. 2010;121(6):750-758. PubMed CrossRef

44. Schneider RH, Alexander CN, Staggers F, et al. Long-term effects of stress reduction on mortality in persons > or = 55 years of age with systemic hypertension. Am J Cardiol. 2005;95(9):1060-1064. PubMed CrossRef

45. Pew Research Center. Mobile Fact Sheet. Internet and Technology 2018. Pew Research Center website. Accessed October 8, 2018.

46. Huffman JC, Beale EE, Celano CM, et al. Effects of optimism and gratitude on physical activity, biomarkers, and readmissions after an acute coronary syndrome: the Gratitude Research in Acute Coronary Events Study. Circ Cardiovasc Qual Outcomes. 2016;9(1):55-63. PubMed CrossRef

47. DuBois CM, Lopez OV, Beale EE, et al. Relationships between positive psychological constructs and health outcomes in patients with cardiovascular disease: a systematic review. Int J Cardiol. 2015;195:265-280. PubMed CrossRef

Related Articles

Volume: 20

Quick Links:


Buy this Article as a PDF