###### Abstract  
The aim of this study was to design a virtual peer-to-peer intervention for patients with type 2 diabetes (T2D) by grouping patients from specific segments using data from primary care electronic medical records (EMRs). Two opposing segments were identified: patients living with diabetes who tend to take several medications (\"medication\" segment: \(\sim\)32%) and patients who do not take any diabetes-specific medications (\"lifestyle\" segment: \(\sim\)15%). The remaining patients were from two intermediate segments and exhibited medication-taking behavior that placed them midway between the medication and lifestyle segments. Patients were grouped into six workshops in each group: medication, lifestyle, and mixed group), including individuals with good and bad control of their disease. Measures of attitudes, learning, and motivation were addressed during and after the workshops. Results showed that patients in the lifestyle segment were more interested in T2D lifestyle control strategies, more satisfied with their in-workshop learning experience, and more motivated to set a goal than those in the medication segment. These results suggest that the proposed intervention may be more viable for patients in the lifestyle segment and that EMR data may be used to tailor behavioral interventions to specific patient groups. Future research is needed to investigate different segmentation approaches (e.g., using data related to smoking, drinking, diet, and physical activity) that could help tailor the intervention more effectively. electronic medical records (EMRs); patient segmentation; peer-to-peer support; positive deviance; type 2 diabetes +
Footnote †: journal: _Future Internet_  
poor control of their disease and have difficulties in dealing with the related emotional, social, and physical effects [3]. Different peer support models, e.g., face-to-face, telephone-, or web-based programs have been developed so far. The rationale is to let patients talk with each other and address common issues, typically under the supervision of expert moderators or healthcare professionals, outside the patient-physician direct relationship. Studies have shown that peer support intervention can lead to better glycemic control than individual programs, but these programs may fail to achieve wide adoption as a large variability in individual outcomes is observed [4; 5]. A minority of patients are able to achieve good control of their disease whereas the majority struggle to do so, despite having access to the same resources. Specifically, depending on patient segment, anywhere from 27 to 55% of patients have poor blood pressure control, 37 to 83% have poor cholesterol control, and 15 to 73% have poor blood sugar control [6; 7]. Moreover, the recent COVID-19 pandemic has exacerbated some of the barriers that patients experience in maintaining a healthy lifestyle. Social distancing and preventive measures have limited the frequency of routine primary care encounters, particularly for the elderly [8; 9]. In this context, the availability of tailored interventions delivered in a virtual environment may help overcome the challenges related to conventional approaches. In a preliminary study [7], we demonstrated that patients with T2D enrolled in a virtual peer-to-peer moderated group discussion had a favorable attitude toward the opportunity to share their experiences with peers in a virtual environment, regardless of the patient segment and of their level of control of the disease. Moreover, our preliminary findings suggested differences between patient segments in terms of self-reported learning and preferred topics (i.e., patients interested in preventive measures were more likely to belong to the lifestyle segment whereas patients interested in symptom management were more likely to belong to the medications segment) [7].