fix to display the four-panel link in the prescription list only when CAMOS is installed
[openemr.git] / templates / prescription / general_list.html
blob02dab854d17115a9cd7e26bbf31bc1360296b5df
1 <html>
2 <head>
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>
7 {literal}
8 <style type="text/css" title="mystyles" media="all">
9 .inactive {
10 color:#777777;
12 td, th {
13 font-size:0.7em;
14 border-bottom: 1px solid #999;
16 </style>
18 <script language="javascript">
20 function changeLinkHref(id,addValue,value) {
21 var myRegExp = new RegExp(":" + value + ":");
22 if (addValue){ //add value to href
23 document.getElementById(id).href += ':' + value + ':';
25 else { //remove value from href
26 document.getElementById(id).href = document.getElementById(id).href.replace(myRegExp,'');
30 </script>
32 {/literal}
33 </head>
34 <body class="body_bottom">
35 <div id="prescription_list">
36 <div id="print_links">
37 <a id="multiprint" target="_new" href="{$CONTROLLER}prescription&multiprint&id={$printm}" onclick="top.restoreSession()">Print Multiple</a>
38 <br>
39 <a id="multiprintToFax" target="_new" href="{$CONTROLLER}prescription&multiprintfax&id={$printm}" onclick="top.restoreSession()">Print Multiple To Fax</a>
40 {if $CAMOS_FORM == true}
41 <br>
42 <a id="four_panel_rx" target="_new" href="{$WEBROOT}/interface/forms/CAMOS/rx_print.php?sigline=plain" onclick="top.restoreSession()">Print Four Panel</a>
43 {/if}
44 </div>
46 <table>
47 <tr>
48 <th>{xl t='Drug'}</th>
49 <th>{xl t='Created'}<br />{xl t='Changed'}</th>
50 <th>{xl t='Dosage'}</th>
51 <th>{xl t='Qty'}.</th>
52 <th>{xl t='Unit'}</th>
53 <th>{xl t='Provider'}</th>
54 <th>{xl t='Select'}</th>
55 </tr>
57 {foreach from=$prescriptions item=prescription}
58 <tr id="{$prescription->id}" class="onescript {if $prescription->active <= 0} inactive{/if}" title="Click to view/edit">
59 <td class="editscript" id="{$prescription->id}">
60 {if $prescription->active > 0}<b>{/if}{$prescription->drug}{if $prescription->active > 0}</b>{/if}
61 </td>
62 <td class="editscript" id="{$prescription->id}">
63 {$prescription->date_added}<br />
64 {$prescription->date_modified}
65 </td>
66 <td class="editscript" id="{$prescription->id}">
67 {$prescription->get_dosage_display()}
68 </td>
69 <td class="editscript" id="{$prescription->id}">
70 {$prescription->quantity}
71 </td>
72 <td class="editscript" id="{$prescription->id}">
73 {$prescription->get_unit_display()}
74 </td>
75 <td class="editscript" id="{$prescription->id}">
76 {$prescription->provider->get_name_display()}
77 </td>
78 <td>
79 <input type="checkbox" value="{$prescription->id}" onclick="changeLinkHref('multiprint',this.checked, this.value);changeLinkHref('multiprintToFax',this.checked, this.value)" title="Select for printing">
80 </td>
81 </tr>
82 {foreachelse}
83 <tr>
84 <td colspan="6">{xl t='No Prescriptions Found'}</td>
85 </tr>
86 {/foreach}
87 </table>
88 </div>
89 </body>
90 {literal}
91 <script language='JavaScript'>
93 $(document).ready(function(){
94 $(".editscript").click(function() { ShowScript(this); });
95 $(".onescript").mouseover(function() { $(this).children().toggleClass("highlight"); });
96 $(".onescript").mouseout(function() { $(this).children().toggleClass("highlight"); });
97 });
99 var ShowScript = function(eObj) {
100 top.restoreSession();
101 objID = eObj.id;
102 document.location.href="controller.php?prescription&edit&id="+objID;
103 return true;
106 </script>
107 {/literal}
108 </html>