3 {php}html_header_show();{/php}
5 <link rel=
"stylesheet" href=
"{$css_header}" type=
"text/css">
8 <script language=
"JavaScript">
10 function clear_vars() {
11 document
.report
.var1
.value
= "";
12 document
.report
.var2
.value
= "";
15 function dopopup(aurl
) {
17 window
.open(aurl
, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
24 <body bgcolor=
"{$STYLE.BGCOLOR2}">
26 <div id=
"reports_list">
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();
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;
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";
69 //now deal with the reports that are just under myreports, not organized into subdirectories
70 $reportsdir = './myreports/';
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");
81 //print the links for reports under myreports
82 foreach($dir_array as $var) {
90 <a href=
"custom_report_range.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Superbill Report'}
</a>
92 <a href=
"appointments_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Appointments Report'}
</a>
94 <a href=
"encounters_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Encounters Report'}
</a>
97 <a href=
"appt_encounter_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Appointments-Encounters Report'}
</a>
99 {php} if (! $GLOBALS['simplified_demographics']) { {/php}
101 <a href=
"insurance_allocation_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Patient Insurance Distribution Report'}
</a>
103 <a href=
"../billing/indigent_patients_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Indigent Patients Report'}
</a>
105 <a href=
"unique_seen_patients_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Unique Seen Patients Report'}
</a>
107 <a href=
"patient_list.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Patient List'}
</a>
111 {php} if (! $GLOBALS['weight_loss_clinic']) { {/php}
113 <a href=
"front_receipts_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Front Office Receipts Report'}
</a>
118 <a href=
"prescriptions_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Prescriptions Report'}
</a>
120 <a href=
"sales_by_item.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Sales by Product Report'}
</a>
122 <a href=
"collections_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Collections Report'}
</a>
124 <a href=
"referrals_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Referrals Report'}
</a>
126 <a href=
"non_reported.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Non Reported Report'}
</a>
129 {php} if ($GLOBALS['inhouse_pharmacy']) { {/php}
131 <a href=
"destroyed_drugs_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Destroyed Drugs Report'}
</a>
135 <a href=
"receipts_by_method_report.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Receipts by Payment Method Report'}
</a>
139 <a href=
"chart_location_activity.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Chart Check-in/out Activity Report'}
</a>
142 <a href=
"charts_checked_out.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Charts Checked Out'}
</a>
145 <a href=
"services_by_category.php" target=
"_blank" onclick=
"top.restoreSession()">{xl t='Services by Category'}
</a>
148 if ($GLOBALS['athletic_team']) {
150 echo
"<a href='javascript:dopopup(\"players_report.php\
")'>Team Roster</a>\n";
152 echo
"<a href='javascript:dopopup(\"absences_report.php\
")'>Days and Games Missed</a>\n";
154 echo
"<a href='javascript:dopopup(\"football_injury_report.php\
")'>Football Injury Reports</a>\n";
156 echo
"<a href='javascript:dopopup(\"injury_overview_report.php\
")'>Injury Overview Report</a>\n";
159 if (!empty($GLOBALS['code_types']['IPPF'])) {
161 echo
"<a href='javascript:dopopup(\"ippf_statistics.php?t=i\
")'>IPPF Statistics</a>\n";
163 echo
"<a href='javascript:dopopup(\"ippf_statistics.php?t=m\
")'>MA Statistics</a>\n";
170 <a href=
"{$printable_link}" target=
"_blank" onclick=
"top.restoreSession()">[{xl t='printable'}]
</a>
173 <form name=
"report" action=
"index.php" method=
"get" onsubmit=
"return top.restoreSession()">
176 <td>{xl t='Reports'}:
</td>
177 <td>{html_options
onChange=
"clear_vars()" name=
"query_id" selected=$query_id options=$queries}
</td>
178 <td> </td>
179 <td>{xl t='Var1'}:
<input size=
"10" type=
"text" value=
"{$var1}" name=
"var1"></td>
180 <td> </td>
181 <td>{xl t='Var2'}:
<input size=
"10" type=
"text" value=
"{$var2}"name=
"var2"></td>
182 <td> </td>
183 <td>{xl t='Show'}:
</td>
184 <td>{html_options
name=
"show" selected=$show options=$show_options}
<input type=
"submit" value=
"{xl t='Go'}"></td>
187 <td colspan=
"5"><br><h2>{$title}
{$smarty.now|date_format:
"%A, %B %e, %Y"}
</h2></td>
191 {if is_object($pager)}
192 {$pager-
>render($show)}
198 </div> <!-- end of reports_list -->