back to bug fixes (#2146)
[openemr.git] / interface / billing / sl_eob_patient_note.php
blob6eed9f3fd5815b00ddb154e691212b1dc223194e
1 <?php
2 /**
3 * This allows entry and editing of a "billing note" for the patient.
5 * @package OpenEMR
6 * @link http://www.open-emr.org
7 * @author Rod Roark <rod@sunsetsystems.com>
8 * @author Roberto Vasquez <robertogagliotta@gmail.com>
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2005 Rod Roark <rod@sunsetsystems.com>
11 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
12 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
16 require_once("../globals.php");
17 require_once("../../library/patient.inc");
18 require_once("../../library/forms.inc");
20 use OpenEMR\Core\Header;
22 $info_msg = "";
24 <html>
25 <head>
26 <?php Header::setupHeader();?>
27 <title><?php echo xlt('EOB Posting - Patient Note'); ?></title>
28 </head>
29 <body>
30 <?php
31 $patient_id = $_GET['patient_id'];
32 if (! $patient_id) {
33 die(xlt("You cannot access this page directly."));
36 if ($_POST['form_save']) {
37 if (!verifyCsrfToken($_POST["csrf_token_form"])) {
38 csrfNotVerified();
41 $thevalue = trim($_POST['form_note']);
43 sqlStatement("UPDATE patient_data SET " .
44 "billing_note = ? " .
45 "WHERE pid = ? ", array($thevalue, $patient_id));
47 echo "<script language='JavaScript'>\n";
48 if ($info_msg) {
49 echo " alert(" . js_escape($info_msg) . ");\n";
51 echo " window.close();\n";
52 echo "</script></body></html>\n";
53 exit();
56 $row = sqlQuery("select fname, lname, billing_note " .
57 "from patient_data where pid = ? limit 1", array($patient_id));
59 <div class="container">
60 <div class = "row">
61 <div class="page-header">
62 <h2><?php echo xlt('Billing Note for '). text($row['fname']) . " " . text($row['lname']); ?></h2>
63 </div>
64 </div>
65 <div class = "row">
66 <form method='post' action='sl_eob_patient_note.php?patient_id=<?php echo attr_url($patient_id); ?>'>
67 <input type="hidden" name="csrf_token_form" value="<?php echo attr(collectCsrfToken()); ?>" />
68 <div class="col-xs-12" style="padding-bottom:5px">
70 </div>
71 <div class="col-xs-12" style="padding-bottom:5px">
72 <div class="col-xs-12">
73 <input type='text' name='form_note' class='form-control' value='<?php echo attr($row['billing_note']) ?>' placeholder ='<?php echo xla('Max 255 characters')?>' />
74 </div>
75 </div>
76 <?php //can change position of buttons by creating a class 'position-override' and adding rule text-alig:center or right as the case may be in individual stylesheets ?>
77 <div class="form-group clearfix">
78 <div class="col-sm-12 text-left position-override" id="search-btn">
79 <div class="btn-group" role="group">
80 <button type='submit' class="btn btn-default btn-save" name='form_save' id="btn-save" ><?php echo xlt("Save"); ?></button>
81 <button type='submit' class="btn btn-link btn-cancel btn-separate-left" name='form_cancel' id="btn-cancel" onclick='window.close();'><?php echo xlt("Cancel"); ?></button>
82 </div>
83 </div>
84 </div>
85 </form>
86 </div>
87 </div><!--end of container div-->
89 </body>
90 </html>