minor bug fix
[openemr.git] / templates / report / general_default.html
blob8f7d3c3f520b2e3683e9d2bd360fa342f83bd143
1 <html>
2 <head>
3 {php}html_header_show();{/php}
5 <link rel="stylesheet" href="{$css_header}" type="text/css">
6 {literal}
8 <script language="JavaScript">
10 function clear_vars() {
11 document.report.var1.value = "";
12 document.report.var2.value = "";
15 function dopopup(aurl) {
16 top.restoreSession();
17 window.open(aurl, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
20 </script>
22 {/literal}
23 </head>
24 <body bgcolor="{$STYLE.BGCOLOR2}">
26 <div id="reports_list">
27 {php}
28 //get directories that might contain reports
29 $reportsdir = './myreports/';
30 if (is_dir($reportsdir)) {
31 $folder_array = array();
32 if ($handle = opendir($reportsdir)) {
33 while (false !== ($file = readdir($handle))) {
34 if ($file != '.' && $file != '..' && is_dir($reportsdir.$file)) {
35 $folder_array[$file] = array();
38 closedir($handle);
41 //fill elements of $folder_array with the php files in each directory
42 foreach ($folder_array as $key => $val) {
43 $reportsubdir = $reportsdir.$key.'/';
44 if ($handle = opendir($reportsubdir)) {
45 while (false !== ($file = readdir($handle))) {
46 if ($file != '.' && $file != '..' && substr($file,-4,4) == '.php') {
47 //if ($file != '.' && $file != '..') {
48 $filename = substr($file,0,strlen($file)-4);
49 $folder_array[$key][$filename] = $GLOBALS['webroot'].'/interface/reports/myreports/'.$key.'/'.$file;
52 closedir($handle);
55 //generate drop down menus
56 echo "<FORM METHOD=POST NAME=choose>\n";
57 foreach ($folder_array as $title => $link) {
58 if (count($link) > 0) { //only create menus for those subdirectories with php reports in them
59 echo "<select name=" . $title. " onchange='top.restoreSession();window.open(document.choose.".$title.".options[document.choose.".$title.".selectedIndex].value);".$title.".selectedIndex = 0'>\n";
60 echo "<option value=".$GLOBALS['webroot'].'/interface/reports/myreports/'.$title.">".xl($title)."</option>\n";
61 foreach ($link as $eachlink_name => $eachlink) {
62 echo "<option value='".$eachlink."'>".xl($eachlink_name)."</option>\n";
64 echo "</select><br>\n";
67 echo "</FORM>\n";
69 //now deal with the reports that are just under myreports, not organized into subdirectories
70 $reportsdir = './myreports/';
71 $dir_array = array();
72 if ($handle = opendir($reportsdir)) {
73 while (false !== ($file = readdir($handle))) {
74 if ($file != '.' && $file != '..' && substr($file,-4,4) == '.php') {
75 $filename = substr($file,0,strlen($file)-4);
76 array_push($dir_array,"<a href='$reportsdir$file' target='_blank' onclick='top.restoreSession()'>".xl($filename)."</a><br>\n");
79 closedir($handle);
81 //print the links for reports under myreports
82 foreach($dir_array as $var) {
83 echo $var;
86 {/php}
88 <ul>
89 <li>
90 <a href="custom_report_range.php" target="_blank" onclick="top.restoreSession()">{xl t='Superbill Report'}</a>
91 </li><li>
92 <a href="appointments_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Appointments Report'}</a>
93 </li><li>
94 <a href="encounters_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Encounters Report'}</a>
95 <br/>
96 </li><li>
97 <a href="appt_encounter_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Appointments-Encounters Report'}</a>
98 </li>
99 {php} if (! $GLOBALS['simplified_demographics']) { {/php}
100 <li>
101 <a href="insurance_allocation_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Patient Insurance Distribution Report'}</a>
102 </li><li>
103 <a href="../billing/indigent_patients_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Indigent Patients Report'}</a>
104 </li><li>
105 <a href="unique_seen_patients_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Unique Seen Patients Report'}</a>
106 </li><li>
107 <a href="patient_list.php" target="_blank" onclick="top.restoreSession()">{xl t='Patient List'}</a>
108 </li>
109 {php} } {/php}
111 {php} if (! $GLOBALS['weight_loss_clinic']) { {/php}
112 <li>
113 <a href="front_receipts_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Front Office Receipts Report'}</a>
114 </li>
115 {php} } {/php}
117 <li>
118 <a href="prescriptions_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Prescriptions Report'}</a>
119 </li><li>
120 <a href="sales_by_item.php" target="_blank" onclick="top.restoreSession()">{xl t='Sales by Product Report'}</a>
121 </li><li>
122 <a href="collections_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Collections Report'}</a>
123 </li><li>
124 <a href="referrals_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Referrals Report'}</a>
125 </li><li>
126 <a href="non_reported.php" target="_blank" onclick="top.restoreSession()">{xl t='Non Reported Report'}</a>
127 </li>
129 {php} if ($GLOBALS['inhouse_pharmacy']) { {/php}
130 <li>
131 <a href="destroyed_drugs_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Destroyed Drugs Report'}</a>
132 </li>
133 {php} } {/php}
134 <li>
135 <a href="receipts_by_method_report.php" target="_blank" onclick="top.restoreSession()">{xl t='Receipts by Payment Method Report'}</a>
136 </li>
137 <!-- </ul> -->
138 <li>
139 <a href="chart_location_activity.php" target="_blank" onclick="top.restoreSession()">{xl t='Chart Check-in/out Activity Report'}</a>
140 </li>
141 <li>
142 <a href="charts_checked_out.php" target="_blank" onclick="top.restoreSession()">{xl t='Charts Checked Out'}</a>
143 </li>
144 <li>
145 <a href="services_by_category.php" target="_blank" onclick="top.restoreSession()">{xl t='Services by Category'}</a>
146 </li>
147 {php}
148 if ($GLOBALS['athletic_team']) {
149 echo "<li>\n";
150 echo "<a href='javascript:dopopup(\"players_report.php\")'>Team Roster</a>\n";
151 echo "</li><li>\n";
152 echo "<a href='javascript:dopopup(\"absences_report.php\")'>Days and Games Missed</a>\n";
153 echo "</li><li>\n";
154 echo "<a href='javascript:dopopup(\"football_injury_report.php\")'>Football Injury Reports</a>\n";
155 echo "</li><li>\n";
156 echo "<a href='javascript:dopopup(\"injury_overview_report.php\")'>Injury Overview Report</a>\n";
157 echo "</li>\n";
159 if (!empty($GLOBALS['code_types']['IPPF'])) {
160 echo "<li>\n";
161 echo "<a href='javascript:dopopup(\"ippf_statistics.php?t=i\")'>IPPF Statistics</a>\n";
162 echo "</li><li>\n";
163 echo "<a href='javascript:dopopup(\"ippf_statistics.php?t=m\")'>MA Statistics</a>\n";
164 echo "</li>\n";
166 {/php}
168 </ul>
170 <a href="{$printable_link}" target="_blank" onclick="top.restoreSession()">[{xl t='printable'}]</a>
171 &nbsp;
172 <br/>
173 <form name="report" action="index.php" method="get" onsubmit="return top.restoreSession()">
174 <table>
175 <tr>
176 <td>{xl t='Reports'}:</td>
177 <td>{html_options onChange="clear_vars()" name="query_id" selected=$query_id options=$queries}</td>
178 <td>&nbsp;&nbsp;</td>
179 <td>{xl t='Var1'}:&nbsp;<input size="10" type="text" value="{$var1}" name="var1"></td>
180 <td>&nbsp;&nbsp;</td>
181 <td>{xl t='Var2'}:&nbsp;<input size="10" type="text" value="{$var2}"name="var2"></td>
182 <td>&nbsp;&nbsp;</td>
183 <td>{xl t='Show'}:&nbsp;</td>
184 <td>{html_options name="show" selected=$show options=$show_options}<input type="submit" value="{xl t='Go'}"></td>
185 </tr>
186 <tr>
187 <td colspan="5"><br><h2>{$title}&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.now|date_format:"%A, %B %e, %Y"}</h2></td>
188 </tr>
189 <tr>
190 <td colspan="5">
191 {if is_object($pager)}
192 {$pager->render($show)}
193 {/if}
194 </td>
195 </tr>
196 </table>
197 </form>
198 </div> <!-- end of reports_list -->
199 </body>
200 </html>