Fix for patient finder with PHP < 5.2.0.
[openemr.git] / contrib / forms / plist / view.php
blob8c1c67310149b1d1bfd06bd78a4af63e366045af
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
3 "http://www.w3.org/TR/html4/loose.dtd">
5 <?php
7 include_once("../../globals.php");
9 include_once("$srcdir/api.inc");
11 include_once("$srcdir/forms.inc");
13 include_once("$srcdir/calendar.inc");
19 <html>
21 <head>
22 <?php html_header_show();?>
24 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
26 <link rel="stylesheet" href="../../acog.css" type="text/css">
28 <script language="JavaScript" src="../../acog.js" type="text/JavaScript"></script>
30 <script language="JavaScript" type="text/JavaScript">
32 <!--
34 window.onload = initialize;
36 //-->
38 </script>
40 </head>
42 <?php
44 $fres = sqlStatement("select * from form_plist where id=$id");
46 $obj = sqlFetchArray($fres);
48 $fres=sqlStatement("select * from patient_data where pid=".$_SESSION["pid"]);
50 if ($fres){
52 $patient = sqlFetchArray($fres);
60 <body class="body_top">
64 <form action="<?php echo $rootdir;?>/forms/plist/save.php?mode=update&id=<?php echo $_GET["id"];?>" method="post" enctype="multipart/form-data" name="my_form">
66 <?php include("../../acog_menu.inc"); ?>
68 <table width="70%" border="0" cellspacing="0" cellpadding="4">
70 <tr>
72 <td width="120" align="left" valign="bottom" class="srvCaption">Patient name:</td>
74 <td align="left" valign="bottom"><input name="pname" type="text" class="fullin" id="pname" value="<?php echo $patient{'fname'}.' '.$patient{'mname'}.' '.$patient{'lname'}; ?>"></td>
76 </tr>
78 <tr>
80 <td width="120" align="left" valign="bottom" class="srvCaption">Birth date: </td>
82 <td align="left" valign="bottom"><input name="pbdate" type="text" class="fullin" id="pbdate" value="<?php echo $patient{'DOB'}; ?>"></td>
84 </tr>
86 <tr>
88 <td width="120" align="left" valign="bottom" class="srvCaption">ID No:</td>
90 <td align="left" valign="bottom"><input name="pl_pid" type="text" class="fullin" id="pl_pid" value="<?php echo $patient{'id'}; ?>" readonly="true"></td>
92 </tr>
94 <tr>
96 <td width="120" align="left" valign="bottom" class="srvCaption">Date</td>
98 <td align="left" valign="bottom"><input name="pl_date" type="text" class="fullin" id="pl_date" value="<?php echo date('Y-m-d'); ?>"></td>
100 </tr>
102 </table>
104 <div class="srvChapter">Problem list <a href="#" onMouseOver="toolTip('The Problem List captures problems, allergies, family history, and current medication use.')" onMouseOut="toolTip();"><img src="../../pic/mark_q.png" width="13" height="13" border="0"></a></div>
106 <div style="border: solid 2px black; background-color:#FFFFFF;">
108 <table width="100%" border="0" cellspacing="0" cellpadding="2">
110 <tr>
112 <td width="50%" class="ficaption3" id="bordR">High risk:</td>
114 <td width="50%" class="ficaption3">Family history:</td>
116 </tr>
118 <tr>
120 <td class="fibody2" id="bordR"><textarea name="pl_high_risk" rows="6" wrap="VIRTUAL" class="fullin2" id="pl_high_risk"><?php echo $obj{'pl_high_risk'} ?></textarea></td>
122 <td class="fibody2"><textarea name="pl_family_history" rows="6" wrap="VIRTUAL" class="fullin2" id="pl_family_history"><?php echo $obj{'pl_family_history'} ?></textarea></td>
124 </tr>
126 <tr>
128 <td class="ficaption3" id="bordR">Drug/Latex/Transfusion/Allergic reactions: </td>
130 <td class="ficaption3">Current medications:</td>
132 </tr>
134 <tr>
136 <td class="fibody3" id="bordR"><textarea name="pl_reactions" rows="6" wrap="VIRTUAL" class="fullin2" id="pl_reactions"><?php echo $obj{'pl_reactions'} ?></textarea></td>
138 <td class="fibody3"><textarea name="pl_medications" rows="6" wrap="VIRTUAL" class="fullin2" id="pl_medications"><?php echo $obj{'pl_medications'} ?></textarea></td>
140 </tr>
142 </table>
144 </div>
146 <p>&nbsp;</p>
148 <div style="border: solid 2px black; background-color:#FFFFFF;">
150 <table width="100%" border="0" cellspacing="0" cellpadding="2">
152 <tr>
154 <td width="20" align="left" valign="bottom" class="ficaption2" id="bordR">No</td>
156 <td width="120" align="center" valign="bottom" class="ficaption2" id="bordR">Entry date </td>
158 <td align="center" valign="bottom" class="ficaption2" id="bordR">Problem/Resolution</td>
160 <td width="120" align="center" valign="bottom" class="ficaption2" id="bordR">Onset age and date </td>
162 <td width="120" align="center" valign="bottom" class="ficaption2">Resolution date </td>
164 </tr>
166 <?php
168 $pli = 1;
172 while ($pli < 26){
174 //print $obj["pl_problem_$pli"];
176 list($pl_ed, $pl_problem, $pl_onset, $pl_rd) = explode('|~', $obj["pl_problem_${pli}"]);
178 print <<<EOL
180 <tr>
182 <td align="left" valign="bottom" class="fibody2" id="bordR">${pli}.</td>
184 <td align="left" valign="bottom" class="fibody2" id="bordR"><input name="pl_ed_${pli}" type="text" class="fullin2" value="${pl_ed}"></td>
186 <td align="left" valign="bottom" class="fibody2" id="bordR"><input name="pl_problem_${pli}" type="text" class="fullin2" value="${pl_problem}"></td>
188 <td align="left" valign="bottom" class="fibody2" id="bordR"><input name="pl_onset_${pli}" type="text" class="fullin2" value="${pl_onset}"></td>
190 <td align="left" valign="bottom" class="fibody2"><input name="pl_rd_${pli}" type="text" class="fullin2" value="${pl_rd}"></td>
192 </tr>
194 EOL;
196 $pli++;
202 </table>
204 </div>
206 <p>&nbsp;</p>
208 <table width="100%" border="0">
210 <tr>
212 <td align="left" width="100"> <a href="javascript:top.restoreSession();document.my_form.submit();" class="link_submit">[Save Data]</a> </td>
214 <td align="left" nowrap> <a href="<?php echo $rootdir; ?>/patient_file/encounter/print_form.php?id=<?php echo $id; ?>&formname=plist"
216 target="_blank" class="link_submit" onclick="top.restoreSession()">[Printable form]</a> </td>
218 <td align="right"> <a href="<?php echo $GLOBALS['form_exit_url']; ?>" class="link_submit"
220 onclick="top.restoreSession()">[Don't Save]</a> </td>
222 </tr>
224 </table>
226 </form>
228 <?php
230 formFooter();
234 </body>
236 </html>