Merge branch 'master' of git://github.com/openemr/openemr
[openemr.git] / contrib / forms / routine_screening_record / new.php
blobc53824007483c5bd8d500a5b0f1abb3bdba87705
1 <?php
2 include_once("../../globals.php");
3 include_once("$srcdir/api.inc");
4 include_once("$srcdir/forms.inc");
5 include_once("$srcdir/calendar.inc");
6 $frmn = 'form_routine_screening_record';
7 $ftitle = 'Routine screening record';
8 $old = sqlStatement("select form_id, formdir from forms where (form_name='${ftitle}') and (pid=$pid) order by date desc limit 1");
9 if ($old) {
10 $dt = sqlFetchArray($old);
11 $fid = $dt{'form_id'};
12 if ($fid && ($fid != 0) && ($fid != '')){
13 $fdir = $dt{'formdir'};
14 unset($dt);
15 $dt = formFetch($frmn, $fid);
16 $newid = formSubmit($frmn, array_slice($dt,7), $id, $userauthorized);
17 addForm($encounter, $ftitle, $newid, $fdir, $pid, $userauthorized);
18 $id = $newid;
19 formJump("${rootdir}/patient_file/encounter/view_form.php?formname=${fdir}&id=${newid}");
20 exit;
24 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
25 "http://www.w3.org/TR/html4/loose.dtd">
27 <html>
28 <head>
29 <?php html_header_show();?>
30 <title>Form: Routine screening record</title>
31 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
32 <link rel="stylesheet" href="../../acog.css" type="text/css">
33 <script language="JavaScript" src="../../acog.js" type="text/JavaScript"></script>
34 <script language="JavaScript" type="text/JavaScript">
35 window.onload = initialize;
36 </script>
37 </head>
39 <?php
40 $fres=sqlStatement("select * from patient_data where pid='".$pid."'");
41 if ($fres){
42 $patient = sqlFetchArray($fres);
45 <body class="body_top">
47 <form action="<?php echo $rootdir;?>/forms/routine_screening_record/save.php?mode=new" method="post" enctype="multipart/form-data" name="my_form">
48 <?php include("../../acog_menu.inc"); ?>
49 <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>
50 <div style="border: solid 2px black; background-color:#FFFFFF;">
51 <table border="0" cellpadding="2" cellspacing="0">
52 <tr align="left" valign="bottom">
53 <td colspan="4" class="fibody2" id="bordR">patient name:
54 <input name="pname" type="text" class="fullin" id="pname" style="width: 74%" value="<?php
55 echo $patient{'fname'}.' '.$patient{'mname'}.' '.$patient{'lname'};
56 ?>"></td>
57 <td colspan="4" class="fibody2" id="bordR">Birth date:
58 <input name="pbdate" type="text" class="fullin" id="pbdate" style="width: 65%" value="<?php
59 echo $patient{'DOB'};
60 ?>"></td>
61 <td colspan="3" class="fibody2">ID No:
62 <input name="rs_pid" type="text" class="fullin" id="rs_pid" style="width:80%" value="<?php
63 echo $patient{'id'};
64 ?>"></td>
65 </tr>
66 <tr align="center" valign="middle">
67 <td class="ficaption2" id="bordR">age</td>
68 <td width="9%" class="ficaption2" id="bordR">Cervical cytology </td>
69 <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>
70 <td width="9%" class="ficaption2" id="bordR">Mammo-<br>
71 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>
72 <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>
73 <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>
74 <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>
75 <td width="9%" class="ficaption2" id="bordR">Gonor-<br>
76 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>
77 <td width="9%" class="ficaption2" id="bordR">Urinalysis</td>
78 <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>
79 <td width="9%" class="ficaption2">Thyroid stimulating hormone screening </td>
80 </tr>
81 <tr align="center" valign="middle">
82 <td class="fibody2" id="bordR">13-18</td>
83 <td class="fibody2" id="bordR">ANNUALLY BEGINNING
84 APPROXIMATELY 3 YEARS
85 AFTER INITIATION OF
86 SEXUAL INTERCOURSE</td>
87 <td class="fibody2" id="bordR">&nbsp; </td>
88 <td class="fibody2" id="bordR">&nbsp; </td>
89 <td class="fibody2" id="bordR">&nbsp; </td>
90 <td class="fibody2" id="bordR">&nbsp; </td>
91 <td class="fibody2" id="bordR"> SEXUALLY ACTIVE WOMEN
92 UNDER AGE 25</td>
93 <td class="fibody2" id="bordR">SEXUALLY ACTIVE
94 ADOLES-<br>
95 CENTS</td>
96 <td class="fibody2" id="bordR">&nbsp;</td>
97 <td class="fibody2" id="bordR">&nbsp;</td>
98 <td class="fibody2">&nbsp;</td>
99 </tr>
100 <tr align="center" valign="middle">
101 <td class="fibody2" id="bordR">19-39</td>
102 <td class="fibody2" id="bordR">ANNUALLY BEGINNING NO LATER THAN AGE 21 YEARS</td>
103 <td class="fibody2" id="bordR">&nbsp; </td>
104 <td class="fibody2" id="bordR">&nbsp; </td>
105 <td class="fibody2" id="bordR">&nbsp; </td>
106 <td class="fibody2" id="bordR">&nbsp; </td>
107 <td class="fibody2" id="bordR"> SEXUALLY ACTIVE WOMEN<br>
108 UNDER AGE 25</td>
109 <td class="fibody2" id="bordR">&nbsp; </td>
110 <td class="fibody2" id="bordR">&nbsp;</td>
111 <td class="fibody2" id="bordR">&nbsp;</td>
112 <td class="fibody2">&nbsp;</td>
113 </tr>
114 <tr align="center" valign="middle">
115 <td class="fibody2" id="bordR">40-64</td>
116 <td class="fibody2" id="bordR">EVERY 23 YEARS AFTER 3
117 CONSECuTIVE NEGATIVE TEST
118 RESULTS IF NO HISTORY OF
119 CIN 2 OR 3,
120 IMMUNOSUP-<br>
121 PRESSION,
122 HIV INFECTION, OR DES
123 EXPOSURE IN UTERO</td>
124 <td class="fibody2" id="bordR">EVERY 5 YEARS
125 BEGINNING
126 AT AGE 45</td>
127 <td class="fibody2" id="bordR">EVERY 12 YEARS UNTIL
128 AGE 50; YEARLY
129 BEGINNING AT AGE 50</td>
130 <td class="fibody2" id="bordR"> BEGINNING AT AGE 50
131 YEARLY FOBT OR FLEXIBLE
132 SIGMOIDOSCOPY EVERY
133 5 YEARS OR YEARLY FOBT
134 PLUS FLEXIBLE
135 SIGMOIDOSCOPY EVERY 5
136 YEARS OR DCBE EVERY 5
137 YEARS OR COLONOSCOPY
138 EVERY 10 YEARS</td>
139 <td class="fibody2" id="bordR">&nbsp; </td>
140 <td class="fibody2" id="bordR">&nbsp; </td>
141 <td class="fibody2" id="bordR">&nbsp; </td>
142 <td class="fibody2" id="bordR">&nbsp;</td>
143 <td class="fibody2" id="bordR">EVERY 3 YEARS
144 AFTER AGE 45</td>
145 <td class="fibody2">EVERY 5 YEARS
146 BEGINNING AT AGE 50</td>
147 </tr>
148 <tr align="center" valign="middle">
149 <td class="fibody2" id="bordR">65 and older </td>
150 <td class="fibody2" id="bordR">EVERY 23 YEARS AFTER 3<br>
151 CONSECUTIVE NEGATIVE TEST
152 RESULTS IF NO HISTORY OF
153 CIN 2 OR 3,
154 IMMUNOSUP-<br>
155 PRESSION,
156 HIV INFECTION, OR DES
157 EXPOSURE IN UTERO</td>
158 <td class="fibody2" id="bordR">EVERY 5 YEARS</td>
159 <td class="fibody2" id="bordR">YEARLY OR AS
160 APPROPRIATE</td>
161 <td class="fibody2" id="bordR"> YEARLY FOBT OR FLEXIBLE
162 SIGMOIDOSCOPY EVERY
163 5 YEARS OR YEARLY FOBT
164 PLUS FLEXIBLE
165 SIGMOIDOSCOPY EVERY
166 YEARS OR DCBE EVERY
167 YEARS OR COLONOSCOPY
168 EVERY 10 YEARS</td>
169 <td class="fibody2" id="bordR"> IN THE ABSENCE OF
170 NEW RISK FACTORS,
171 SUBSEQUENT SCREENING
172 NOT MORE FREQUENTLY
173 THAN EVERY 2 YEARS</td>
174 <td class="fibody2" id="bordR">&nbsp; </td>
175 <td class="fibody2" id="bordR">&nbsp; </td>
176 <td class="fibody2" id="bordR">YEARLY OR AS
177 APPROPRIATE</td>
178 <td class="fibody2" id="bordR">EVERY 3 YEARS</td>
179 <td class="fibody2">EVERY 5 YEARS</td>
180 </tr>
181 <tr align="left" valign="bottom">
182 <td colspan="11" class="fibody2" style="border-bottom: 2px solid black;">&nbsp;</td>
183 </tr>
184 <?php
185 $rsi = 1;
186 while ($rsi < 9){
187 print <<<EOL
188 <tr align="left" valign="bottom">
189 <td class="fibody2" id="bordR">Date</td>
190 <td class="fibody3" id="bordR"><input name="cervical_date_${rsi}" type="text" class="fullin2"></td>
191 <td class="fibody3" id="bordR"><input name="lipid_date_${rsi}" type="text" class="fullin2"></td>
192 <td class="fibody3" id="bordR"><input name="mammo_date_${rsi}" type="text" class="fullin2"></td>
193 <td class="fibody3" id="bordR"><input name="colorectal_date_${rsi}" type="text" class="fullin2"></td>
194 <td class="fibody3" id="bordR"><input name="bone_date_${rsi}" type="text" class="fullin2"></td>
195 <td class="fibody3" id="bordR"><input name="chlamyd_date_${rsi}" type="text" class="fullin2"></td>
196 <td class="fibody3" id="bordR"><input name="gonor_date_${rsi}" type="text" class="fullin2"></td>
197 <td class="fibody3" id="bordR"><input name="urinal_date_${rsi}" type="text" class="fullin2"></td>
198 <td class="fibody3" id="bordR"><input name="glucose_date_${rsi}" type="text" class="fullin2"></td>
199 <td class="fibody3"><input name="thyroid_date_${rsi}" type="text" class="fullin2"></td>
200 </tr>
201 <tr align="left" valign="bottom">
202 <td class="fibody2" id="bordR">result</td>
203 <td class="fibody5" id="bordR"><input name="cervical_res_${rsi}" type="text" class="fullin2"></td>
204 <td class="fibody5" id="bordR"><input name="lipid_res_${rsi}" type="text" class="fullin2"></td>
205 <td class="fibody5" id="bordR"><input name="mammo_res_${rsi}" type="text" class="fullin2"></td>
206 <td class="fibody5" id="bordR"><input name="colorectal_res_${rsi}" type="text" class="fullin2"></td>
207 <td class="fibody5" id="bordR"><input name="bone_res_${rsi}" type="text" class="fullin2"></td>
208 <td class="fibody5" id="bordR"><input name="chlamyd_res_${rsi}" type="text" class="fullin2"></td>
209 <td class="fibody5" id="bordR"><input name="gonor_res_${rsi}" type="text" class="fullin2"></td>
210 <td class="fibody5" id="bordR"><input name="urinal_res_${rsi}" type="text" class="fullin2"></td>
211 <td class="fibody5" id="bordR"><input name="glucose_res_${rsi}" type="text" class="fullin2"></td>
212 <td class="fibody5"><input name="thyroid_res_${rsi}" type="text" class="fullin2"></td>
213 </tr>
214 EOL;
215 $rsi++;
218 </table>
219 </div>
220 <p>&nbsp;</p>
221 <table width="100%" border="0">
222 <tr>
223 <td align="left"> <a href="javascript:top.restoreSession();document.my_form.submit();" class="link_submit">[Save Data]</a> </td>
224 <td align="right"> <a href="<?php echo $GLOBALS['form_exit_url']; ?>" class="link_submit"
225 onclick="top.restoreSession()">[Don't Save]</a> </td>
226 </tr>
227 </table>
228 </form>
229 <?php
230 formFooter();
232 </body>
233 </html>