// end if if (count($relArray) == 0) { echo Msg::info(_("No relatives defined for this patient.")); include_once "../layout/footer.php"; exit; } echo HTML::rule(); echo HTML::section(2, _("Relatives List:")); $thead = array(_("#"), _("Function") => array('colspan' => $_SESSION['auth']['is_administrative'] ? 2 : 1), _("Surname 1"), _("Surname 2"), _("First Name")); $options = array(0 => array('align' => 'right')); $patQ = new Query_Page_Patient(); $patQ->captureError(true); $tbody = array(); for ($i = 0; $i < count($relArray); $i++) { $patQ->select($relArray[$i]); if ($patQ->isError()) { Error::query($patQ, false); continue; } $pat = $patQ->fetch(); if (!$pat) { $patQ->close(); Error::fetch($patQ); } $relName = $pat->getFirstName() . " " . $pat->getSurname1() . " " . $pat->getSurname2(); $row = $i + 1 . '.'; $row .= OPEN_SEPARATOR; $row .= HTML::link(HTML::image('../img/action_view.png', _("view")), '../medical/patient_view.php', array('id_patient' => $pat->getIdPatient())); $row .= OPEN_SEPARATOR; if ($_SESSION['auth']['is_administrative']) { $row .= HTML::link(HTML::image('../img/action_delete.png', _("delete")), '../medical/relative_del_confirm.php', array('id_patient' => $idPatient, 'id_relative' => $pat->getIdPatient()));