3 //////////////////////////////////////////////////////////////////////
4 // ------------------ DO NOT MODIFY VIEW.PHP !!! ---------------------
5 // View.php is an exact duplicate of new.php. If you wish to make
6 // any changes, then change new.php and either (recommended) make
7 // view.php a symbolic link to new.php, or copy new.php to view.php.
9 // And if you check in a change to either module, be sure to check
10 // in the other (identical) module also.
12 // This nonsense will go away if we ever move to subversion.
13 //////////////////////////////////////////////////////////////////////
15 // Copyright (C) 2005 Rod Roark <rod@sunsetsystems.com>
17 // This program is free software; you can redistribute it and/or
18 // modify it under the terms of the GNU General Public License
19 // as published by the Free Software Foundation; either version 2
20 // of the License, or (at your option) any later version.
22 require_once("../../globals.php");
23 require_once("$srcdir/api.inc.php");
24 require_once("$srcdir/forms.inc.php");
26 use OpenEMR\Core\Header
;
30 if (! $encounter) { // comes from globals.php
31 die("Internal error: we do not seem to be in an encounter!");
34 $formid = $_GET['id'];
36 // If Save was clicked, save the info.
38 if ($_POST['bn_save']) {
39 // If updating an existing form...
42 $query = "UPDATE form_hist_exam_plan SET
47 sqlStatement($query, array($_POST['form_history'], $_POST['form_examination'], $_POST['form_plan'], $formid ));
48 } else { // If adding a new form...
49 $query = "INSERT INTO form_hist_exam_plan (
50 history, examination, plan
51 ) VALUES ( ?, ?, ? )";
53 $newid = sqlInsert($query, array($_POST['form_history'], $_POST['form_examination'], $_POST['form_plan'] ));
54 addForm($encounter, "Hist/Exam/Plan", $newid, "hist_exam_plan", $pid, $userauthorized);
57 formHeader("Redirecting....");
64 $row = sqlQuery("SELECT * FROM form_hist_exam_plan WHERE
65 id = ? AND activity = '1'", array($formid));
70 <?php Header
::setupHeader(); ?
>
73 <body
<?php
echo $top_bg_line;?
> topmargin
="0" rightmargin
="0" leftmargin
="2"
74 bottommargin
="0" marginwidth
="2" marginheight
="0">
75 <form method
="post" action
="<?php echo $rootdir ?>/forms/hist_exam_plan/new.php?id=<?php echo attr_url($formid); ?>"
76 onsubmit
="return top.restoreSession()">
81 <table border
='1' width
='95%'>
83 <tr bgcolor
='#dddddd'>
84 <td colspan
='2' align
='center'><b
>History
, Examination
and Plan
</b
></td
>
88 <td width
='5%' nowrap
> History
</td
>
89 <td width
='95%' nowrap
>
90 <textarea name
='form_history' rows
='8' style
='width:100%'><?php
echo text($row['history']); ?
></textarea
>
95 <td nowrap
> Examination
</td
>
97 <textarea name
='form_examination' rows
='8' style
='width:100%'><?php
echo text($row['examination']); ?
></textarea
>
102 <td nowrap
> Plan
</td
>
104 <textarea name
='form_plan' rows
='8' style
='width:100%'><?php
echo text($row['plan']); ?
></textarea
>
111 <input type
='submit' name
='bn_save' value
='Save' />
113 <input type
='button' value
='Cancel' onclick
="parent.closeTab(window.name, false)" />