public function getLatestFollowUp($patient)
{
$ticket_service = Yii::app()->service->getService(self::$TICKET_SERVICE);
$tickets = $ticket_service->getTicketsForPatient($patient);
foreach ($tickets as $ticket) {
if ($follow_up = $this->getFollowUpFromAutoSave($patient->id, $ticket->current_queue->id)) {
return $follow_up;
} elseif ($follow_up = $this->getFollowUp($ticket->id)) {
return $follow_up;
}
}
return false;
}