updated the way patient_lists are processed