Exemplo n.º 1
0
}
/**
 * Show page
 */
$title = _("Medical Problems Report");
$titlePage = $patient->getName() . ' (' . $title . ')';
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => "../medical/index.php", $patient->getName() => "../medical/patient_view.php", $title => "");
echo HTML::breadcrumb($links, "icon icon_patient");
unset($links);
echo $patient->getHeader();
$problemQ = new Query_Page_Problem();
$lastOrderNumber = $problemQ->getLastOrderNumber($idPatient);
if ($_SESSION['auth']['is_administrative']) {
    echo HTML::para(HTML::link(_("Add New Medical Problem"), '../medical/problem_new_form.php', array('id_patient' => $idPatient, 'order_number' => $lastOrderNumber)));
}
echo HTML::rule();
echo HTML::section(2, _("Medical Problems List:"));
if (!$problemQ->selectProblems($idPatient)) {
    $problemQ->close();
    echo Msg::info(_("No medical problems defined for this patient."));
    include_once "../layout/footer.php";
    exit;
}
$thead = array(_("Order Number"), _("Function") => array('colspan' => $_SESSION['auth']['is_administrative'] ? 5 : 3), _("Wording"), _("Opening Date"), _("Last Update Date"));
$options = array(0 => array('align' => 'right'));
$tbody = array();
while ($problem = $problemQ->fetch()) {