You must integrate over all the iso-potential homoeoidal shells between you and the centre of the distribution. Check out the result . Try as I might, the integral doesn't get any prettier than this, and there's no hope of getting a result that can be analytically integrated. So I resorted to numerics sooner rather than later. I calculate the deflection using Simpson's Rule to approximate to the integral.
Higher accuracy takes longer, of course.
A 2-d array of real numbers large enough to hold a, say, 1024x1024 image, is a lot of memory. Here's an example of lensing a spherical background source past two elliptical singular isothermal spheres. A s you can see, the elliptical lensing works quite well. It really adds a touch of reality to the simulations.