dump db version
[openemr.git] / interface / orders / procedure_provider_list.php
blob1ebca9b936355ec68d310b368c2b6971a13c4e50
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>
21 require_once("../globals.php");
22 require_once("$srcdir/acl.inc");
23 require_once("$srcdir/options.inc.php");
25 use OpenEMR\Core\Header;
27 $popup = empty($_GET['popup']) ? 0 : 1;
29 $form_name = trim($_POST['form_name']);
31 $query = "SELECT pp.* FROM procedure_providers AS pp";
32 $query .= " ORDER BY pp.name";
33 $res = sqlStatement($query);
35 <html>
37 <head>
38 <?php Header::setupHeader(); ?>
39 <title><?php echo xlt('Procedure Providers'); ?></title>
41 <?php if ($popup) { ?>
42 <script type="text/javascript" src="../../library/topdialog.js"></script>
43 <?php } ?>
45 <script language="JavaScript">
47 <?php if ($popup) {
48 require($GLOBALS['srcdir'] . "/restoreSession.php");
49 } ?>
51 // Callback from popups to refresh this display.
52 function refreshme() {
53 // location.reload();
54 document.forms[0].submit();
57 // Process click to pop up the add window.
58 function doedclick_add() {
59 top.restoreSession();
60 var addTitle = '<i class="fa fa-plus" style="width:20px;" aria-hidden="true"></i> ' + '<?php echo xlt("Add Mode"); ?>';
61 dlgopen('procedure_provider_edit.php?ppid=0', '_blank', 800, 750, false, addTitle);
64 // Process click to pop up the edit window.
65 function doedclick_edit(ppid) {
66 top.restoreSession();
67 var editTitle = '<i class="fa fa-pencil" style="width:20px;" aria-hidden="true"></i> ' + '<?php echo xlt("Edit Mode"); ?> ';
68 dlgopen('procedure_provider_edit.php?ppid=' + ppid, '_blank', 800, 750, false, editTitle);
71 </script>
73 </head>
75 <body class="body_top">
76 <?php
77 if ($GLOBALS['enable_help'] == 1) {
78 $help_icon = '<a class="oe-pull-away oe-help-redirect" data-target="#myModal" data-toggle="modal" href="#" id="help-href" name="help-href" style="color:#676666" title="' . xla("Click to view Help") . '"><i class="fa fa-question-circle" aria-hidden="true"></i></a>';
79 } elseif ($GLOBALS['enable_help'] == 2) {
80 $help_icon = '<a class="oe-pull-away oe-help-redirect" data-target="#myModal" data-toggle="modal" href="#" id="help-href" name="help-href" style="color:#DCD6D0 !Important" title="' . xla("To enable help - Go to Administration > Globals > Features > Enable Help Modal") . '"><i class="fa fa-question-circle" aria-hidden="true"></i></a>';
81 } elseif ($GLOBALS['enable_help'] == 0) {
82 $help_icon = '';
85 <div class="container">
86 <div class="row">
87 <div class="col-sm-12">
88 <div class="page-header clearfix">
89 <h2 id="header_title" class="clearfix"><span id='header_text'><?php echo xlt('Procedure Providers');?></span><?php echo $help_icon; ?></h2>
90 </div>
91 </div>
92 </div>
93 <div class="row">
94 <div class="col-sm-12">
95 <form method='post' action='procedure_provider_list.php'>
96 <div class="btn-group">
97 <button type="button" name="form_search" class="btn btn-default btn-refresh" onclick="refreshme()"><?php echo xlt('Refresh');?></button>
98 <button type="button" class="btn btn-default btn-add" onclick="doedclick_add()"><?php echo xlt('Add New');?></button>
99 </div>
100 <br>
101 <br>
102 <table class="table table-striped table-hover">
103 <thead>
104 <tr>
105 <th title='<?php echo xla('Click to view or edit'); ?>'><?php echo xlt('Name'); ?></th>
106 <th><?php echo xlt('NPI'); ?></th>
107 <th><?php echo xlt('Protocol'); ?></th>
108 <th class="text-center"><?php echo xlt('Edit'); ?></th>
109 </tr>
110 </thead>
111 <tbody>
112 <?php
113 while ($row = sqlFetchArray($res)) {
114 echo " <tr class='detail'>";
115 echo " <td>" . text($row['name']) . "</td>\n";
116 echo " <td>" . text($row['npi']) . "</td>\n";
117 echo " <td>" . text($row['protocol']) . "</td>\n";
118 if (acl_check('admin', 'practice')) {
119 $trTitle = xl('Edit') . ' ' . $row['name'];
120 echo " <td class=\"text-center\"><span style=\"color:#000000; cursor: pointer;\" onclick='doedclick_edit(" . $row['ppid'] . ")' class=\"haskids fa fa-pencil\" title='" . attr($trTitle) . "'></span></td>\n";
121 } else {
122 $trTitle = xl("Not Allowed to Edit") . ' ' . $row['name'];
123 echo " <td class=\"text-center\"><span style=\"color:#CACFD2;cursor: no-drop;\" class=\"haskids fa fa-pencil\" title='" . attr($trTitle) . "'></span></td>\n";
125 echo " </tr>\n";
128 </tbody>
129 </table>
130 </form>
131 </div>
132 </div>
133 </div><!-- End of container div -->
134 <br>
135 <?php
136 //home of the help modal ;)
137 //$GLOBALS['enable_help'] = 0; // Please comment out line if you want help modal to function on this page
138 if ($GLOBALS['enable_help'] == 1) {
139 echo "<script>var helpFile = 'procedure_provider_help.php'</script>";
140 //help_modal.php lives in interface, set path accordingly
141 require "../help_modal.php";
144 </body>
145 </html>