Here is the design of a clinical trial:

Official Title: Lifestyle Changes and Glycemic Control in Type 1 Diabetes Mellitus: A Factorial Design Approach

Included conditions:
- Type1 Diabetes Mellitus
- Life Style
- Behavioral Changes
- Self-Management

Study Armgroups:
- {'label': 'Routine Care', 'type': 'NO_INTERVENTION', 'description': 'This group will be followed up for routine care, maintaining a standard log book for documenting blood sugar and insulin dosages per advice and explanation by doctors, nurses and nutritionists.'}
- {'label': 'e-device for step count (fit-bit)', 'type': 'ACTIVE_COMPARATOR', 'description': 'This group will receive e-device for step count (fit-bit) in addition to routine care.', 'interventionNames': ['Device: e-device for step count (fit-bit)']}
- {'label': 'e-messages for log book', 'type': 'ACTIVE_COMPARATOR', 'description': 'This group will receive daily e-messages for maintaining log book in addition to routine care.', 'interventionNames': ['Behavioral: e-messages for log book']}
- {'label': 'e-messages for log book & fit-bit', 'type': 'ACTIVE_COMPARATOR', 'description': 'This group will receive e-device for step count (fit-bit), daily e-messages for maintaining log book for blood sugar, insulin dosages and step count in addition to routine care.', 'interventionNames': ['Device: e-device for step count (fit-bit)', 'Behavioral: e-messages for log book & fit-bit']}

Interventions:
- {'type': 'DEVICE', 'name': 'e-device for step count (fit-bit)', 'description': 'Patients in this group will receive fitbit device to count their daily steps and record it into their log books.', 'armGroupLabels': ['e-device for step count (fit-bit)', 'e-messages for log book & fit-bit']}
- {'type': 'BEHAVIORAL', 'name': 'e-messages for log book', 'description': 'Patients in this group will receive e-messages to maintain their log books as per instruction for blood sugar levels and send back weekly through snap shot.', 'armGroupLabels': ['e-messages for log book']}
- {'type': 'BEHAVIORAL', 'name': 'e-messages for log book & fit-bit', 'description': 'Patient in this group will receive e-messages to maintain their log books for blood sugar levels as well as use fitbit device and maintain their log book for daily step count and send back weekly through snap shot.', 'armGroupLabels': ['e-messages for log book & fit-bit']}

Primary Outcomes:
- {'measure': 'Changes in HbA1c', 'description': 'Blood HbA1c levels will be measured at baseline, three and six months. It will be taken on ratio scale measured in mmol/mol', 'timeFrame': 'Each participant will be in the study for the period of six months'}

Please estimate the sample size based on the assumption: 
80% power, two-sided significance level of 5%, standard deviation of change in HbA1C between 1.1% and 2.3%.
Sample size and sampling technique
        Overall, 120 patients with T1D will be randomized into four equal groups for evaluating changes in HbA1C using multiple measurements at multiple time points. Thirty patients in each group will be required in order to achieve 80% power for a two-sided level of significance of 5%, using a standard deviation of change in HbA1c between 1.1% and 2.3% and absolute difference of at least 2% expected over a period of 6 months within a group from baseline as well as when compared across the four groups [29]. A consecutive sampling technique will be used to enroll participants visiting AKU pediatric and endocrinology clinics and fulfilling the eligibility criteria.