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
. -->
19 include_once("../../globals.php");
20 include_once("$srcdir/api.inc");
21 include_once("$srcdir/forms.inc");
24 * name of the database table associated with this form
26 $table_name = "form_note";
28 if ($encounter == "") $encounter = date("Ymd");
30 if ($_GET["mode"] == "new") {
31 $newid = formSubmit($table_name, $_POST, $_GET["id"], $userauthorized);
32 addForm($encounter, "Work/School Note", $newid, "note", $pid, $userauthorized);
34 elseif ($_GET["mode"] == "update") {
35 $success = formUpdate($table_name, $_POST, $_GET["id"], $userauthorized);
37 $_SESSION["encounter"] = $encounter;
38 formHeader("Redirecting....");