Improved/optimized CDR engine reports (and patient reminders) and added a
[openemr.git] / interface / reports / cqm.php
blobf999d2727c68c5351373a5c3a8f1457000202377
1 <?php
2 // Copyright (C) 2010 Brady Miller <brady@sparmy.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 //SANITIZE ALL ESCAPES
10 $sanitize_all_escapes=true;
13 //STOP FAKE REGISTER GLOBALS
14 $fake_register_globals=false;
17 require_once("../globals.php");
18 require_once("../../library/patient.inc");
19 require_once("$srcdir/formatting.inc.php");
20 require_once "$srcdir/options.inc.php";
21 require_once "$srcdir/formdata.inc.php";
22 require_once "$srcdir/clinical_rules.php";
23 require_once "$srcdir/report_database.inc";
25 // This is only pertinent for users of php versions less than 5.2
26 // (ie. this wrapper is only loaded when php version is less than
27 // 5.2; otherwise the native php json functions are used)
28 require_once "$srcdir/jsonwrapper/jsonwrapper.php";
30 // See if showing an old report or creating a new report
31 $report_id = (isset($_GET['report_id'])) ? trim($_GET['report_id']) : "";
33 // Collect the back variable, if pertinent
34 $back_link = (isset($_GET['back'])) ? trim($_GET['back']) : "";
36 // If showing an old report, then collect information
37 if (!empty($report_id)) {
38 $report_view = collectReportDatabase($report_id);
39 $date_report = $report_view['date_report'];
40 $type_report = $report_view['type'];
41 $type_report = (($type_report == "amc") || ($type_report == "cqm")) ? $type_report : "standard";
42 $rule_filter = $report_view['type'];
43 if ($type_report == "amc") {
44 $begin_date = $report_view['date_begin'];
45 $labs_manual = $report_view['labs_manual'];
47 $target_date = $report_view['date_target'];
48 $plan_filter = $report_view['plan'];
49 $organize_method = $report_view['organize_mode'];
50 $provider = $report_view['provider'];
51 $pat_prov_rel = $report_view['pat_prov_rel'];
52 $dataSheet = json_decode($report_view['data'],TRUE);
54 else {
55 // Collect report type parameter (standard, amc, or cqm)
56 $type_report = (isset($_GET['type'])) ? trim($_GET['type']) : "standard";
57 // Collect form parameters (set defaults if empty)
58 if ($type_report == "amc") {
59 $begin_date = (isset($_POST['form_begin_date'])) ? trim($_POST['form_begin_date']) : "";
60 $labs_manual = (isset($_POST['labs_manual_entry'])) ? trim($_POST['labs_manual_entry']) : "0";
62 $target_date = (isset($_POST['form_target_date'])) ? trim($_POST['form_target_date']) : date('Y-m-d H:i:s');
63 $rule_filter = (isset($_POST['form_rule_filter'])) ? trim($_POST['form_rule_filter']) : "";
64 $plan_filter = (isset($_POST['form_plan_filter'])) ? trim($_POST['form_plan_filter']) : "";
65 $organize_method = (empty($plan_filter)) ? "default" : "plans";
66 $provider = trim($_POST['form_provider']);
67 $pat_prov_rel = (empty($_POST['form_pat_prov_rel'])) ? "primary" : trim($_POST['form_pat_prov_rel']);
71 <html>
73 <head>
74 <?php html_header_show();?>
76 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
78 <?php if ($type_report == "standard") { ?>
79 <title><?php echo htmlspecialchars( xl('Standard Measures'), ENT_NOQUOTES); ?></title>
80 <?php } ?>
81 <?php if ($type_report == "cqm") { ?>
82 <title><?php echo htmlspecialchars( xl('Clinical Quality Measures (CQM)'), ENT_NOQUOTES); ?></title>
83 <?php } ?>
84 <?php if ($type_report == "amc") { ?>
85 <title><?php echo htmlspecialchars( xl('Automated Measure Calculations (AMC)'), ENT_NOQUOTES); ?></title>
86 <?php } ?>
88 <script type="text/javascript" src="../../library/overlib_mini.js"></script>
89 <script type="text/javascript" src="../../library/textformat.js"></script>
90 <script type="text/javascript" src="../../library/dialog.js"></script>
91 <script type="text/javascript" src="../../library/js/jquery.1.3.2.js"></script>
93 <script LANGUAGE="JavaScript">
95 var mypcc = '<?php echo $GLOBALS['phone_country_code'] ?>';
97 function runReport() {
98 // Showing processing wheel
99 $("#processing").show();
101 // hide Submit buttons
102 $("#submit_button").hide();
103 $("#xmla_button").hide();
104 $("#xmlb_button").hide();
106 // hide instructions
107 $("#instructions_text").hide();
109 // Collect an id string via an ajax request
110 top.restoreSession();
111 $.get("../../library/ajax/collect_new_report_id.php",
112 function(data){
113 // Set the report id in page form
114 $("#form_new_report_id").attr("value",data);
116 // Start collection status checks
117 collectStatus($("#form_new_report_id").val());
119 // Run the report
120 top.restoreSession();
121 $.post("../../library/ajax/execute_cdr_report.php",
122 {provider: $("#form_provider").val(),
123 type: $("#form_rule_filter").val(),
124 date_target: $("#form_target_date").val(),
125 date_begin: $("#form_begin_date").val(),
126 plan: $("#form_plan_filter").val(),
127 labs: $("#labs_manual_entry").val(),
128 pat_prov_rel: $("#form_pat_prov_rel").val(),
129 execute_report_id: $("#form_new_report_id").val()
134 function collectStatus(report_id) {
135 // Collect the status string via an ajax request and place in DOM at timed intervals
136 top.restoreSession();
137 // Do not send the skip_timeout_reset parameter, so don't close window before report is done.
138 $.post("../../library/ajax/status_report.php",
139 {status_report_id: report_id},
140 function(data){
141 if (data == "PENDING") {
142 // Place the pending string in the DOM
143 $('#status_span').replaceWith("<span id='status_span'><?php echo xlt("Preparing To Run Report"); ?></span>");
145 else if (data == "COMPLETE") {
146 // Go into the results page
147 top.restoreSession();
148 link_report = "cqm.php?report_id="+report_id;
149 window.open(link_report,'_self',false);
150 //$("#processing").hide();
151 //$('#status_span').replaceWith("<a id='view_button' href='cqm.php?report_id="+report_id+"' class='css_button' onclick='top.restoreSession()'><span><?php echo xlt('View Report'); ?></span></a>");
153 else {
154 // Place the string in the DOM
155 $('#status_span').replaceWith("<span id='status_span'>"+data+"</span>");
158 // run status check every 10 seconds
159 var repeater = setTimeout("collectStatus("+report_id+")", 10000);
162 function GenXml(sNested) {
163 top.restoreSession();
164 var sLoc = '../../custom/export_registry_xml.php?&target_date=' + theform.form_target_date.value + '&nested=' + sNested;
165 dlgopen(sLoc, '_blank', 600, 500);
166 return false;
169 </script>
171 <style type="text/css">
173 /* specifically include & exclude from printing */
174 @media print {
175 #report_parameters {
176 visibility: hidden;
177 display: none;
179 #report_parameters_daterange {
180 visibility: visible;
181 display: inline;
183 #report_results table {
184 margin-top: 0px;
188 /* specifically exclude some from the screen */
189 @media screen {
190 #report_parameters_daterange {
191 visibility: hidden;
192 display: none;
196 </style>
197 </head>
199 <body class="body_top">
201 <!-- Required for the popup date selectors -->
202 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
204 <span class='title'><?php echo htmlspecialchars( xl('Report'), ENT_NOQUOTES); ?> -
206 <?php if ($type_report == "standard") { ?>
207 <?php echo htmlspecialchars( xl('Standard Measures'), ENT_NOQUOTES); ?>
208 <?php } ?>
209 <?php if ($type_report == "cqm") { ?>
210 <?php echo htmlspecialchars( xl('Clinical Quality Measures (CQM)'), ENT_NOQUOTES); ?>
211 <?php } ?>
212 <?php if ($type_report == "amc") { ?>
213 <?php echo htmlspecialchars( xl('Automated Measure Calculations (AMC)'), ENT_NOQUOTES); ?>
214 <?php } ?>
216 <?php if (!empty($report_id)) { ?>
217 <?php echo " - " . xlt('Date of Report') . ": " . text($date_report);
218 //prepare to disable form elements
219 $dis_text = " disabled='disabled' ";
221 <?php } ?>
223 </span>
225 <form method='post' name='theform' id='theform' action='cqm.php?type=<?php echo htmlspecialchars($type_report,ENT_QUOTES) ;?>' onsubmit='return top.restoreSession()'>
227 <div id="report_parameters">
229 <table>
230 <tr>
231 <td width='470px'>
232 <div style='float:left'>
234 <table class='text'>
236 <?php if ($type_report == "amc") { ?>
237 <tr>
238 <td class='label'>
239 <?php echo htmlspecialchars( xl('Begin Date'), ENT_NOQUOTES); ?>:
240 </td>
241 <td>
242 <input <?php echo $dis_text; ?> type='text' name='form_begin_date' id="form_begin_date" size='20' value='<?php echo htmlspecialchars( $begin_date, ENT_QUOTES); ?>'
243 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' title='<?php echo htmlspecialchars( xl('yyyy-mm-dd hh:mm:ss'), ENT_QUOTES); ?>'>
244 <?php if (empty($report_id)) { ?>
245 <img src='../pic/show_calendar.gif' align='absbottom' width='24' height='22'
246 id='img_begin_date' border='0' alt='[?]' style='cursor:pointer'
247 title='<?php echo htmlspecialchars( xl('Click here to choose a date'), ENT_QUOTES); ?>'>
248 <?php } ?>
249 </td>
250 </tr>
251 <?php } ?>
253 <tr>
254 <td class='label'>
255 <?php if ($type_report == "amc") { ?>
256 <?php echo htmlspecialchars( xl('End Date'), ENT_NOQUOTES); ?>:
257 <?php } else { ?>
258 <?php echo htmlspecialchars( xl('Target Date'), ENT_NOQUOTES); ?>:
259 <?php } ?>
260 </td>
261 <td>
262 <input <?php echo $dis_text; ?> type='text' name='form_target_date' id="form_target_date" size='20' value='<?php echo htmlspecialchars( $target_date, ENT_QUOTES); ?>'
263 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' title='<?php echo htmlspecialchars( xl('yyyy-mm-dd hh:mm:ss'), ENT_QUOTES); ?>'>
264 <?php if (empty($report_id)) { ?>
265 <img src='../pic/show_calendar.gif' align='absbottom' width='24' height='22'
266 id='img_target_date' border='0' alt='[?]' style='cursor:pointer'
267 title='<?php echo htmlspecialchars( xl('Click here to choose a date'), ENT_QUOTES); ?>'>
268 <?php } ?>
269 </td>
270 </tr>
272 <?php if ($type_report == "cqm") { ?>
273 <input type='hidden' id='form_rule_filter' name='form_rule_filter' value='cqm'>
274 <?php } ?>
275 <?php if ($type_report == "amc") { ?>
276 <input type='hidden' id='form_rule_filter' name='form_rule_filter' value='amc'>
277 <?php } ?>
278 <?php if ($type_report == "standard") { ?>
279 <tr>
280 <td class='label'>
281 <?php echo htmlspecialchars( xl('Rule Set'), ENT_NOQUOTES); ?>:
282 </td>
283 <td>
284 <select <?php echo $dis_text; ?> id='form_rule_filter' name='form_rule_filter'>
285 <option value='passive_alert' <?php if ($rule_filter == "passive_alert") echo "selected"; ?>>
286 <?php echo htmlspecialchars( xl('Passive Alert Rules'), ENT_NOQUOTES); ?></option>
287 <option value='active_alert' <?php if ($rule_filter == "active_alert") echo "selected"; ?>>
288 <?php echo htmlspecialchars( xl('Active Alert Rules'), ENT_NOQUOTES); ?></option>
289 <option value='patient_reminder' <?php if ($rule_filter == "patient_reminder") echo "selected"; ?>>
290 <?php echo htmlspecialchars( xl('Patient Reminder Rules'), ENT_NOQUOTES); ?></option>
291 </select>
292 </td>
293 </tr>
294 <?php } ?>
296 <?php if ($type_report == "amc") { ?>
297 <input type='hidden' id='form_plan_filter' name='form_plan_filter' value=''>
298 <?php } else { ?>
299 <tr>
300 <td class='label'>
301 <?php echo htmlspecialchars( xl('Plan Set'), ENT_NOQUOTES); ?>:
302 </td>
303 <td>
304 <select <?php echo $dis_text; ?> id='form_plan_filter' name='form_plan_filter'>
305 <option value=''>-- <?php echo htmlspecialchars( xl('Ignore'), ENT_NOQUOTES); ?> --</option>
306 <?php if ($type_report == "cqm") { ?>
307 <option value='cqm' <?php if ($plan_filter == "cqm") echo "selected"; ?>>
308 <?php echo htmlspecialchars( xl('Official Clinical Quality Measures (CQM) Measure Groups'), ENT_NOQUOTES); ?></option>
309 <?php } ?>
310 <?php if ($type_report == "standard") { ?>
311 <option value='normal' <?php if ($plan_filter == "normal") echo "selected"; ?>>
312 <?php echo htmlspecialchars( xl('Active Plans'), ENT_NOQUOTES); ?></option>
313 <?php } ?>
314 </td>
315 </tr>
316 <?php } ?>
318 <tr>
319 <td class='label'>
320 <?php echo htmlspecialchars( xl('Provider'), ENT_NOQUOTES); ?>:
321 </td>
322 <td>
323 <?php
325 // Build a drop-down list of providers.
328 $query = "SELECT id, lname, fname FROM users WHERE ".
329 "authorized = 1 $provider_facility_filter ORDER BY lname, fname"; //(CHEMED) facility filter
331 $ures = sqlStatement($query);
333 echo " <select " . $dis_text . " id='form_provider' name='form_provider'>\n";
334 echo " <option value=''>-- " . htmlspecialchars( xl('All (Cumulative)'), ENT_NOQUOTES) . " --\n";
336 echo " <option value='collate_outer'";
337 if ($provider == 'collate_outer') echo " selected";
338 echo ">-- " . htmlspecialchars( xl('All (Collated Format A)'), ENT_NOQUOTES) . " --\n";
340 echo " <option value='collate_inner'";
341 if ($provider == 'collate_inner') echo " selected";
342 echo ">-- " . htmlspecialchars( xl('All (Collated Format B)'), ENT_NOQUOTES) . " --\n";
344 while ($urow = sqlFetchArray($ures)) {
345 $provid = $urow['id'];
346 echo " <option value='".htmlspecialchars( $provid, ENT_QUOTES)."'";
347 if ($provid == $provider) echo " selected";
348 echo ">" . htmlspecialchars( $urow['lname'] . ", " . $urow['fname'], ENT_NOQUOTES) . "\n";
351 echo " </select>\n";
354 </td>
355 </tr>
357 <tr>
358 <td class='label'>
359 <?php echo htmlspecialchars( xl('Provider Relationship'), ENT_NOQUOTES); ?>:
360 </td>
361 <td>
362 <?php
364 // Build a drop-down list of of patient provider relationships.
366 echo " <select ". $dis_text ." id='form_pat_prov_rel' name='form_pat_prov_rel' title='" . xlt('Only applicable if a provider or collated list was chosen above. PRIMARY only selects patients that the provider is the primary provider. ENCOUNTER selects all patients that the provider has seen.') . "'>\n";
367 echo " <option value='primary'";
368 if ($pat_prov_rel == 'primary') echo " selected";
369 echo ">" . xlt('Primary') . "\n";
370 echo " <option value='encounter'";
371 if ($pat_prov_rel == 'encounter') echo " selected";
372 echo ">" . xlt('Encounter') . "\n";
373 echo " </select>\n";
375 </td>
376 </tr>
378 <?php if ($type_report == "amc") { ?>
379 <tr>
380 <td>
381 <?php echo htmlspecialchars( xl('Number labs'), ENT_NOQUOTES); ?>:<br>
382 (<?php echo htmlspecialchars( xl('Non-electronic'), ENT_NOQUOTES); ?>)
383 </td>
384 <td>
385 <input <?php echo $dis_text; ?> type="text" id="labs_manual_entry" name="labs_manual_entry" value="<?php echo htmlspecialchars($labs_manual,ENT_QUOTES); ?>">
386 </td>
387 </tr>
388 <?php } ?>
390 </table>
392 </div>
394 </td>
395 <td align='left' valign='middle' height="100%">
396 <table style='border-left:1px solid; width:100%; height:100%' >
397 <tr>
398 <td>
399 <div style='margin-left:15px'>
400 <?php if (empty($report_id)) { ?>
401 <a id='submit_button' href='#' class='css_button' onclick='runReport();'>
402 <span>
403 <?php echo htmlspecialchars( xl('Submit'), ENT_NOQUOTES); ?>
404 </span>
405 </a>
406 <span id='status_span'></span>
407 <div id='processing' style='margin:10px;display:none;'><img src='../pic/ajax-loader.gif'/></div>
408 <?php if ($type_report == "cqm") { ?>
409 <a id='xmla_button' href='#' class='css_button' onclick='return GenXml("false")'>
410 <span>
411 <?php echo htmlspecialchars( xl('Generate PQRI report (Method A)'), ENT_NOQUOTES); ?>
412 </span>
413 </a>
414 <a id='xmlb_button' href='#' class='css_button' onclick='return GenXml("true")'>
415 <span>
416 <?php echo htmlspecialchars( xl('Generate PQRI report (Method E)'), ENT_NOQUOTES); ?>
417 </span>
418 </a>
419 <?php } ?>
420 <?php } ?>
421 <?php if (!empty($report_id)) { ?>
422 <a href='#' class='css_button' onclick='window.print()'>
423 <span>
424 <?php echo htmlspecialchars( xl('Print'), ENT_NOQUOTES); ?>
425 </span>
426 </a>
427 <?php if ($back_link == "list") { ?>
428 <a href='report_results.php' class='css_button' onclick='top.restoreSession()'><span><?php echo xlt("Return To Report Results"); ?></span></a>
429 <?php } else { ?>
430 <a href='#' class='css_button' onclick='top.restoreSession(); $("#theform").submit();'><span><?php echo xlt("Start Another Report"); ?></span></a>
431 <?php } ?>
432 <?php } ?>
433 </div>
434 </td>
435 </tr>
436 </table>
437 </td>
438 </tr>
439 </table>
441 </div> <!-- end of search parameters -->
443 <br>
445 <?php
446 if (!empty($report_id)) {
450 <div id="report_results">
451 <table>
453 <thead>
454 <th>
455 <?php echo htmlspecialchars( xl('Title'), ENT_NOQUOTES); ?>
456 </th>
458 <th>
459 <?php echo htmlspecialchars( xl('Total Patients'), ENT_NOQUOTES); ?>
460 </th>
462 <th>
463 <?php if ($type_report == "amc") { ?>
464 <?php echo htmlspecialchars( xl('Denominator'), ENT_NOQUOTES); ?></a>
465 <?php } else { ?>
466 <?php echo htmlspecialchars( xl('Applicable Patients') .' (' . xl('Denominator') . ')', ENT_NOQUOTES); ?></a>
467 <?php } ?>
468 </th>
470 <?php if ($type_report != "amc") { ?>
471 <th>
472 <?php echo htmlspecialchars( xl('Excluded Patients'), ENT_NOQUOTES); ?></a>
473 </th>
474 <?php } ?>
476 <th>
477 <?php if ($type_report == "amc") { ?>
478 <?php echo htmlspecialchars( xl('Numerator'), ENT_NOQUOTES); ?></a>
479 <?php } else { ?>
480 <?php echo htmlspecialchars( xl('Passed Patients') . ' (' . xl('Numerator') . ')', ENT_NOQUOTES); ?></a>
481 <?php } ?>
482 </th>
484 <th>
485 <?php echo htmlspecialchars( xl('Performance Percentage'), ENT_NOQUOTES); ?></a>
486 </th>
488 </thead>
489 <tbody> <!-- added for better print-ability -->
490 <?php
492 $firstProviderFlag = TRUE;
493 $firstPlanFlag = TRUE;
494 $existProvider = FALSE;
495 foreach ($dataSheet as $row) {
499 <tr bgcolor='<?php echo $bgcolor ?>'>
501 <?php
502 if (isset($row['is_main']) || isset($row['is_sub'])) {
503 echo "<td class='detail'>";
504 if (isset($row['is_main'])) {
505 echo "<b>".generate_display_field(array('data_type'=>'1','list_id'=>'clinical_rules'),$row['id'])."</b>";
506 if (!empty($row['cqm_pqri_code']) || !empty($row['cqm_nqf_code']) || !empty($row['amc_code'])) {
507 echo " (";
508 if (!empty($row['cqm_pqri_code'])) {
509 echo " " . htmlspecialchars( xl('PQRI') . ":" . $row['cqm_pqri_code'], ENT_NOQUOTES) . " ";
511 if (!empty($row['cqm_nqf_code'])) {
512 echo " " . htmlspecialchars( xl('NQF') . ":" . $row['cqm_nqf_code'], ENT_NOQUOTES) . " ";
514 if (!empty($row['amc_code'])) {
515 echo " " . htmlspecialchars( xl('AMC') . ":" . $row['amc_code'], ENT_NOQUOTES) . " ";
517 echo ")";
520 if ( !(empty($row['concatenated_label'])) ) {
521 echo ", " . htmlspecialchars( xl( $row['concatenated_label'] ), ENT_NOQUOTES) . " ";
525 else { // isset($row['is_sub'])
526 echo generate_display_field(array('data_type'=>'1','list_id'=>'rule_action_category'),$row['action_category']);
527 echo ": " . generate_display_field(array('data_type'=>'1','list_id'=>'rule_action'),$row['action_item']);
529 echo "</td>";
530 echo "<td align='center'>" . $row['total_patients'] . "</td>";
531 echo "<td align='center'>" . $row['pass_filter'] . "</td>";
532 if ($type_report != "amc") {
533 echo "<td align='center'>" . $row['excluded'] . "</td>";
535 echo "<td align='center'>" . $row['pass_target'] . "</td>";
536 echo "<td align='center'>" . $row['percentage'] . "</td>";
538 else if (isset($row['is_provider'])) {
539 // Display the provider information
540 if (!$firstProviderFlag && $_POST['form_provider'] == 'collate_outer') {
541 echo "<tr><td>&nbsp</td></tr>";
543 echo "<td class='detail' align='center'><b>";
544 echo htmlspecialchars( xl("Provider").": " . $row['prov_lname'] . "," . $row['prov_fname'], ENT_NOQUOTES);
545 if (!empty($row['npi']) || !empty($row['federaltaxid'])) {
546 echo " (";
547 if (!empty($row['npi'])) {
548 echo " " . htmlspecialchars( xl('NPI') . ":" . $row['npi'], ENT_NOQUOTES) . " ";
550 if (!empty($row['federaltaxid'])) {
551 echo " " . htmlspecialchars( xl('TID') . ":" . $row['federaltaxid'], ENT_NOQUOTES) . " ";
553 echo ")";
555 echo "</b></td>";
556 $firstProviderFlag = FALSE;
557 $existProvider = TRUE;
559 else { // isset($row['is_plan'])
560 if (!$firstPlanFlag && $_POST['form_provider'] != 'collate_outer') {
561 echo "<tr><td>&nbsp</td></tr>";
563 echo "<td class='detail' align='center'><b>";
564 echo htmlspecialchars( xl("Plan"), ENT_NOQUOTES) . ": ";
565 echo generate_display_field(array('data_type'=>'1','list_id'=>'clinical_plans'),$row['id']);
566 if (!empty($row['cqm_measure_group'])) {
567 echo " (". htmlspecialchars( xl('Measure Group Code') . ": " . $row['cqm_measure_group'], ENT_NOQUOTES) . ")";
569 echo "</b></td>";
570 $firstPlanFlag = FALSE;
573 </tr>
575 <?php
578 </tbody>
579 </table>
580 </div> <!-- end of search results -->
581 <?php } else { ?>
582 <div id="instructions_text" class='text'>
583 <?php echo htmlspecialchars( xl('Please input search criteria above, and click Submit to start report.'), ENT_NOQUOTES); ?>
584 </div>
585 <?php } ?>
587 <input type='hidden' name='form_new_report_id' id='form_new_report_id' value=''/>
589 </form>
591 </body>
593 <!-- stuff for the popup calendar -->
594 <style type="text/css">@import url(../../library/dynarch_calendar.css);</style>
595 <script type="text/javascript" src="../../library/dynarch_calendar.js"></script>
596 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
597 <script type="text/javascript" src="../../library/dynarch_calendar_setup.js"></script>
598 <script language="Javascript">
599 <?php if ($type_report == "amc") { ?>
600 Calendar.setup({inputField:"form_begin_date", ifFormat:"%Y-%m-%d %H:%M:%S", button:"img_begin_date", showsTime:'true'});
601 <?php } ?>
602 Calendar.setup({inputField:"form_target_date", ifFormat:"%Y-%m-%d %H:%M:%S", button:"img_target_date", showsTime:'true'});
603 </script>
605 </html>