5 * Copyright (C) 2014 Ensoftek
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @author Hema Bandaru <hemab@drcloudemr.com>
20 * @link http://www.open-emr.org
23 //SANITIZE ALL ESCAPES
24 $sanitize_all_escapes=true;
27 //STOP FAKE REGISTER GLOBALS
28 $fake_register_globals=false;
31 include_once("../../globals.php");
32 include_once("$srcdir/options.inc.php");
38 <?php
html_header_show();?
>
40 <!-- supporting javascript code
-->
41 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-2-1/index.js"></script
>
42 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script
>
43 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script
>
47 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
54 background
-color
: white
;
58 <!-- pop up calendar
-->
59 <style type
="text/css">@import
url(<?php
echo $GLOBALS['webroot'] ?
>/library
/dynarch_calendar
.css
);</style
>
60 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script
>
61 <?php
include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?
>
62 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script
>
63 <script type
="text/javascript">
64 function checkForAmendments() {
66 $
("#list_amendments input:checkbox:checked").each(function() {
67 amendments +
= $
(this
).val() +
",";
70 if ( amendments
== '' ) {
71 alert("<?php echo xls('Select amendments to print'); ?>");
75 // Call the function to print
76 var url
= "print_amendments.php?ids=" + amendments
;
80 function checkUncheck(option
) {
81 $
("input[name='check_list[]']").each( function () {
82 var optionFlag
= ( option
) ?
true : false;
83 $
(this
).attr('checked',optionFlag
);
89 <body
class="body_top">
91 <form action
="list_amendments.php" name
="list_amendments" id
="list_amendments" method
="post" onsubmit
='return top.restoreSession()'>
93 <span
class="title"><?php
echo xlt('List'); ?
></span
> 
;
95 $query = "SELECT * FROM amendments WHERE pid = ? ORDER BY amendment_date DESC";
96 $resultSet = sqlStatement($query,array($pid));
97 if ( sqlNumRows($resultSet)) { ?
>
98 <table cellspacing
="0" cellpadding
="0" style
="width:100%">
100 <td
><a href
="javascript:checkForAmendments();" class="css_button"><span
><?php
echo xlt("Print Amendments"); ?
></span
></a
></td
>
102 <a href
="#" class="small" onClick
="checkUncheck(1);"><span
><?php
echo xlt('Check All');?
></span
></a
> |
103 <a href
="#" class="small" onClick
="checkUncheck(0);"><span
><?php
echo xlt('Clear All');?
></span
></a
>
107 <div id
="patient_stats">
109 <table border
=0 cellpadding
=0 cellspacing
=0 style
="margin-bottom:1em;">
112 <th style
="width:5%"></th
>
113 <th style
="width:15%" align
="left"><?php
echo xlt('Requested Date'); ?
></th
>
114 <th style
="width:40%" align
="left"><?php
echo xlt('Request Description'); ?
></th
>
115 <th style
="width:25%" align
="left"><?php
echo xlt('Requested By'); ?
></th
>
116 <th style
="width:15%" align
="left"><?php
echo xlt('Request Status'); ?
></th
>
119 <?php
while($row = sqlFetchArray($resultSet)) {
120 $amendmentLink = "<a href=add_edit_amendments.php?id=" . attr($row['amendment_id']) . ">" . oeFormatShortDate($row['amendment_date']) . "</a>";
122 <tr
class="amendmentrow" id
="<?php echo attr($row['amendment_id']); ?>">
123 <td
><input id
="check_list[]" name
="check_list[]" type
="checkbox" value
="<?php echo attr($row['amendment_id']); ?>"></td
>
124 <td
class=text
><?php
echo $amendmentLink; ?
> </td
>
125 <td
class=text
><?php
echo text($row['amendment_desc']); ?
> </td
>
126 <td
class=text
><?php
echo generate_display_field(array('data_type'=>'1','list_id'=>'amendment_from'), $row['amendment_by']); ?
> </td
>
127 <td
class=text
><?php
echo generate_display_field(array('data_type'=>'1','list_id'=>'amendment_status'), $row['amendment_status']); ?
> </td
>
133 <span style
="color:red">
135 <?php
echo xlt("No amendment requests available"); ?
>