Fixed bug with ‘accessibility’ being slow due to large number of
patient ids being returned in queries