Here is the design of a clinical trial:

Official Title: Zero Self-Harm - a Mobile Phone Application to Reduce Non-suicidal Self-injury: A Randomized Clinical Superiority Trial

Included conditions:
- Self-Injurious Behavior

Study Armgroups:
- {'label': 'Zero Self-Harm', 'type': 'EXPERIMENTAL', 'description': 'When randomized to the Zero Self-Harm app the participants will receive an introduction to the app through videos in the app, which explains, amongst others, how to review previous crisis situations and possible strategies for future crisis. This will ensure the navigation and knowledge of the technicalities of the app, in addition to ensure the app can be used privately without personal guidance from e.g a therapist.', 'interventionNames': ['Device: Zero Self-Harm app']}
- {'label': 'Treatment as usual', 'type': 'NO_INTERVENTION', 'description': 'The control group will continue their present course of treatment and/or counseling at non-profit organizations, service centers in the municipalities, at outpatient treatment services for psychiatric disorders and/or care, attention at emergency departments. They will receive no treatment on the nature of NSSI. Participants in the control group will be offered a possibility to download the Zero Self-Harm app after they have completed the last questionnaire at six months, which will be stressed at the initial appointment as well as after collection of all data.'}

Interventions:
- {'type': 'DEVICE', 'name': 'Zero Self-Harm app', 'description': 'Safety plan app for smartphones', 'armGroupLabels': ['Zero Self-Harm']}

Primary Outcomes:
- {'measure': 'Deliberate Self Harm Inventory', 'description': '17-item self-report questionnaire that assesses various aspects of self harm (defined as the deliberate, direct self-destruction of body tissue without suicidal intent) over specified time periods, including frequency (continuous range) and type of self-harm behavior (e.g. cutting, burning etc.). The DSHI demonstrates adequate test-retest reliability and construct, discriminant validity among non-clinical and patient samples', 'timeFrame': '6 month'}

Please estimate the sample size based on the assumption: 
Power of 90%, type I error probability of 0.05.
Sample size
        Based on previous estimates, a reduction of 3.5 NSSI episodes is expected in the intervention group after the 6-month follow-up compared to participants in the waitlist control group at follow-up after 6 months [28, 43, 44]. A post-intervention standard deviation of 9 is assumed based on previous findings [43, 44]. If the true difference between the intervention and control groups is 3.5, a total of 140 participants should be included in each group in order to reject the null hypothesis with a power of 90% and a type I error probability of 0.05, implying a total of 280 participants.