require the include of the security related scripts in globals.php
[openemr.git] / interface / billing / sl_eob_patient_note.php
blob4fb76ca9466358e0db99b08fa53c541fea739845
1 <?php
2 // Copyright (C) 2005 Rod Roark <rod@sunsetsystems.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 // This allows entry and editing of a "billing note" for the patient.
11 include_once("../globals.php");
12 include_once("../../library/patient.inc");
13 include_once("../../library/forms.inc");
15 $info_msg = "";
17 <html>
18 <head>
19 <?php html_header_show();?>
20 <link rel=stylesheet href="<?php echo $css_header;?>" type="text/css">
21 <title><?php xl('EOB Posting - Patient Note','e')?></title>
22 </head>
23 <body>
24 <?php
25 $patient_id = $_GET['patient_id'];
26 if (! $patient_id) die(xl("You cannot access this page directly."));
28 if ($_POST['form_save']) {
29 $thevalue = trim($_POST['form_note']);
30 $thename = $thevalue ? "Billing" : "";
32 sqlStatement("UPDATE patient_data SET " .
33 "genericname2 = '$thename', " .
34 "genericval2 = '$thevalue' " .
35 "WHERE pid = '$patient_id'");
37 echo "<script language='JavaScript'>\n";
38 if ($info_msg) echo " alert('$info_msg');\n";
39 echo " window.close();\n";
40 echo "</script></body></html>\n";
41 exit();
44 $row = sqlQuery("select fname, lname, genericname2, genericval2 " .
45 "from patient_data where pid = '$patient_id' limit 1");
47 <center>
49 <h2><?php echo xl('Billing Note for '). $row['fname'] . " " . $row['lname'] ?></h2>
50 <p>&nbsp;</p>
52 <form method='post' action='sl_eob_patient_note.php?patient_id=<?php echo $patient_id ?>'>
54 <p>
55 <input type='text' name='form_note' size='60' maxlength='255'
56 value='<?php echo addslashes($row['genericval2']) ?>' />
57 </p>
59 <p>&nbsp;</p>
60 <input type='submit' name='form_save' value='<?php xl("Save","e")?>'>
61 &nbsp;
62 <input type='button' value='<?php xl("Cancel","e")?>' onclick='window.close()'>
64 </form>
65 </center>
67 </body>
68 </html>