c1003541ae54ed881c66a2fe79337f169f563791
[openemr.git] / interface / forms / transfer_summary / new.php
blobc1003541ae54ed881c66a2fe79337f169f563791
1 <?php
2 /**
4 * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
6 * LICENSE: 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 3
9 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * 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, see <http://opensource.org/licenses/gpl-license.php>;.
17 * @package OpenEMR
18 * @author Naina Mohamed <naina@capminds.com>
19 * @link http://www.open-emr.org
22 //SANITIZE ALL ESCAPES
23 $sanitize_all_escapes=true;
25 //STOP FAKE REGISTER GLOBALS
26 $fake_register_globals=false;
28 include_once("../../globals.php");
29 include_once("$srcdir/api.inc");
30 require_once("$srcdir/patient.inc");
31 require_once("$srcdir/options.inc.php");
32 formHeader("Form:Transfer Summary");
33 $returnurl = $GLOBALS['concurrent_layout'] ? 'encounter_top.php' : 'patient_encounter.php';
34 $formid = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
35 $obj = $formid ? formFetch("form_transfer_summary", $formid) : array();
38 <html>
39 <head>
40 <?php html_header_show();?>
41 <script type="text/javascript" src="../../../library/dialog.js"></script>
42 <!-- pop up calendar -->
43 <style type="text/css">@import url(<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css);</style>
44 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script>
45 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
46 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script>
47 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script>
48 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js"></script>
49 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
50 </head>
52 <body class="body_top">
53 <p><span class="forms-title"><?php echo xlt('Transfer Summary'); ?></span></p>
54 </br>
55 <?php
56 echo "<form method='post' name='my_form' " .
57 "action='$rootdir/forms/transfer_summary/save.php?id=" . attr($formid) ."'>\n";
59 <table border="0">
60 <tr>
61 <td align="left" class="forms" class="forms"><?php echo xlt('Client Name' ); ?>:</td>
62 <td class="forms">
63 <label class="forms-data"> <?php if (is_numeric($pid)) {
65 $result = getPatientData($pid, "fname,lname,squad");
66 echo htmlspecialchars(xl('','','','').text($result['fname'])." ".text($result['lname']));}
67 $patient_name=($result['fname'])." ".($result['lname']);
69 </label>
70 <input type="hidden" name="client_name" value="<?php echo attr($patient_name);?>">
71 </td>
72 <td align="left" class="forms"><?php echo xlt('DOB'); ?>:</td>
73 <td class="forms">
74 <label class="forms-data"> <?php if (is_numeric($pid)) {
76 $result = getPatientData($pid, "*");
77 echo htmlspecialchars(($result['DOB']));}
78 $dob=($result['DOB']);
80 </label>
81 <input type="hidden" name="DOB" value="<?php echo attr($dob);?>">
82 </td>
83 </tr>
84 <tr>
86 <td align="left" class="forms"><?php echo xlt('Transfer to'); ?>:</td>
88 <td class="forms">
89 <input type="text" name="transfer_to" id="transfer_to"
90 value="<?php echo text($obj{"transfer_to"});?>"></td>
92 <td align="left" class="forms"><?php echo xlt('Transfer date'); ?>:</td>
93 <td class="forms">
94 <input type='text' size='10' name='transfer_date' id='transfer_date' <?php echo attr ($disabled)?>;
95 value='<?php echo attr($obj{"transfer_date"}); ?>'
96 title='<?php echo xla('yyyy-mm-dd Date of service'); ?>'
97 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
98 <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
99 id='img_transfer_date' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
100 title='<?php echo xla('Click here to choose a date'); ?>'>
101 </td>
103 </tr>
105 <tr>
106 <td align="left colspan="3" style="padding-bottom:7px;"></td>
107 </tr>
109 <tr>
110 <td align="left" class="forms"><b><?php echo xlt('Status Of Admission'); ?>:</b></td>
111 <td colspan="3"><textarea name="status_of_admission" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"status_of_admission"});?></textarea></td>
112 </tr>
113 <tr>
114 <td align="left colspan="3" style="padding-bottom:7px;"></td>
115 </tr>
116 <tr>
117 <td align="left" class="forms"><b><?php echo xlt('Diagnosis'); ?>:</b></td>
118 <td colspan="3"><textarea name="diagnosis" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"diagnosis"});?></textarea></td>
119 </tr>
120 <tr>
121 <td align="left colspan="3" style="padding-bottom:7px;"></td>
122 </tr>
123 <tr>
124 <td align="left" class="forms"><b><?php echo xlt('Intervention Provided'); ?>:</b></td>
125 <td colspan="3"><textarea name="intervention_provided" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"intervention_provided"});?></textarea></td>
126 </tr>
127 <tr>
128 <td align="left colspan="3" style="padding-bottom:7px;"></td>
129 </tr>
130 <tr>
131 <td align="left" class="forms"><b><?php echo xlt('Overall Status Of Discharge'); ?>:</b></td>
132 <td colspan="3"><textarea name="overall_status_of_discharge" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"overall_status_of_discharge"});?></textarea></td>
133 </tr>
135 <tr>
136 <td align="left colspan="3" style="padding-bottom:7px;"></td>
137 </tr>
139 <tr>
140 <td align="left colspan="3" style="padding-bottom:7px;"></td>
141 </tr>
142 <tr>
143 <td></td>
144 <td><input type='submit' value='<?php echo xlt('Save');?>' class="button-css">&nbsp;
145 <input type='button' value="Print" onclick="window.print()" class="button-css">&nbsp;
146 <input type='button' class="button-css" value='<?php echo xlt('Cancel');?>'
147 onclick="top.restoreSession();location='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" />
149 </td>
150 </tr>
151 </table>
152 </form>
154 <script language="javascript">
155 /* required for popup calendar */
156 Calendar.setup({inputField:"transfer_date", ifFormat:"%Y-%m-%d", button:"img_transfer_date"});
158 </script>
159 <?php
160 formFooter();