/** * gets all the events in the episode for the event type this API is for, for the given patient, most recent first. * * @param Patient $patient - the patient * @param Episode $episode - the episode * * @return array - list of events of the type for this API instance */ public function getEventsInEpisode($patient, $episode) { $event_type = $this->getEventType(); if ($episode) { return $episode->getAllEventsByType($event_type->id); } return array(); }