3 * Work/School Note Form created by Nikolai Vitsyn: 2004/02/13 and update 2005/03/30
4 * Copyright (C) Open Source Medical Software
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * 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.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 include_once("../../globals.php");
24 include_once("$srcdir/api.inc");
25 formHeader("Form: note");
26 $returnurl = 'encounter_top.php';
27 $provider_results = sqlQuery("select fname, lname from users where username=?", array($_SESSION{"authUser"}));
29 /* name of this form */
32 // get the record from the database
33 if ($_GET['id'] != "") {
34 $obj = formFetch("form_".$form_name, $_GET["id"]);
37 /* remove the time-of-day from the date fields */
38 if ($obj['date_of_signature'] != "") {
39 $dateparts = explode(" ", $obj['date_of_signature']);
40 $obj['date_of_signature'] = $dateparts[0];
44 <?php
html_header_show();?
>
46 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
47 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker/build/jquery.datetimepicker.min.css">
49 <!-- supporting javascript code
-->
50 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery/dist/jquery.min.js"></script
>
51 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js?v=<?php echo $v_js_includes; ?>"></script
>
52 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js"></script
>
54 <script language
="JavaScript">
55 // required for textbox date verification
56 var mypcc
= '<?php echo $GLOBALS['phone_country_code
'] ?>';
58 function PrintForm() {
59 newwin
= window
.open("<?php echo $rootdir."/forms
/".$form_name."/print.php?id
=".attr($_GET["id
"]); ?>","mywin");
65 <body
class="body_top">
67 <form method
=post action
="<?php echo $rootdir."/forms
/".$form_name."/save
.php?mode
=update
&id
=".attr($_GET["id
"]);?>" name
="my_form" id
="my_form">
68 <span
class="title"><?php
echo xlt('Work/School Note'); ?
></span
><br
></br
>
70 <div style
="margin: 10px;">
71 <input type
="button" class="save" value
=" <?php echo xla('Save'); ?> ">  
;
72 <input type
="button" class="dontsave" value
="<?php echo xla('Don\'t Save'); ?>">  
;
73 <input type
="button" class="printform" value
="<?php echo xla('View Printable Version'); ?>">  
;
76 <select name
="note_type">
77 <option value
="WORK NOTE" <?php
if ($obj['note_type']=="WORK NOTE") {
79 } ?
>><?php
echo xlt('WORK NOTE'); ?
></option
>
80 <option value
="SCHOOL NOTE" <?php
if ($obj['note_type']=="SCHOOL NOTE") {
82 } ?
>><?php
echo xlt('SCHOOL NOTE'); ?
></option
>
85 <b
><?php
echo xlt('MESSAGE:'); ?
></b
>
87 <textarea name
="message" id
="message" cols
="67" rows
="4"><?php
echo text($obj["message"]);?
></textarea
>
92 <span
class=text
><?php
echo xlt('Doctor:'); ?
> </span
><input type
=entry name
="doctor" value
="<?php echo attr($obj["doctor
"]);?>">
94 <span
class="text"><?php
echo xlt('Date'); ?
></span
>
95 <input type
='text' size
='10' class='datepicker' name
='date_of_signature' id
='date_of_signature'
96 value
='<?php echo attr($obj['date_of_signature
']); ?>'
97 title
='<?php echo xla('yyyy
-mm
-dd
'); ?>' />
101 <div style
="margin: 10px;">
102 <input type
="button" class="save" value
=" <?php echo xla('Save'); ?> ">  
;
103 <input type
="button" class="dontsave" value
="<?php echo xla('Don\'t Save'); ?>">  
;
104 <input type
="button" class="printform" value
="<?php echo xla('View Printable Version'); ?>">  
;
111 <script language
="javascript">
113 // jQuery stuff to make the page a little easier to use
115 $
(document
).ready(function(){
116 $
(".save").click(function() { top
.restoreSession(); $
("#my_form").submit(); });
117 $
(".dontsave").click(function() { parent
.closeTab(window
.name
, false); });
118 $
(".printform").click(function() { PrintForm(); });
120 // disable the Print ability if the form has changed
121 // this forces the user to save their changes prior to printing
122 $
("#img_date_of_signature").click(function() { $
(".printform").attr("disabled","disabled"); });
123 $
("input").keydown(function() { $
(".printform").attr("disabled","disabled"); });
124 $
("select").change(function() { $
(".printform").attr("disabled","disabled"); });
125 $
("textarea").keydown(function() { $
(".printform").attr("disabled","disabled"); });
127 $
('.datepicker').datetimepicker({
128 <?php
$datetimepicker_timepicker = false; ?
>
129 <?php
$datetimepicker_showseconds = false; ?
>
130 <?php
$datetimepicker_formatInput = false; ?
>
131 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
132 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>