* @copyright Copyright (c) 2018 Brady Miller * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ require_once("../../globals.php"); require_once("$srcdir/patient.inc"); use OpenEMR\Common\Csrf\CsrfUtils; use OpenEMR\Common\Logging\EventAuditLogger; use OpenEMR\Core\Header; if (isset($_GET["mode"]) && $_GET["mode"] == "authorize") { if (!CsrfUtils::verifyCsrfToken($_GET["csrf_token_form"])) { CsrfUtils::csrfNotVerified(); } EventAuditLogger::instance()->newEvent("authorize", $_SESSION["authUser"], $_SESSION["authProvider"], 1, '', $_GET["pid"]); sqlStatement("update billing set authorized=1 where pid=?", array($_GET["pid"])); sqlStatement("update forms set authorized=1 where pid=?", array($_GET["pid"])); sqlStatement("update pnotes set authorized=1 where pid=?", array($_GET["pid"])); sqlStatement("update transactions set authorized=1 where pid=?", array($_GET["pid"])); } ?> " . text($iter["user"]) . ": " . text($iter["code_text"] . " " . date("n/j/Y", strtotime($iter["date"]))) . "
\n"; } } } //fetch transaction information: if ($res = sqlStatement("select * from transactions where authorized=0 and groupname=?", array($groupname))) { for ($iter = 0; $row = sqlFetchArray($res); $iter++) { $result2[$iter] = $row; } if (!empty($result2)) { foreach ($result2 as $iter) { $authorize[$iter["pid"]]["transaction"] .= "" . text($iter["user"]) . ": " . text($iter["title"] . ": " . strterm($iter["body"], 25) . " " . date("n/j/Y", strtotime($iter["date"]))) . "
\n"; } } } if (empty($GLOBALS['ignore_pnotes_authorization'])) { //fetch pnotes information, exclude ALL deleted notes if ($res = sqlStatement("select * from pnotes where authorized=0 and deleted!=1 and groupname=?", array($groupname))) { for ($iter = 0; $row = sqlFetchArray($res); $iter++) { $result3[$iter] = $row; } if ($result3) { foreach ($result3 as $iter) { $authorize[$iter["pid"]]["pnotes"] .= "" . text($iter["user"]) . ": " . text(strterm($iter["body"], 25) . " " . date("n/j/Y", strtotime($iter["date"]))) . "
\n"; } } } } //fetch forms information: if ($res = sqlStatement("select * from forms where authorized=0 and groupname=?", array($groupname))) { for ($iter = 0; $row = sqlFetchArray($res); $iter++) { $result4[$iter] = $row; } if (!empty($result4)) { foreach ($result4 as $iter) { $authorize[$iter["pid"]]["forms"] .= "" . text($iter["user"]) . ": " . text($iter["form_name"] . " " . date("n/j/Y", strtotime($iter["date"]))) . "
\n"; } } } ?> \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } } ?>
$patient) { $name = getPatientData($ppid); echo "
" . text($name["fname"] . " " . $name["lname"]) . "
" . xlt('Authorize') . "
" . xlt('Billing') . ":
" . $patient["billing"] . "
" . xlt('Transactions') . ":
" . $patient["transaction"] . "
" . xlt('Patient Notes') . ":
" . $patient["pnotes"] . "
" . xlt('Encounter Forms') . ":
" . $patient["forms"] . "