Ejemplo n.º 1
0
Form::unsetSession();
/**
 * Prevent user from aborting script
 */
$oldAbort = ignore_user_abort(true);
/**
 * Update patient
 */
$patQ = new Query_Page_Patient();
if ($patQ->existName($pat->getFirstName(), $pat->getSurname1(), $pat->getSurname2(), $pat->getIdPatient())) {
    $patQ->close();
    FlashMsg::add(sprintf(_("O nome do beneficiário, %s, está em uso. As mudanças não terão efeito."), $patName), OPEN_MSG_WARNING);
    header("Location: " . $returnLocation);
    exit;
}
$patQ->update($pat);
$patQ->close();
unset($patQ);
unset($pat);
/**
 * Record log process
 */
$recordQ = new Query_Page_Record();
$recordQ->log("Query_Page_Patient", "UPDATE", array($idPatient));
$recordQ->close();
unset($recordQ);
/**
 * Reset abort setting
 */
ignore_user_abort($oldAbort);
/**