MySQL5.5 code fix for .sql files; changed TYPE= to ENGINE=
[openemr.git] / contrib / forms / routine_screening_record / view.php
bloba1b253ddb3c84d2124c86c73003b91f74bb45812
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");formHeader("Form: Routine screening record");
19 <html>
21 <head>
22 <?php html_header_show();?>
24 <title>Form: Routine screening record</title>
26 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
28 <link rel="stylesheet" href="../../acog.css" type="text/css">
30 <script language="JavaScript" src="../../acog.js" type="text/JavaScript"></script>
32 <script language="JavaScript" type="text/JavaScript">
34 window.onload = initialize;
36 </script>
38 </head>
42 <?php
44 $fres=sqlStatement("select * from patient_data where pid='".$pid."'");
46 if ($fres){
48 $patient = sqlFetchArray($fres);
52 $fres=sqlStatement("select * from form_routine_screening_record where id=$id");
54 if ($fres){
56 $fdata = sqlFetchArray($fres);
62 <body class="body_top">
66 <form action="<?php echo $rootdir;?>/forms/routine_screening_record/save.php?mode=update&id=<?php echo $id;?>" method="post" enctype="multipart/form-data" name="my_form">
68 <?php include("../../acog_menu.inc"); ?>
70 <div class="srvChapter">Routine screening record <a href="#" onMouseOver="toolTip('The <strong>Routine Screening Record</strong> includes those screening tests recommended by ACOG for routine use and provides reminders for recommended frequency of services.', 300)" onMouseOut="toolTip();"><img src="../../pic/mark_q.png" width="13" height="13" border="0" align="texttop"></a></div>
72 <div style="border: solid 2px black; background-color:#FFFFFF;">
74 <table border="0" cellpadding="2" cellspacing="0">
76 <tr align="left" valign="bottom">
78 <td colspan="4" class="fibody2" id="bordR">patient name:
80 <input name="pname" type="text" class="fullin" id="pname" style="width: 74%" value="<?php
82 echo $patient{'fname'}.' '.$patient{'mname'}.' '.$patient{'lname'};
84 ?>"></td>
86 <td colspan="4" class="fibody2" id="bordR">Birth date:
88 <input name="pbdate" type="text" class="fullin" id="pbdate" style="width: 65%" value="<?php
90 echo $patient{'DOB'};
92 ?>"></td>
94 <td colspan="3" class="fibody2">ID No:
96 <input name="rs_pid" type="text" class="fullin" id="rs_pid" style="width:80%" value="<?php
98 echo $patient{'id'};
100 ?>"></td>
102 </tr>
104 <tr align="center" valign="middle">
106 <td class="ficaption2" id="bordR">age</td>
108 <td width="9%" class="ficaption2" id="bordR">Cervical cytology </td>
110 <td width="9%" class="ficaption2" id="bordR">Lipid profile assessment<a href="#" onMouseOver="toolTip('This test may be appropriate for other patients based on risk (see High-Risk Laboratory Record and Table of High-Risk Factors)')" onMouseOut="toolTip();"><img src="../../pic/mark_q.png" width="13" height="13" border="0" align="texttop"></a></td>
112 <td width="9%" class="ficaption2" id="bordR">Mammo-<br>
114 graphy<a href="#" onMouseOver="toolTip('This test may be appropriate for other patients based on risk (see High-Risk Laboratory Record and Table of High-Risk Factors)')" onMouseOut="toolTip();"><img src="../../pic/mark_q.png" width="13" height="13" border="0" align="texttop"></a></td>
116 <td width="9%" class="ficaption2" id="bordR">Colorectal cancer screening <a href="#" onMouseOver="toolTip('This test may be appropriate for other patients based on risk (see High-Risk Laboratory Record and Table of High-Risk Factors)')" onMouseOut="toolTip();"><img src="../../pic/mark_q.png" width="13" height="13" border="0" align="texttop"></a></td>
118 <td width="9%" class="ficaption2" id="bordR">Bone density screening <a href="#" onMouseOver="toolTip('This test may be appropriate for other patients based on risk (see High-Risk Laboratory Record and Table of High-Risk Factors)')" onMouseOut="toolTip();"> <img src="../../pic/mark_q.png" width="13" height="13" border="0" align="texttop"></a></td>
120 <td width="9%" class="ficaption2" id="bordR">Chlamydia screening <a href="#" onMouseOver="toolTip('This test may be appropriate for other patients based on risk (see High-Risk Laboratory Record and Table of High-Risk Factors)')" onMouseOut="toolTip();"><img src="../../pic/mark_q.png" width="13" height="13" border="0" align="texttop"></a> </td>
122 <td width="9%" class="ficaption2" id="bordR">Gonor-<br>
124 rhea screening <a href="#" onMouseOver="toolTip('This test may be appropriate for other patients based on risk (see High-Risk Laboratory Record and Table of High-Risk Factors)')" onMouseOut="toolTip();"><img src="../../pic/mark_q.png" width="13" height="13" border="0" align="texttop"></a> </td>
126 <td width="9%" class="ficaption2" id="bordR">Urinalysis</td>
128 <td width="9%" class="ficaption2" id="bordR">Fasting glucose test <a href="#" onMouseOver="toolTip('This test may be appropriate for other patients based on risk (see High-Risk Laboratory Record and Table of High-Risk Factors)')" onMouseOut="toolTip();"><img src="../../pic/mark_q.png" width="13" height="13" border="0" align="texttop"></a></td>
130 <td width="9%" class="ficaption2">Thyroid stimulating hormone screening </td>
132 </tr>
134 <tr align="center" valign="middle">
136 <td class="fibody2" id="bordR">13-18</td>
138 <td class="fibody2" id="bordR">ANNUALLY BEGINNING
140 APPROXIMATELY 3 YEARS
142 AFTER INITIATION OF
144 SEXUAL INTERCOURSE</td>
146 <td class="fibody2" id="bordR">&nbsp; </td>
148 <td class="fibody2" id="bordR">&nbsp; </td>
150 <td class="fibody2" id="bordR">&nbsp; </td>
152 <td class="fibody2" id="bordR">&nbsp; </td>
154 <td class="fibody2" id="bordR"> SEXUALLY ACTIVE WOMEN
156 UNDER AGE 25</td>
158 <td class="fibody2" id="bordR">SEXUALLY ACTIVE
160 ADOLES-<br>
162 CENTS</td>
164 <td class="fibody2" id="bordR">&nbsp;</td>
166 <td class="fibody2" id="bordR">&nbsp;</td>
168 <td class="fibody2">&nbsp;</td>
170 </tr>
172 <tr align="center" valign="middle">
174 <td class="fibody2" id="bordR">19-39</td>
176 <td class="fibody2" id="bordR">ANNUALLY BEGINNING NO LATER THAN AGE 21 YEARS</td>
178 <td class="fibody2" id="bordR">&nbsp; </td>
180 <td class="fibody2" id="bordR">&nbsp; </td>
182 <td class="fibody2" id="bordR">&nbsp; </td>
184 <td class="fibody2" id="bordR">&nbsp; </td>
186 <td class="fibody2" id="bordR"> SEXUALLY ACTIVE WOMEN<br>
188 UNDER AGE 25</td>
190 <td class="fibody2" id="bordR">&nbsp; </td>
192 <td class="fibody2" id="bordR">&nbsp;</td>
194 <td class="fibody2" id="bordR">&nbsp;</td>
196 <td class="fibody2">&nbsp;</td>
198 </tr>
200 <tr align="center" valign="middle">
202 <td class="fibody2" id="bordR">40-64</td>
204 <td class="fibody2" id="bordR">EVERY 23 YEARS AFTER 3
206 CONSECuTIVE NEGATIVE TEST
208 RESULTS IF NO HISTORY OF
210 CIN 2 OR 3,
212 IMMUNOSUP-<br>
214 PRESSION,
216 HIV INFECTION, OR DES
218 EXPOSURE IN UTERO</td>
220 <td class="fibody2" id="bordR">EVERY 5 YEARS
222 BEGINNING
224 AT AGE 45</td>
226 <td class="fibody2" id="bordR">EVERY 12 YEARS UNTIL
228 AGE 50; YEARLY
230 BEGINNING AT AGE 50</td>
232 <td class="fibody2" id="bordR"> BEGINNING AT AGE 50
234 YEARLY FOBT OR FLEXIBLE
236 SIGMOIDOSCOPY EVERY
238 5 YEARS OR YEARLY FOBT
240 PLUS FLEXIBLE
242 SIGMOIDOSCOPY EVERY 5
244 YEARS OR DCBE EVERY 5
246 YEARS OR COLONOSCOPY
248 EVERY 10 YEARS</td>
250 <td class="fibody2" id="bordR">&nbsp; </td>
252 <td class="fibody2" id="bordR">&nbsp; </td>
254 <td class="fibody2" id="bordR">&nbsp; </td>
256 <td class="fibody2" id="bordR">&nbsp;</td>
258 <td class="fibody2" id="bordR">EVERY 3 YEARS
260 AFTER AGE 45</td>
262 <td class="fibody2">EVERY 5 YEARS
264 BEGINNING AT AGE 50</td>
266 </tr>
268 <tr align="center" valign="middle">
270 <td class="fibody2" id="bordR">65 and older </td>
272 <td class="fibody2" id="bordR">EVERY 23 YEARS AFTER 3<br>
274 CONSECUTIVE NEGATIVE TEST
276 RESULTS IF NO HISTORY OF
278 CIN 2 OR 3,
280 IMMUNOSUP-<br>
282 PRESSION,
284 HIV INFECTION, OR DES
286 EXPOSURE IN UTERO</td>
288 <td class="fibody2" id="bordR">EVERY 5 YEARS</td>
290 <td class="fibody2" id="bordR">YEARLY OR AS
292 APPROPRIATE</td>
294 <td class="fibody2" id="bordR"> YEARLY FOBT OR FLEXIBLE
296 SIGMOIDOSCOPY EVERY
298 5 YEARS OR YEARLY FOBT
300 PLUS FLEXIBLE
302 SIGMOIDOSCOPY EVERY
304 YEARS OR DCBE EVERY
306 YEARS OR COLONOSCOPY
308 EVERY 10 YEARS</td>
310 <td class="fibody2" id="bordR"> IN THE ABSENCE OF
312 NEW RISK FACTORS,
314 SUBSEQUENT SCREENING
316 NOT MORE FREQUENTLY
318 THAN EVERY 2 YEARS</td>
320 <td class="fibody2" id="bordR">&nbsp; </td>
322 <td class="fibody2" id="bordR">&nbsp; </td>
324 <td class="fibody2" id="bordR">YEARLY OR AS
326 APPROPRIATE</td>
328 <td class="fibody2" id="bordR">EVERY 3 YEARS</td>
330 <td class="fibody2">EVERY 5 YEARS</td>
332 </tr>
334 <tr align="left" valign="bottom">
336 <td colspan="11" class="fibody2" style="border-bottom: 2px solid black;">&nbsp;</td>
338 </tr>
340 <?php
342 $factors = array("cervical", "lipid", "mammo", "colorectal",
344 "bone", "chlamyd", "gonor", "urinal", "glucose", "thyroid");
346 $rsi = 1;
348 while ($rsi < 9){
350 $chunks = explode("|~", $fdata["record_$rsi"]);
352 list($cervical_date, $cervical_res) = explode('|', $chunks[0]);
354 list($lipid_date, $lipid_res) = explode('|', $chunks[1]);
356 list($mammo_date,$mammo_res) = explode('|', $chunks[2]);
358 list($colorectal_date,$colorectal_res) = explode('|', $chunks[3]);
360 list($bone_date,$bone_res) = explode('|', $chunks[4]);
362 list($chlamyd_date,$chlamyd_res) = explode('|', $chunks[5]);
364 list($gonor_date,$gonor_res) = explode('|', $chunks[6]);
366 list($urinal_date,$urinal_res) = explode('|', $chunks[7]);
368 list($glucose_date,$glucose_res) = explode('|', $chunks[8]);
370 list($thyroid_date,$thyroid_res) = explode('|', $chunks[9]);
376 print <<<EOL
378 <tr align="left" valign="bottom">
380 <td class="fibody2" id="bordR">Date</td>
382 <td class="fibody3" id="bordR"><input name="cervical_date_${rsi}" value="${cervical_date}" type="text" class="fullin2"></td>
384 <td class="fibody3" id="bordR"><input name="lipid_date_${rsi}" value="${lipid_date}" type="text" class="fullin2"></td>
386 <td class="fibody3" id="bordR"><input name="mammo_date_${rsi}" value="${mammo_date}" type="text" class="fullin2"></td>
388 <td class="fibody3" id="bordR"><input name="colorectal_date_${rsi}" value="${colorectal_date}" type="text" class="fullin2"></td>
390 <td class="fibody3" id="bordR"><input name="bone_date_${rsi}" value="${bone_date}" type="text" class="fullin2"></td>
392 <td class="fibody3" id="bordR"><input name="chlamyd_date_${rsi}" value="${chlamyd_date}" type="text" class="fullin2"></td>
394 <td class="fibody3" id="bordR"><input name="gonor_date_${rsi}" value="${gonor_date}" type="text" class="fullin2"></td>
396 <td class="fibody3" id="bordR"><input name="urinal_date_${rsi}" value="${urinal_date}" type="text" class="fullin2"></td>
398 <td class="fibody3" id="bordR"><input name="glucose_date_${rsi}" value="${glucose_date}" type="text" class="fullin2"></td>
400 <td class="fibody3"><input name="thyroid_date_${rsi}" value="${thyroid_date}" type="text" class="fullin2"></td>
402 </tr>
404 <tr align="left" valign="bottom">
406 <td class="fibody2" id="bordR">result</td>
408 <td class="fibody5" id="bordR"><input name="cervical_res_${rsi}" value="${cervical_res}" type="text" class="fullin2"></td>
410 <td class="fibody5" id="bordR"><input name="lipid_res_${rsi}" value="${lipid_res}" type="text" class="fullin2"></td>
412 <td class="fibody5" id="bordR"><input name="mammo_res_${rsi}" value="${mammo_res}" type="text" class="fullin2"></td>
414 <td class="fibody5" id="bordR"><input name="colorectal_res_${rsi}" value="${colorectal_res}" type="text" class="fullin2"></td>
416 <td class="fibody5" id="bordR"><input name="bone_res_${rsi}" value="${bone_res}" type="text" class="fullin2"></td>
418 <td class="fibody5" id="bordR"><input name="chlamyd_res_${rsi}" value="${chlamyd_res}" type="text" class="fullin2"></td>
420 <td class="fibody5" id="bordR"><input name="gonor_res_${rsi}" value="${gonor_res}" type="text" class="fullin2"></td>
422 <td class="fibody5" id="bordR"><input name="urinal_res_${rsi}" value="${urinal_res}" type="text" class="fullin2"></td>
424 <td class="fibody5" id="bordR"><input name="glucose_res_${rsi}" value="${glucose_res}" type="text" class="fullin2"></td>
426 <td class="fibody5"><input name="thyroid_res_${rsi}" value="${thyroid_res}" type="text" class="fullin2"></td>
428 </tr>
430 EOL;
432 $rsi++;
438 </table>
440 </div>
442 <p>&nbsp;</p>
444 <table width="100%" border="0">
446 <tr><td align="left" width="120"> <a href="javascript:top.restoreSession();document.my_form.submit();" class="link_submit">[Save Data]</a> </td>
448 <td align="left" nowrap> <a href="<?php echo $rootdir; ?>/patient_file/encounter/print_form.php?id=<?php echo $id; ?>&formname=<?php echo $formname; ?>"
450 target="_blank" class="link_submit" onclick="top.restoreSession()">[Printable form]</a> </td>
452 <td align="right"> <a href="<?php echo $GLOBALS['form_exit_url']; ?>" class="link_submit"
454 onclick="top.restoreSession()">[Don't Save]</a> </td></tr>
456 </table>
458 </form>
460 <?php
462 formFooter();
466 </body>
468 </html>