Inclusion Criteria:  Patients:  Age 18 years or over. Undergoing elective surgery of complexity sufficient to warrant postoperative critical care admission (major/complex major surgery) Must be able to give written informed consent to participate  Clinicians:  1. Must be regularly involved in the care of postoperative patients in critical care.  Exclusion Criteria:  Active treatment for bronchospasm preceding deployment of the electronic prompt, defined as patient receiving bronchodilator therapy or Magnesium infusion. Any documented allergy or intolerance to any preparation of supplemental Magnesium. Serum Magnesium result > 1.5 or < 0.5 mmol/L on blood tests obtained during critical care admission . Pregnancy Atrial Fibrillation on initial arrival to critical care.