Inclusion Criteria:  Patient must have a BMI > 40 kg/m2 Patient must have radiographic evidence of hip or knee joint arthritis Patient must have exhausted conservative measures to treat hip or knee joint arthritis (NSAIDS, physical therapy, corticosteroid injections) and be interested in TJA as a treatment option Patient must be willing to be randomized to either the bariatric surgery program or the medical weight loss program Patient must be able to consent for him or herself or have a legal representative who can attest that the patient fully understands the purpose, risks, benefits, and alternatives of the study  Exclusion Criteria:  Patient has undergone prior laparoscopic sleeve gastrectomy or gastric bypass Patient has undergone prior hip or knee joint replacement for the affected joint Active substance use disorder Females with child-bearing potential