Fixed bug in getEncounters that was using User ids instead of Person ids