This study had two parts. In the first part, eligible patients were randomized to either receiving one standard dose of midazolam syrup or placebo syrup before their surgery, with neither the patient nor the study team knowing which patient received the study drug. In the second part, patients who were not eligible to participate in the randomized study or who refused to participate in the randomized study were enrolled in a prospective arm where they knew they were receiving midazolam syrup. In the prospective arm, the doses were based on the patient's weight, and patients were given additional doses of midazolam syrup as necessary to control their anxiety.