2 // Copyright (C) 2011 by following authors:
3 // -Brady Miller <brady@sparmy.com>
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 //SANITIZE ALL ESCAPES
12 $sanitize_all_escapes=true;
14 //STOP FAKE REGISTER GLOBALS
15 $fake_register_globals=false;
17 require_once("../../globals.php");
18 require_once("$srcdir/options.inc.php");
19 require_once("$srcdir/clinical_rules.php");
24 <?php
html_header_show();?
>
25 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
26 <link rel
="stylesheet" type
="text/css" href
="../../../library/js/fancybox/jquery.fancybox-1.2.6.css" media
="screen" />
27 <style type
="text/css">@import
url(../../../library
/dynarch_calendar
.css
);</style
>
28 <script type
="text/javascript" src
="../../../library/dialog.js"></script
>
29 <script type
="text/javascript" src
="../../../library/textformat.js"></script
>
30 <script type
="text/javascript" src
="../../../library/dynarch_calendar.js"></script
>
31 <?php
include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?
>
32 <script type
="text/javascript" src
="../../../library/dynarch_calendar_setup.js"></script
>
33 <script type
="text/javascript" src
="../../../library/js/jquery.1.3.2.js"></script
>
34 <script type
="text/javascript" src
="../../../library/js/common.js"></script
>
35 <script type
="text/javascript" src
="../../../library/js/fancybox/jquery.fancybox-1.2.6.js"></script
>
39 $patient_id = ($_GET['patient_id']) ?
$_GET['patient_id'] : "";
42 <body
class='body_top'>
44 <span
class='title'><?php
echo htmlspecialchars( xl('Clinical Reminders'), ENT_NOQUOTES
); ?
></span
>
46 <div style
='float:left;margin-right:10px'>
47 <?php
echo htmlspecialchars( xl('for'), ENT_NOQUOTES
);?
> 
;
49 <a href
="../summary/demographics.php" onclick
="top.restoreSession()"><?php
echo htmlspecialchars( getPatientName($pid), ENT_NOQUOTES
); ?
></a
>
53 <a href
="../summary/demographics.php" <?php
if (!$GLOBALS['concurrent_layout']) echo "target='Main'"; ?
> class="css_button" onclick
="top.restoreSession()">
54 <span
><?php
echo htmlspecialchars( xl('Back To Patient'), ENT_NOQUOTES
);?
></span
>
63 // collect the pertinent plans and rules
64 $plans_default = resolve_plans_sql('','0',TRUE);
65 $rules_default = resolve_rules_sql('','0',TRUE);
69 <li
class='current'><a href
='/play/javascript-tabbed-navigation/' onclick
='top.restoreSession()'><?php
echo htmlspecialchars( xl('Main'), ENT_NOQUOTES
); ?
></a
></li
>
70 <li
><a href
='/play/javascript-tabbed-navigation/' onclick
='top.restoreSession()'><?php
echo htmlspecialchars( xl('Plans'), ENT_NOQUOTES
); ?
></a
></li
>
71 <li
><a href
='/play/javascript-tabbed-navigation/' onclick
='top.restoreSession()'><?php
echo htmlspecialchars( xl('Admin'), ENT_NOQUOTES
); ?
></a
></li
>
74 <div
class="tabContainer">
75 <div
class="tab current text" style
="height:auto;width:97%;">
77 clinical_summary_widget($pid,"reminders-all");
81 <div
class="tab text" style
="height:auto;width:97%;">
83 clinical_summary_widget($pid,"reminders-all",'',"plans");
87 <div
class="tab" style
="height:auto;width:97%;">
88 <div id
='report_results'>
91 <th rowspan
="2"><?php
echo htmlspecialchars( xl('Plan'), ENT_NOQUOTES
); ?
></th
>
92 <th colspan
="2"><?php
echo htmlspecialchars( xl('Show'), ENT_NOQUOTES
); ?
></th
>
95 <th
><?php
echo htmlspecialchars( xl('Patient Setting'), ENT_NOQUOTES
); ?
></th
>
96 <th style
="left-margin:1em;"><?php
echo htmlspecialchars( xl('Practice Default Setting'), ENT_NOQUOTES
); ?
></th
>
98 <?php
foreach ($plans_default as $plan) { ?
>
100 <td style
="border-right:1px solid black;"><?php
echo generate_display_field(array('data_type'=>'1','list_id'=>'clinical_plans'), $plan['id']); ?
></td
>
103 $patient_plan = collect_plan($plan['id'],$patient_id);
104 // Set the patient specific setting for gui
105 if (empty($patient_plan)) {
109 if ($patient_plan['normal_flag'] == "1") {
112 else if ($patient_plan['normal_flag'] == "0"){
115 else { // $patient_rule['normal_flag'] == NULL
119 <select
class="plan_show" name
="<?php echo htmlspecialchars( $plan['id'], ENT_NOQUOTES); ?>">
120 <option value
="default" <?php
if ($select == "default") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('Default'), ENT_NOQUOTES
); ?
></option
>
121 <option value
="on" <?php
if ($select == "on") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('On'), ENT_NOQUOTES
); ?
></option
>
122 <option value
="off" <?php
if ($select == "off") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('Off'), ENT_NOQUOTES
); ?
></option
>
125 <td align
="center" style
="border-right:1px solid black;">
126 <?php
if ($plan['normal_flag'] == "1") {
127 echo htmlspecialchars( xl('On'), ENT_NOQUOTES
);
130 echo htmlspecialchars( xl('Off'), ENT_NOQUOTES
);
140 <th rowspan
="2"><?php
echo htmlspecialchars( xl('Rule'), ENT_NOQUOTES
); ?
></th
>
141 <th colspan
="2"><?php
echo htmlspecialchars( xl('Passive Alert'), ENT_NOQUOTES
); ?
></th
>
142 <th colspan
="2"><?php
echo htmlspecialchars( xl('Active Alert'), ENT_NOQUOTES
); ?
></th
>
145 <th
><?php
echo htmlspecialchars( xl('Patient Setting'), ENT_NOQUOTES
); ?
></th
>
146 <th style
="left-margin:1em;"><?php
echo htmlspecialchars( xl('Practice Default Setting'), ENT_NOQUOTES
); ?
></th
>
147 <th
><?php
echo htmlspecialchars( xl('Patient Setting'), ENT_NOQUOTES
); ?
></th
>
148 <th style
="left-margin:1em;"><?php
echo htmlspecialchars( xl('Practice Default Setting'), ENT_NOQUOTES
); ?
></th
>
150 <?php
foreach ($rules_default as $rule) { ?
>
152 <td style
="border-right:1px solid black;"><?php
echo generate_display_field(array('data_type'=>'1','list_id'=>'clinical_rules'), $rule['id']); ?
></td
>
155 $patient_rule = collect_rule($rule['id'],$patient_id);
156 // Set the patient specific setting for gui
157 if (empty($patient_rule)) {
161 if ($patient_rule['passive_alert_flag'] == "1") {
164 else if ($patient_rule['passive_alert_flag'] == "0"){
167 else { // $patient_rule['passive_alert_flag'] == NULL
171 <select
class="passive_alert" name
="<?php echo htmlspecialchars( $rule['id'], ENT_NOQUOTES); ?>">
172 <option value
="default" <?php
if ($select == "default") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('Default'), ENT_NOQUOTES
); ?
></option
>
173 <option value
="on" <?php
if ($select == "on") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('On'), ENT_NOQUOTES
); ?
></option
>
174 <option value
="off" <?php
if ($select == "off") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('Off'), ENT_NOQUOTES
); ?
></option
>
177 <td align
="center" style
="border-right:1px solid black;">
178 <?php
if ($rule['passive_alert_flag'] == "1") {
179 echo htmlspecialchars( xl('On'), ENT_NOQUOTES
);
182 echo htmlspecialchars( xl('Off'), ENT_NOQUOTES
);
187 // Set the patient specific setting for gui
188 if (empty($patient_rule)) {
192 if ($patient_rule['active_alert_flag'] == "1") {
195 else if ($patient_rule['active_alert_flag'] == "0"){
198 else { // $patient_rule['active_alert_flag'] == NULL
202 <select
class="active_alert" name
="<?php echo htmlspecialchars( $rule['id'], ENT_NOQUOTES); ?>">
203 <option value
="default" <?php
if ($select == "default") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('Default'), ENT_NOQUOTES
); ?
></option
>
204 <option value
="on" <?php
if ($select == "on") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('On'), ENT_NOQUOTES
); ?
></option
>
205 <option value
="off" <?php
if ($select == "off") echo "selected"; ?
>><?php
echo htmlspecialchars( xl('Off'), ENT_NOQUOTES
); ?
></option
>
209 <?php
if ($rule['active_alert_flag'] == "1") {
210 echo htmlspecialchars( xl('On'), ENT_NOQUOTES
);
213 echo htmlspecialchars( xl('Off'), ENT_NOQUOTES
);
223 <script type
="text/javascript">
224 $
(document
).ready(function() {
230 $
(".passive_alert").change(function() {
231 top
.restoreSession();
232 $
.post( "../../../library/ajax/rule_setting.php", {
234 type
: 'passive_alert',
236 patient_id
: '<?php echo htmlspecialchars($patient_id, ENT_QUOTES); ?>'
240 $
(".active_alert").change(function() {
241 top
.restoreSession();
242 $
.post( "../../../library/ajax/rule_setting.php", {
244 type
: 'active_alert',
246 patient_id
: '<?php echo htmlspecialchars($patient_id, ENT_QUOTES); ?>'
250 $
(".plan_show").change(function() {
251 top
.restoreSession();
252 $
.post( "../../../library/ajax/plan_setting.php", {
256 patient_id
: '<?php echo htmlspecialchars($patient_id, ENT_QUOTES); ?>'
260 $
(".medium_modal").fancybox( {
261 'overlayOpacity' : 0.0,
262 'showCloseButton' : true,
265 'centerOnScroll' : false,
266 'callbackOnClose' : function() {
271 function refreshme() {
272 top
.restoreSession();