Here is the design of a clinical trial:

Official Title: Implementing and Evaluating ActionADE to Transform Medication Safety Among Patients With Adverse Drug Reactions

Included conditions:
- Adverse Drug Event
- Adverse Drug Reaction

Study Armgroups:
- {'label': 'ADE information transmitted to PharmaNet', 'type': 'EXPERIMENTAL', 'description': "Patients in the experimental arm will have standardized adverse drug event information documented in ActionADE transmitted to and stored in PharmaNet, British Columbia's medication dispensing database. The adverse drug event information will become visible to any subsequent healthcare provider who accesses the patient's PharmaNet profile. Community pharmacy software will import the adverse drug event information such that community pharmacists can view the adverse drug event information prior to dispensing medications.", 'interventionNames': ['Device: ActionADE']}
- {'label': 'Standard care (ADE information retained locally)', 'type': 'NO_INTERVENTION', 'description': 'Patients in the control group will have their adverse drug event information recorded in ActionADE, and their information will be retained locally, as is the current standard of care. This means that their adverse drug event information will not be visible to other providers via PharmaNet.'}

Interventions:
- {'type': 'DEVICE', 'name': 'ActionADE', 'description': "ActionADE is a software application that allows healthcare providers to document standardized adverse drug event information in a user-friendly and standardized manner. We integrated ActionADE uni-directionally with PharmaNet, a secure province-wide network that links all pharmacies in British Columbia to a central data system. This allows care providers to pull in demographic information and visualize their patient's medication dispensing history.\n\nIn 2020, we enabled bi-directional integration with PharmaNet allowing clinicians to transmit standardized adverse drug event information back to the PharmaNet database. The three dominant community pharmacy systems in the geographic area of the trial will display the adverse drug event information in their systems, and generate patient-specific medication-level alerts when pharmacists attempt to re-dispense a culprit medication.", 'armGroupLabels': ['ADE information transmitted to PharmaNet']}

Primary Outcomes:
- {'measure': 'Culprit or same-class medication re-dispensing during follow-up', 'description': 'The summary measure will be the proportion of patients with a culprit medication re-dispensation within 12 months. The effect measure will be the between-group difference in the proportion with a 12 month re-dispensation.', 'timeFrame': '12 months'}

Please estimate the sample size based on the assumption: 
We will have >95% power to detect the effect size with α=0.05 (2-sided) using a Z-test with no continuity correction. We anticipate less than 1% loss to follow-up within 12 months. For the secondary trial, we will have at least 80% power to detect risk ratios of 0.70 to 0.85 over a range of non-adherence proportions (0.2 to 0.5).
Sample size
        Based on our pilot work and the emergency department volumes of participating sites, we anticipate recruiting at least 200 patients per month, yielding a minimum of 3600 patients over an 18âmonth recruitment period. A previous study found that 26.6% (95% CI 17.3% to 38.5%) of seniors were re-prescribed a culprit medication within 6âmonths after an adverse drug reaction-related hospitalization [30]. An Ontario database study estimated that 54% of elderly patients were re-exposed to a high-risk medication within 6âmonths of a presentation related to an adverse drug reaction [31]. From our prior work, we anticipate that over one third of our patients will be seniors â¥â80âyears of age [13]. Assuming a re-exposure proportion of 30% in patients â¥â80, and 15% in younger patients, we anticipate 20% of patients being re-exposed to culprit medications over a 12-month period in the control arm. With 3600 patients, we will have >â95% power to detect a 5% absolute reduction (from 20 to 15%) in culprit medication re-dispensing assuming Î±â=â0.05 (2-sided) and approximating the analysis with a test of two proportions (Z-test) with no continuity correction. Through discussion with other clinicians, we believe that an absolute difference of 5% would be the minimal clinically important difference to change practice. Based on a prior study, we anticipate less than 1% loss to follow-up within 12âmonths due to unresolved linkages between Medical Service Plan and PharmaNet data. Although a total sample size of ~â2000 would be adequate (>â80% power) for the primary analysis, we chose to recruit additional patients to allow for exploration of potential treatment effect modification due to the absence of alert overrides in one of the three community pharmacy systems.
        Based on prior estimates of the proportion patients with adverse drug events who are categorized as being due to non-adherence, we anticipate approximately 2000 patients with an index event of non-adherence to accumulate over that time for our secondary trial [4, 32â34]. We will have at least 80% power to detect risk ratios of 0.70 to 0.85 over a range of non-adherence proportions (0.2 to 0.5).