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 document
.getElementById(id
).target
= '';
39 if (len
==undefined) {chk
.checked
=true;}
41 for (pr
= 0; pr
< chk
.length
; pr
++){
42 if($(chk
[pr
]).parents("tr.inactive").length
==0)
45 changeLinkHref_All('multiprint',true,chk
[pr
].value
);
46 changeLinkHref_All('multiprintcss',true, chk
[pr
].value
);
47 changeLinkHref_All('multiprintToFax',true, chk
[pr
].value
);
53 function Uncheck(chk
) {
55 if (len
==undefined) {chk
.checked
=false;}
57 for (pr
= 0; pr
< chk
.length
; pr
++){
58 chk
[pr
].checked
=false;
59 changeLinkHref_All('multiprint',false,chk
[pr
].value
);
60 changeLinkHref_All('multiprintcss',false, chk
[pr
].value
);
61 changeLinkHref_All('multiprintToFax',false, chk
[pr
].value
);
66 var CheckForChecks = function(chk
) {
67 // Checks for any checked boxes, if none are found than an alert is raised and the link is killed
68 if (Checking(chk
) == false) { return false; }
69 return top
.restoreSession();
72 function Checking(chk
) {
77 if (chk
.checked
== true){
82 for (pr
= 0; pr
< chk
.length
; pr
++){
83 if (chk
[pr
].checked
== true) {
91 alert("{/literal}{xl t='Please select at least one prescription!'}{literal}");
100 <body class=
"body_top">
103 <span class=
"title"><b>{xl t='List'}
</b></span>
105 <div id=
"prescription_list">
109 <div id=
"print_links">
116 <a id=
"multiprint" href=
"{$CONTROLLER}prescription&multiprint&id={$printm}" onclick=
"top.restoreSession()" class=
"css_button"><span>{xl t='Print'} ({xl t='PDF'})
</span></a>
119 <a id=
"multiprintcss" href=
"{$CONTROLLER}prescription&multiprintcss&id={$printm}" onclick=
"top.restoreSession()" class=
"css_button"><span>{xl t='Print'} ({xl t='HTML'})
</span></a>
121 <td style=
"border-style:none;">
122 <a id=
"multiprintToFax" href=
"{$CONTROLLER}prescription&multiprintfax&id={$printm}" onclick=
"top.restoreSession()" class=
"css_button"><span>{xl t='Print'} ({xl t='Fax'})
</span></a>
124 {if $CAMOS_FORM == true}
126 <a id=
"four_panel_rx" href=
"{$WEBROOT}/interface/forms/CAMOS/rx_print.php?sigline=plain" onclick=
"top.restoreSession()" class=
"css_button"><span>{xl t='Print Four Panel'}
</span></a>
136 <a href=
"#" class=
"small" onClick=
"Check(document.presc.check_list);"><span>{xl t='Check All'}
</span></a> |
137 <a href=
"#" class=
"small" onClick=
"Uncheck(document.presc.check_list);"><span>{xl t='Clear All'}
</span></a>
147 <table width=
"100%" class=
"showborder_head" cellspacing=
"0px" cellpadding=
"2px">
149 <th width=
"8px"> </th>
150 <th width=
"180px">{xl t='Drug'}
</th>
151 <th>{xl t='Created'}
<br />{xl t='Changed'}
</th>
152 <th>{xl t='Dosage'}
</th>
153 <th>{xl t='Qty'}.
</th>
154 <th>{xl t='Unit'}
</th>
155 <th>{xl t='Provider'}
</th>
158 {foreach from=$prescriptions item=prescription}
159 <tr id=
"{$prescription->id}" class=
"showborder onescript {if $prescription->active <= 0} inactive{/if}" title=
"{xl t='Click to view/edit'}">
161 <input id=
"check_list" type=
"checkbox" value=
"{$prescription->id}" 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'}">
163 {if $prescription-
>erx_source==
0}
164 <td class=
"editscript" id=
"{$prescription->id}">
165 <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>
166 {if $prescription-
>active
> 0}
<b>{/if}{$prescription-
>drug}{if $prescription-
>active
> 0}
</b>{/if}
168 <td class=
"editscript" id=
"{$prescription->id}">
169 {if $prescription-
>active
> 0}
<b>{/if}{$prescription-
>drug}{if $prescription-
>active
> 0}
</b>{/if}
172 <td id=
"{$prescription->id}">
173 {if $prescription-
>active
> 0}
<b>{/if}{$prescription-
>drug}{if $prescription-
>active
> 0}
</b>{/if}
176 <td id=
"{$prescription->id}">
177 {$prescription-
>date_added}
<br />
178 {$prescription-
>date_modified}
180 <td id=
"{$prescription->id}">
181 {$prescription-
>get_dosage_display()}
183 {if $prescription-
>erx_source==
0}
184 <td class=
"editscript" id=
"{$prescription->id}">
185 {$prescription-
>quantity}
188 <td id=
"{$prescription->id}">
189 {$prescription-
>quantity}
192 <td id=
"{$prescription->id}">
193 {$prescription-
>get_size()} {$prescription-
>get_unit_display()}
195 <td id=
"{$prescription->id}">
196 {$prescription-
>provider-
>get_name_display()}
206 <div class=
"text" style=
"margin-top:10px">{xl t='There are currently no prescriptions'}.
</div>
211 <script language='JavaScript'
>
213 $(document
).ready(function(){
214 $("#multiprint").click(function() { return CheckForChecks(document
.presc
.check_list
); });
215 $("#multiprintcss").click(function() { return CheckForChecks(document
.presc
.check_list
); });
216 $("#multiprintToFax").click(function() { return CheckForChecks(document
.presc
.check_list
); });
217 $(".editscript").click(function() { ShowScript(this); });
218 $(".onescript").mouseover(function() { $(this).children().toggleClass("highlight"); });
219 $(".onescript").mouseout(function() { $(this).children().toggleClass("highlight"); });
222 var ShowScript = function(eObj
) {
223 top
.restoreSession();
225 document
.location
.href
="{/literal}{$WEB_ROOT}{literal}/controller.php?prescription&edit&id="+objID
;