4 $sanitize_all_escapes=true;
7 //STOP FAKE REGISTER GLOBALS
8 $fake_register_globals=false;
11 include_once("../../globals.php");
12 include_once("$srcdir/patient.inc");
14 if (isset($_GET["mode"]) && $_GET["mode"] == "authorize") {
15 newEvent("authorize",$_SESSION["authUser"],$_SESSION["authProvider"],1,$_GET["pid"]);
16 sqlStatement("update billing set authorized=1 where pid=?", array($_GET["pid"]) );
17 sqlStatement("update forms set authorized=1 where pid=?", array($_GET["pid"]) );
18 sqlStatement("update pnotes set authorized=1 where pid=?", array($_GET["pid"]) );
19 sqlStatement("update transactions set authorized=1 where pid=?", array($_GET["pid"]) );
25 <?php
html_header_show();?
>
26 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
28 <body
class="body_top">
30 <?php
if ($GLOBALS['concurrent_layout']) { ?
>
31 <a href
="authorizations.php">
33 <a href
="../main.php" target
=Main
>
35 <font
class=title
><?php
echo htmlspecialchars(xl('Authorizations'),ENT_NOQUOTES
); ?
></font
>
36 <font
class=more
><?php
echo htmlspecialchars($tback,ENT_NOQUOTES
); ?
></font
></a
>
44 //fetch billing information:
45 if ($res = sqlStatement("select *, concat(u.fname,' ', u.lname) as user from billing LEFT JOIN users as u on billing.user = u.id where billing.authorized=0 and groupname=?", array ($groupname) )) {
46 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
47 $result[$iter] = $row;
50 foreach ($result as $iter) {
52 $authorize{$iter{"pid"}}{"billing"} .= "<span class=small>" .
53 htmlspecialchars($iter{"user"},ENT_NOQUOTES
) . ": </span><span class=text>" .
54 htmlspecialchars($iter{"code_text"} . " " . date("n/j/Y",strtotime($iter{"date"})),ENT_NOQUOTES
) .
62 //fetch transaction information:
63 if ($res = sqlStatement("select * from transactions where authorized=0 and groupname=?", array($groupname) )) {
64 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
65 $result2[$iter] = $row;
68 foreach ($result2 as $iter) {
70 $authorize{$iter{"pid"}}{"transaction"} .= "<span class=small>" .
71 htmlspecialchars($iter{"user"},ENT_NOQUOTES
) . ": </span><span class=text>" .
72 htmlspecialchars($iter{"title"} . ": " . strterm($iter{"body"},25) . " " . date("n/j/Y",strtotime($iter{"date"})),ENT_NOQUOTES
) .
80 if (empty($GLOBALS['ignore_pnotes_authorization'])) {
81 //fetch pnotes information, exclude ALL deleted notes
82 if ($res = sqlStatement("select * from pnotes where authorized=0 and deleted!=1 and groupname=?", array($groupname) )) {
83 for ($iter = 0;$row = sqlFetchArray($res);$iter++
) $result3[$iter] = $row;
85 foreach ($result3 as $iter) {
86 $authorize{$iter{"pid"}}{"pnotes"} .= "<span class=small>" .
87 htmlspecialchars($iter{"user"},ENT_NOQUOTES
) . ": </span><span class=text>" .
88 htmlspecialchars(strterm($iter{"body"},25) . " " . date("n/j/Y",strtotime($iter{"date"})),ENT_NOQUOTES
) .
95 //fetch forms information:
96 if ($res = sqlStatement("select * from forms where authorized=0 and groupname=?", array($groupname) )) {
97 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
98 $result4[$iter] = $row;
101 foreach ($result4 as $iter) {
103 $authorize{$iter{"pid"}}{"forms"} .= "<span class=small>" .
104 htmlspecialchars($iter{"user"},ENT_NOQUOTES
) . ": </span><span class=text>" .
105 htmlspecialchars($iter{"form_name"} . " " . date("n/j/Y",strtotime($iter{"date"})),ENT_NOQUOTES
) .
114 <table border
=0 cellpadding
=0 cellspacing
=2 width
=100%
>
121 while(list($ppid,$patient) = each($authorize)){
123 $name = getPatientData($ppid);
125 echo "<tr><td valign=top><span class=bold>". htmlspecialchars($name{"fname"} . " " . $name{"lname"},ENT_NOQUOTES
) .
126 "</span><br><a class=link_submit href='authorizations_full.php?mode=authorize&pid=" .
127 htmlspecialchars($ppid,ENT_QUOTES
) . "'>" . htmlspecialchars(xl('Authorize'),ENT_NOQUOTES
) . "</a></td>\n";
128 echo "<td valign=top><span class=bold>".htmlspecialchars(xl('Billing'),ENT_NOQUOTES
).
129 ":</span><span class=text><br>" . $patient{"billing"} . "</td>\n";
130 echo "<td valign=top><span class=bold>".htmlspecialchars(xl('Transactions'),ENT_NOQUOTES
).
131 ":</span><span class=text><br>" . $patient{"transaction"} . "</td>\n";
132 echo "<td valign=top><span class=bold>".htmlspecialchars(xl('Patient Notes'),ENT_NOQUOTES
).
133 ":</span><span class=text><br>" . $patient{"pnotes"} . "</td>\n";
134 echo "<td valign=top><span class=bold>".htmlspecialchars(xl('Encounter Forms'),ENT_NOQUOTES
).
135 ":</span><span class=text><br>" . $patient{"forms"} . "</td>\n";