Fix performance of patient list endpoint