Adult patients with American Society of Anesthesiologists status 1 to 3 after primary total unilateral knee or hip replacement under general anesthesia or with spinal anesthesia that did not include intrathecal opioids were eligible .