89a84d55c3981b3349c640b55744b8bb80f20db1
[openemr.git] / interface / forms / note / new.php
blob89a84d55c3981b3349c640b55744b8bb80f20db1
1 <!-- Work/School Note Form created by Nikolai Vitsyn: 2004/02/13 and update 2005/03/30
2 Copyright (C) Open Source Medical Software
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 program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -->
18 <?php
19 include_once("../../globals.php");
20 include_once("$srcdir/api.inc");
21 formHeader("Form: note");
22 $returnurl = $GLOBALS['concurrent_layout'] ? 'encounter_top.php' : 'patient_encounter.php';
23 $provider_results = sqlQuery("select fname, lname from users where username='" . $_SESSION{"authUser"} . "'");
24 /* name of this form */
25 $form_name = "note";
28 <html><head>
29 <?php html_header_show();?>
31 <!-- supporting javascript code -->
32 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery.js"></script>
33 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script>
35 <!-- pop up calendar -->
36 <style type="text/css">@import url(<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css);</style>
37 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script>
38 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
39 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script>
41 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
43 <script language="JavaScript">
44 // required for textbox date verification
45 var mypcc = '<?php echo $GLOBALS['phone_country_code'] ?>';
46 </script>
48 </head>
50 <body class="body_top">
51 <?php echo date("F d, Y", time()); ?>
53 <form method=post action="<?php echo $rootdir."/forms/".$form_name."/save.php?mode=new";?>" name="my_form" id="my_form">
54 <span class="title"><?php xl('Work/School Note','e'); ?></span><br></br>
56 <div style="margin: 10px;">
57 <input type="button" class="save" value=" <?php xl('Save','e'); ?> "> &nbsp;
58 <input type="button" class="dontsave" value="<?php xl('Don\'t Save','e'); ?>"> &nbsp;
59 </div>
61 <select name="note_type">
62 <option value="WORK NOTE"><?php xl('WORK NOTE','e'); ?></option>
63 <option value="SCHOOL NOTE"><?php xl('SCHOOL NOTE','e'); ?></option>
64 </select>
65 <br>
66 <b><?php xl('MESSAGE:','e'); ?></b>
67 <br>
68 <textarea name="message" id="message" rows="7" cols="47"></textarea>
69 <br>
71 <?php
72 // commented out below private field, because no field in database, and causes error.
74 <!--
75 <input type="checkbox" name="private" id="private"><label for="private">This note is private</label>
76 <br>
77 -->
79 <br>
80 <b><?php xl('Signature:','e'); ?></b>
81 <br>
83 <table>
84 <tr><td>
85 <?php xl('Doctor:','e'); ?>
86 <input type="text" name="doctor" id="doctor" value="<?php echo $provider_results["fname"].' '.$provider_results["lname"]; ?>">
87 </td>
89 <td>
90 <span class="text"><?php xl('Date','e'); ?></span>
91 <input type='text' size='10' name='date_of_signature' id='date_of_signature'
92 value='<?php echo date('Y-m-d', time()); ?>'
93 title='<?php xl('yyyy-mm-dd','e'); ?>'
94 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
95 <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
96 id='img_date_of_signature' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
97 title='<?php xl('Click here to choose a date','e'); ?>'>
98 </td>
99 </tr>
100 </table>
102 <div style="margin: 10px;">
103 <input type="button" class="save" value=" <?php xl('Save','e'); ?> "> &nbsp;
104 <input type="button" class="dontsave" value="<?php xl('Don\'t Save','e'); ?>"> &nbsp;
105 </div>
107 </form>
109 </body>
111 <script language="javascript">
112 /* required for popup calendar */
113 Calendar.setup({inputField:"date_of_signature", ifFormat:"%Y-%m-%d", button:"img_date_of_signature"});
115 // jQuery stuff to make the page a little easier to use
117 $(document).ready(function(){
118 $(".save").click(function() { top.restoreSession(); $('#my_form').submit(); });
119 $(".dontsave").click(function() { location.href='<?php echo "$rootdir/patient_file/encounter/$returnurl";?>'; });
120 //$("#printform").click(function() { PrintForm(); });
123 </script>
125 </html>