ongoing new datepicker project
[openemr.git] / interface / orders / procedure_provider_list.php
blob87eb2bc308c99f1f65244ff40057f04a6ee13899
1 <?php
2 /**
3 * Maintenance for the list of procedure providers.
5 * Copyright (C) 2012 Rod Roark <rod@sunsetsystems.com>
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 2
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>.
18 * @package OpenEMR
19 * @author Rod Roark <rod@sunsetsystems.com>
22 $sanitize_all_escapes = true;
23 $fake_register_globals = false;
25 require_once("../globals.php");
26 require_once("$srcdir/acl.inc");
27 require_once("$srcdir/options.inc.php");
29 $popup = empty($_GET['popup']) ? 0 : 1;
31 $form_name = trim($_POST['form_name']);
33 $query = "SELECT pp.* FROM procedure_providers AS pp";
34 $query .= " ORDER BY pp.name";
35 $res = sqlStatement($query);
37 <html>
39 <head>
41 <link rel="stylesheet" href='<?php echo $css_header ?>' type='text/css'>
42 <title><?php echo xlt('Procedure Providers'); ?></title>
44 <?php if ($popup) { ?>
45 <script type="text/javascript" src="../../library/topdialog.js"></script>
46 <?php } ?>
47 <script type="text/javascript" src="../../library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
49 <script language="JavaScript">
51 <?php if ($popup) require($GLOBALS['srcdir'] . "/restoreSession.php"); ?>
53 // Callback from popups to refresh this display.
54 function refreshme() {
55 // location.reload();
56 document.forms[0].submit();
59 // Process click to pop up the add window.
60 function doedclick_add() {
61 top.restoreSession();
62 dlgopen('procedure_provider_edit.php?ppid=0', '_blank', 700, 550);
65 // Process click to pop up the edit window.
66 function doedclick_edit(ppid) {
67 top.restoreSession();
68 dlgopen('procedure_provider_edit.php?ppid=' + ppid, '_blank', 700, 550);
71 </script>
73 </head>
75 <body class="body_top">
77 <div id="addressbook_list">
78 <form method='post' action='procedure_provider_list.php'>
80 <table>
81 <tr class='search'> <!-- bgcolor='#ddddff' -->
82 <td>
83 <input type='submit' class='button' name='form_search' value='<?php echo xla("Refresh")?>' />
84 <input type='button' class='button' value='<?php echo xla("Add New"); ?>' onclick='doedclick_add()' />
85 </td>
86 </tr>
87 </table>
89 <table>
90 <tr class='head'>
91 <td title='<?php echo xla('Click to view or edit'); ?>'><?php echo xlt('Name'); ?></td>
92 <td><?php echo xlt('NPI'); ?></td>
93 <td><?php echo xlt('Protocol'); ?></td>
94 </tr>
96 <?php
97 $encount = 0;
98 while ($row = sqlFetchArray($res)) {
99 ++$encount;
100 $bgclass = (($encount & 1) ? "evenrow" : "oddrow");
102 if (acl_check('admin', 'practice' )) {
103 $trTitle = xl('Edit') . ' ' . $row['name'];
104 echo " <tr class='detail $bgclass' style='cursor:pointer' " .
105 "onclick='doedclick_edit(" . $row['ppid'] . ")' title='" . attr($trTitle) . "'>\n";
107 else {
108 $trTitle = $displayName . " (" . xl("Not Allowed to Edit") . ")";
109 echo " <tr class='detail $bgclass' title='" . attr($trTitle) . "'>\n";
111 echo " <td>" . text($row['name'] ) . "</td>\n";
112 echo " <td>" . text($row['npi'] ) . "</td>\n";
113 echo " <td>" . text($row['protocol']) . "</td>\n";
114 echo " </tr>\n";
117 </table>
119 </body>
120 </html>