## 4 Discussion  
The analysis of medication-taking behavior in the tested sample revealed two opposing segments: medication and lifestyle. The former included patients who take several medications (anti-diabetics, anti-hypertensives, and anti-cholesterol), whereas the latter included patients who do not take diabetes-specific medications, only anti-hypertensives and anti-cholesterol drugs. Noticeably, the clinical characteristics of patients in the two segments are similar in terms of mean age, average number of comorbidities, and average values of biomarkers (BMI, HbA1c, LDL, SBP and dBP), as shown in Table 1. The percentage of patients who had good control of HbA1c (i.e., HbA1c \(\leq\) 7%) was 42.3% in the lifestyle segment and 43.7% in the medication segment. Stated differently, our results showed that patients from the lifestyle segment may reach a similar level of blood sugar control as patients who take diabetes drugs regularly, suggesting that patients in the lifestyle segment may be managing their blood sugar through lifestyle modifications (e.g., diet, exercise). Noticeably, similar results were obtained from a sample of 34078 patients with T2D extracted with the same inclusion criteria here used from a large Canadian database of EMRs (CPCSSN, Canadian Primary Care Sentinel Surveillance Network) spanning years from 2005 to 2015 [19]. In the CPCSSN sample, the percentage of patients in the medication segment was higher than that observed in this study (i.e., \(\sim\)37% vs. \(\sim\)32%) whereas the percentage of patients in the lifestyle segment was lower (i.e., \(\sim\)7% vs. \(\sim\)15%). The observed differences between the findings observed in two studies may be related to the different  
Figure 1: Distribution of responses collected from the post-workshop survey from patients in the medication (**top panel**), lifestyle (**center panel**), and mixed (**bottom panel**) groups. Questions: Q1: After this workshop I feel better about managing my condition; Q2: I learned new information during the workshop; Q3: The information and interactions during the workshop were useful to me; Q4: I plan to act on the information I obtained in the workshop; Q5: I believe I will achieve my goal within the next three months; Q6. I am motivated to set a goal for improving my diabetes. characteristics of patients in the two datasets, with patients in the CPCSSN sample having a higher average number of comorbidities than those in this study (i.e., 1.6 vs. 1.4), and worse average biomarker values (e.g., BMI: 32.7 Kg/m\({}^{2}\) vs. 31.8 Kg/m\({}^{2}\); LDL: 2.3 mmol/L vs. 2.0 mmol/L). For a deeper understanding of the characteristics of the patient segments here identified, further research is needed. For example, it will be important to externally validate these results using different datasets, for example data extracted from the CLSA (Canadian Longitudinal Study of Ageing) or ELSA (English Longitudinal Study of Ageing) databases that include similar data to the CPCSSN but are collected at regular time intervals, in contrast to primary care EMR data, which are collected at routine clinical examinations. Moreover, it will be important to develop and investigate different patient segmentation approaches, for example, by including specific lifestyle-related features (e.g., medication adherence, exercise, diet) and measures collected through ad hoc surveys (e.g., attitudes towards diet, exercise, stress management, sleep management, medications, personal monitoring devices) in addition to features extracted from the EMRs. Based on the segments identified in this study, a total of six workshops were conducted (two for patients in the medication segment, two for patients in the lifestyle segment, and two gathering a mixture of patients from across segments). In each workshop, patients with good control of the disease were involved, following the principle of positive deviance [15; 16].