Here is the design of a clinical trial:

Official Title: Effect of Targeted Analgesia to ANI (Analgesia/ Nociception Index) During General Anesthesia on Immediate Postoperative Pain and Perioperative Hemodynamic: Multicenter Randomized Controlled Study

Included conditions:
- Immediate Severe Postoperative Pain
- Perioperative Hemodynamic

Study Armgroups:
- {'label': 'usual practice', 'type': 'ACTIVE_COMPARATOR', 'description': 'control group (usual practice): patients receiving a general anesthesia with propofol, ketamine and remifentanil with or without curare for the induction, and desflurane and remifentanil (with or without curare) for the maintenance. The dosage of the anesthetic agent, as well as the prophylactic administration of morphine at the end of the intervention, will be decided by the anesthesiologist.', 'interventionNames': ['Drug: Anesthesic agent guided by ANI (Interventional Group)', 'Drug: Administration of the lowest effective concentration of desflurane (Interventional Group)']}
- {'label': 'targeted analgesia to ANI', 'type': 'EXPERIMENTAL', 'description': 'experimental group: patients receiving a general anesthesia with propofol, ketamine and remifentanil with or without curare for the induction, and desflurane and remifentanil (with or without curare) for the maintenance, as well as the prophylactic administration of morphine at the end of the intervention, will be administered according to the ANI.\n\n- In addition, desflurane will be administered with a targeted purpose of minimal alveolar concentration (MAC).', 'interventionNames': ['Drug: Anesthesic agent guided by ANI (Interventional Group)', 'Drug: Administration of the lowest effective concentration of desflurane (Interventional Group)']}

Interventions:
- {'type': 'DRUG', 'name': 'Anesthesic agent guided by ANI (Interventional Group)', 'description': 'Anesthesic agent guided by ANI (Interventional Group) The remifentanil administration will be piloted by the ANI, as well as the prophylactic administration of morphine at the end of the intervention.', 'armGroupLabels': ['targeted analgesia to ANI', 'usual practice']}
- {'type': 'DRUG', 'name': 'Administration of the lowest effective concentration of desflurane (Interventional Group)', 'description': 'Administration of the lowest effective concentration of desflurane (Interventional Group) Desflurane will be administered with a targeted purpose of minimal alveolar concentration (MAC).', 'armGroupLabels': ['targeted analgesia to ANI', 'usual practice']}

Primary Outcomes:
- {'measure': 'immediate maximum postoperative pain in recovery room defined by a score > 3 on a verbally administered numeric rating scale (NRS) variating from 0 to 10.', 'description': 'Once the patient transferred to the recovery room, the assessment of the primary outcome (verbally administered NRS) will be done by the nurse responsible for the patient, when the patient arrives, during the stay and when the patient leaves the recovery room', 'timeFrame': 'From day 0 to day 28'}

Please estimate the sample size based on the assumption: 
90% power, bilateral test with a p value of 5%, interim analysis with a p value of 0.003 using O’Brien-Fleming alpha-spending function
Sample size {14}
          Given the fact that immediate postoperative pain can affect 30% of patients [1], a total of 161 patients per group (322 patients) will give 90% power using a bilateral test with a p value of 5% to detect a 50% reduction in the incidence of immediate postoperative pain (NRS â¤ 3) in patients guided by ANI. Given the specific features of this protocol (essentially the direct transfer from operating theater to continuous monitoring or ICU, use of continuous vasopressors), the final decision is to include a total of 380 patients (190 per group). An interim analysis will be scheduled halfway through the enrolment period (95 patients per group). The p value used to decide withdrawal from the trial on efficacy grounds is set at 0.003 (correction of the OâBrien-Fleming alpha-spending function).