Added lastEncounter method to EmrUtils