3 {php}html_header_show();{/php}
4 <link rel=
"stylesheet" href=
"{php}echo $GLOBALS['css_header']; {/php}" type=
"text/css">
5 <script type=
"text/javascript" src=
"{$WEBROOT}/library/js/jquery-1.2.2.min.js"></script>
8 <style type=
"text/css" title=
"mystyles" media=
"all">
14 <script language=
"javascript">
16 function changeLinkHref(id
,addValue
,value
) {
17 var myRegExp
= new RegExp(":" + value
+ ":");
18 if (addValue
){ //add value to href
19 document
.getElementById(id
).href
+= ':' + value
+ ':';
21 else { //remove value from href
22 document
.getElementById(id
).href
= document
.getElementById(id
).href
.replace(myRegExp
,'');
26 function changeLinkHref_All(id
,addValue
,value
) {
27 var myRegExp
= new RegExp(":" + value
+ ":");
28 if (addValue
){ //add value to href
29 document
.getElementById(id
).href
+= ':' + value
+ ':';
31 else { //remove value from href
32 document
.getElementById(id
).href
= document
.getElementById(id
).href
.replace(myRegExp
,'');
33 // TajEmo Work By CB 2012/06/14 02:17:16 PM remove the target change
34 //document.getElementById(id).target = '';
40 if (len
==undefined) {chk
.checked
=true;}
42 for (pr
= 0; pr
< chk
.length
; pr
++){
43 if($(chk
[pr
]).parents("tr.inactive").length
==0)
46 changeLinkHref_All('multiprint',true,chk
[pr
].value
);
47 changeLinkHref_All('multiprintcss',true, chk
[pr
].value
);
48 changeLinkHref_All('multiprintToFax',true, chk
[pr
].value
);
54 function Uncheck(chk
) {
56 if (len
==undefined) {chk
.checked
=false;}
58 for (pr
= 0; pr
< chk
.length
; pr
++){
59 chk
[pr
].checked
=false;
60 changeLinkHref_All('multiprint',false,chk
[pr
].value
);
61 changeLinkHref_All('multiprintcss',false, chk
[pr
].value
);
62 changeLinkHref_All('multiprintToFax',false, chk
[pr
].value
);
67 var CheckForChecks = function(chk
) {
68 // Checks for any checked boxes, if none are found than an alert is raised and the link is killed
69 if (Checking(chk
) == false) { return false; }
70 return top
.restoreSession();
73 function Checking(chk
) {
78 if (chk
.checked
== true){
83 for (pr
= 0; pr
< chk
.length
; pr
++){
84 if (chk
[pr
].checked
== true) {
92 alert("{/literal}{xl t='Please select at least one prescription!'}{literal}");
97 $(document
).ready(function(){
98 $(":checkbox:checked").each(function () {
99 changeLinkHref('multiprint',this.checked
, this.value
);
100 changeLinkHref('multiprintcss',this.checked
, this.value
);
101 changeLinkHref('multiprintToFax',this.checked
, this.value
);
109 <body class=
"body_top">
112 <span class=
"title"><b>{xl t='List'}
</b></span>
114 <div id=
"prescription_list">
118 <div id=
"print_links">
125 <a id=
"multiprint" href=
"{$CONTROLLER}prescription&multiprint&id={$printm}" onclick=
"top.restoreSession()" class=
"css_button"><span>{xl t='Download'} ({xl t='PDF'})
</span></a>
128 <!-- TajEmo work by CB 2012/06/14 02:16:32 PM target="_script" opens better -->
129 <a target=
"_script" id=
"multiprintcss" href=
"{$CONTROLLER}prescription&multiprintcss&id={$printm}" onclick=
"top.restoreSession()" class=
"css_button"><span>{xl t='View Printable Version'} ({xl t='HTML'})
</span></a>
131 <td style=
"border-style:none;">
132 <a id=
"multiprintToFax" href=
"{$CONTROLLER}prescription&multiprintfax&id={$printm}" onclick=
"top.restoreSession()" class=
"css_button"><span>{xl t='Download'} ({xl t='Fax'})
</span></a>
134 {if $CAMOS_FORM == true}
136 <a id=
"four_panel_rx" href=
"{$WEBROOT}/interface/forms/CAMOS/rx_print.php?sigline=plain" onclick=
"top.restoreSession()" class=
"css_button"><span>{xl t='View Four Panel'}
</span></a>
146 <a href=
"#" class=
"small" onClick=
"Check(document.presc.check_list);"><span>{xl t='Check All'}
</span></a> |
147 <a href=
"#" class=
"small" onClick=
"Uncheck(document.presc.check_list);"><span>{xl t='Clear All'}
</span></a>
157 <table width=
"100%" class=
"showborder_head" cellspacing=
"0px" cellpadding=
"2px">
159 <!-- TajEmo Changes 2012/06/14 02:01:43 PM by CB added Heading for checkbox column -->
160 <th width=
"8px"> </th>
161 <th width=
"8px"> </th>
162 <th width=
"180px">{xl t='Drug'}
</th>
163 <th>{xl t='Created'}
<br />{xl t='Changed'}
</th>
164 <th>{xl t='Dosage'}
</th>
165 <th>{xl t='Qty'}.
</th>
166 <th>{xl t='Unit'}
</th>
167 <th>{xl t='Provider'}
</th>
170 {foreach from=$prescriptions item=prescription}
171 <!-- TajEmo Changes 2012/06/14 02:03:17 PM by CB added cursor:pointer for easier user understanding -->
172 <tr style=
"cursor:pointer" id=
"{$prescription->id}" class=
"showborder onescript {if $prescription->active <= 0} inactive{/if}" title=
"{xl t='Click to view/edit'}">
174 <input class=
"check_list" id=
"check_list" type=
"checkbox" value=
"{$prescription->id}" {if $prescription-
>encounter == $prescription-
>get_encounter() && $prescription-
>active
> 0}
checked=
"checked" {/if}
onclick=
"changeLinkHref('multiprint',this.checked, this.value);changeLinkHref('multiprintcss',this.checked, this.value);changeLinkHref('multiprintToFax',this.checked, this.value)" title=
"{xl t='Select for printing'}">
176 {if $prescription-
>erx_source==
0}
177 <td class=
"editscript" id=
"{$prescription->id}">
178 <a class='editscript css_button_small' id='{$prescription-
>id}'
href=
"controller.php?prescription&edit&id={$prescription->id}" style=
"margin-top:-2px"><span>{xl t='Edit'}
</span></a>
179 <!-- TajEmo Changes 2012/06/14 02:02:22 PM by CB commented out, to avoid duplicate display of drug name
180 {if $prescription->active > 0}<b>{/if}{$prescription->drug}{if $prescription->active > 0}</b>{/if}
183 <td class=
"editscript" id=
"{$prescription->id}">
184 {if $prescription-
>active
> 0}
<b>{/if}{$prescription-
>drug}{if $prescription-
>active
> 0}
</b>{/if}
187 <td id=
"{$prescription->id}">
188 {if $prescription-
>active
> 0}
<b>{/if}{$prescription-
>drug}{if $prescription-
>active
> 0}
</b>{/if}
191 <td id=
"{$prescription->id}">
192 {$prescription-
>date_added}
<br />
193 {$prescription-
>date_modified}
195 <td id=
"{$prescription->id}">
196 {$prescription-
>get_dosage_display()}
198 {if $prescription-
>erx_source==
0}
199 <td class=
"editscript" id=
"{$prescription->id}">
200 {$prescription-
>quantity}
203 <td id=
"{$prescription->id}">
204 {$prescription-
>quantity}
207 <td id=
"{$prescription->id}">
208 {$prescription-
>get_size()} {$prescription-
>get_unit_display()}
210 <td id=
"{$prescription->id}">
211 {$prescription-
>provider-
>get_name_display()}
221 <div class=
"text" style=
"margin-top:10px">{xl t='There are currently no prescriptions'}.
</div>
226 <script language='JavaScript'
>
228 $(document
).ready(function(){
229 $("#multiprint").click(function() { return CheckForChecks(document
.presc
.check_list
); });
230 $("#multiprintcss").click(function() { return CheckForChecks(document
.presc
.check_list
); });
231 $("#multiprintToFax").click(function() { return CheckForChecks(document
.presc
.check_list
); });
232 $(".editscript").click(function() { ShowScript(this); });
233 $(".onescript").mouseover(function() { $(this).children().toggleClass("highlight"); });
234 $(".onescript").mouseout(function() { $(this).children().toggleClass("highlight"); });
237 var ShowScript = function(eObj
) {
238 top
.restoreSession();
240 document
.location
.href
="{/literal}{$WEB_ROOT}{literal}/controller.php?prescription&edit&id="+objID
;