Even with a gastric bypass, because Percocet is immediate release, the bypass should have no impact on the test results.
Was the test an in office screen and/or was the urine test sent out for confirmatory/quantitative testing? If the test was just an in office screen, the threshold levels for detection may have been too high. However if it was sent out for confirmatory/quantitative testing, the Percocet should have turned up, since those tests look specifically for the metabolites of the Percocet and the levels and have a much lower threshold. Do you consume large quantities of water daily? That could cause a flushing out of the Percocet if you drank large quantities of liquids before the test.