added support for patient billing note
[openemr.git] / interface / billing / sl_eob_patient_note.php
blob611df4c5792ab93ff2d8da1e853c7d982e5c3f3f
1 <?
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 <link rel=stylesheet href="<?echo $css_header;?>" type="text/css">
20 <title>EOB Posting - Patient Note</title>
21 </head>
22 <body>
24 $patient_id = $_GET['patient_id'];
25 if (! $patient_id) die("You cannot access this page directly.");
27 if ($_POST['form_save']) {
28 $thevalue = trim($_POST['form_note']);
29 $thename = $thevalue ? "Billing" : "";
31 sqlStatement("UPDATE patient_data SET " .
32 "genericname2 = '$thename', " .
33 "genericval2 = '$thevalue' " .
34 "WHERE pid = '$patient_id'");
36 echo "<script language='JavaScript'>\n";
37 if ($info_msg) echo " alert('$info_msg');\n";
38 echo " window.close();\n";
39 echo "</script></body></html>\n";
40 exit();
43 $row = sqlQuery("select fname, lname, genericname2, genericval2 " .
44 "from patient_data where pid = '$patient_id' limit 1");
46 <center>
48 <h2>Billing Note for <? echo $row['fname'] . " " . $row['lname'] ?></h2>
49 <p>&nbsp;</p>
51 <form method='post' action='sl_eob_patient_note.php?patient_id=<? echo $patient_id ?>'>
53 <p>
54 <input type='text' name='form_note' size='60' maxlength='255'
55 value='<? echo addslashes($row['genericval2']) ?>' />
56 </p>
58 <p>&nbsp;</p>
59 <input type='submit' name='form_save' value='Save'>
60 &nbsp;
61 <input type='button' value='Cancel' onclick='window.close()'>
63 </form>
64 </center>
66 </body>
67 </html>