Security fixes 22
[openemr.git] / interface / billing / sl_eob_patient_note.php
blobf19905ccf3068fc1b3e6ea749af46472a4947da8
1 <?php
2 /**
3 * This allos entry and editing of a "billing note" for the patient.
4 *
5 * Copyright (C) 2005 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>
20 * @author Roberto Vasquez <robertogagliotta@gmail.com>
21 * @link http://www.open-emr.org
24 include_once("../globals.php");
25 include_once("../../library/patient.inc");
26 include_once("../../library/forms.inc");
28 $info_msg = "";
30 <html>
31 <head>
32 <?php html_header_show();?>
33 <link rel=stylesheet href="<?php echo $css_header;?>" type="text/css">
34 <title><?php xl('EOB Posting - Patient Note','e')?></title>
35 </head>
36 <body>
37 <?php
38 $patient_id = $_GET['patient_id'];
39 if (! $patient_id) die(xl("You cannot access this page directly."));
41 if ($_POST['form_save']) {
42 $thevalue = trim($_POST['form_note']);
43 $thename = $thevalue ? "Billing" : "";
45 sqlStatement("UPDATE patient_data SET " .
46 "genericname2 = ?, " .
47 "genericval2 = ? " .
48 "WHERE pid = ? ", array($thename, $thevalue, $patient_id));
50 echo "<script language='JavaScript'>\n";
51 if ($info_msg) echo " alert('$info_msg');\n";
52 echo " window.close();\n";
53 echo "</script></body></html>\n";
54 exit();
57 $row = sqlQuery("select fname, lname, genericname2, genericval2 " .
58 "from patient_data where pid = '$patient_id' limit 1");
60 <center>
62 <h2><?php echo xl('Billing Note for '). $row['fname'] . " " . $row['lname'] ?></h2>
63 <p>&nbsp;</p>
65 <form method='post' action='sl_eob_patient_note.php?patient_id=<?php echo $patient_id ?>'>
67 <p>
68 <input type='text' name='form_note' size='60' maxlength='255'
69 value='<?php echo addslashes($row['genericval2']) ?>' />
70 </p>
72 <p>&nbsp;</p>
73 <input type='submit' name='form_save' value='<?php xl("Save","e")?>'>
74 &nbsp;
75 <input type='button' value='<?php xl("Cancel","e")?>' onclick='window.close()'>
77 </form>
78 </center>
80 </body>
81 </html>