added back in some basic started data This is added only on initial installation...
[openemr.git] / interface / main / authorizations / authorizations_full.php
blobe748a250cb9ae9c30effbfec74625f3c948111e2
1 <?
2 include_once("../../globals.php");
4 include_once("$srcdir/patient.inc");
9 if (isset($_GET["mode"]) && $_GET["mode"] == "authorize") {
10 newEvent("view",$_SESSION["authUser"],$_SESSION["authProvider"],$_GET["pid"]);
11 sqlStatement("update billing set authorized=1 where pid='".$_GET["pid"]."'");
12 sqlStatement("update forms set authorized=1 where pid='".$_GET["pid"]."'");
13 sqlStatement("update pnotes set authorized=1 where pid='".$_GET["pid"]."'");
14 sqlStatement("update transactions set authorized=1 where pid='".$_GET["pid"]."'");
22 <html>
23 <head>
26 <link rel=stylesheet href="<?echo $css_header;?>" type="text/css">
28 </head>
29 <body <?echo $top_bg_line;?> topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0>
31 <a href="../main.php" target=Main><font class=title>Authorizations</font><font class=more><?echo $tback;?></font></a>
34 // billing
35 // forms
36 // pnotes
37 // transactions
39 //fetch billing information:
40 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='$groupname'")) {
41 for ($iter = 0;$row = sqlFetchArray($res);$iter++)
42 $result[$iter] = $row;
44 if ($result) {
45 foreach ($result as $iter) {
47 $authorize{$iter{"pid"}}{"billing"} .= "<span class=small>" . $iter{"user"} . ": </span><span class=text>" . $iter{"code_text"} . " " . date("n/j/Y",strtotime($iter{"date"})) . "</span><br>\n";
52 //$authorize[$iter{"pid"}]{"billing"} = substr($authorize[$iter{"pid"}]{"billing"},0,strlen($authorize[$iter{"pid"}]{"billing"}));
58 //fetch transaction information:
59 if ($res = sqlStatement("select * from transactions where authorized=0 and groupname='$groupname'")) {
60 for ($iter = 0;$row = sqlFetchArray($res);$iter++)
61 $result2[$iter] = $row;
63 if ($result2) {
64 foreach ($result2 as $iter) {
66 $authorize{$iter{"pid"}}{"transaction"} .= "<span class=small>" . $iter{"user"} . ": </span><span class=text>" . $iter{"title"} . ": " . strterm($iter{"body"},25) . " " . date("n/j/Y",strtotime($iter{"date"})) . "</span><br>\n";
71 //$authorize[$iter{"pid"}]{"transaction"} = substr($authorize[$iter{"pid"}]{"transaction"},0,strlen($authorize[$iter{"pid"}]{"transaction"}));
77 //fetch pnotes information:
78 if ($res = sqlStatement("select * from pnotes where authorized=0 and groupname='$groupname'")) {
79 for ($iter = 0;$row = sqlFetchArray($res);$iter++)
80 $result3[$iter] = $row;
82 if ($result3) {
83 foreach ($result3 as $iter) {
85 $authorize{$iter{"pid"}}{"pnotes"} .= "<span class=small>" . $iter{"user"} . ": </span><span class=text>" . strterm($iter{"body"},25) . " " . date("n/j/Y",strtotime($iter{"date"})) . "</span><br>\n";
90 //$authorize[$iter{"pid"}]{"pnotes"} = substr($authorize[$iter{"pid"}]{"pnotes"},0,strlen($authorize[$iter{"pid"}]{"pnotes"}));
97 //fetch forms information:
98 if ($res = sqlStatement("select * from forms where authorized=0 and groupname='$groupname'")) {
99 for ($iter = 0;$row = sqlFetchArray($res);$iter++)
100 $result4[$iter] = $row;
102 if ($result4) {
103 foreach ($result4 as $iter) {
105 $authorize{$iter{"pid"}}{"forms"} .= "<span class=small>" . $iter{"user"} . ": </span><span class=text>" . $iter{"form_name"} . " " . date("n/j/Y",strtotime($iter{"date"})) . "</span><br>\n";
110 //$authorize[$iter{"pid"}]{"forms"} = substr($authorize[$iter{"pid"}]{"forms"},0,strlen($authorize[$iter{"pid"}]{"forms"}));
120 <table border=0 cellpadding=0 cellspacing=2 width=100%>
121 <tr>
122 <td valign=top>
126 if ($authorize) {
128 while(list($ppid,$patient) = each($authorize)){
130 $name = getPatientData($ppid);
132 echo "<tr><td valign=top><span class=bold>". $name{"fname"} . " " . $name{"lname"} ."</span><br><a class=link_submit href='authorizations.php?mode=authorize&pid=$ppid'>".xl('Authorize')."</a></td>\n";
133 echo "<td valign=top><span class=bold>".xl('Billing').":</span><span class=text><br>" . $patient{"billing"} . "</td>\n";
135 echo "<td valign=top><span class=bold>".xl('Transactions').":</span><span class=text><br>" . $patient{"transaction"} . "</td>\n";
137 echo "<td valign=top><span class=bold>".xl('Patient Notes').":</span><span class=text><br>" . $patient{"pnotes"} . "</td>\n";
139 echo "<td valign=top><span class=bold>".xl('Encounter Forms').":</span><span class=text><br>" . $patient{"forms"} . "</td>\n";
140 echo "</tr>\n";
141 $count++;
147 </td>
150 </tr>
151 </table>
157 </body>
158 </html>