- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / include / inc_test_request_printout_baclabor.php
blob0cf5854b0a4f53277eb70cefde99e54010475af2
1 <table border="0">
2 <tbody>
3 <tr>
4 <td>
6 <table cellpadding=0 cellspacing=0 border=0 width=745 class="lab">
8 <tr >
9 <td colspan=4 bgcolor="#ffe3e3" align="center"><font size=3 color="#ee6666" face="verdana,arial"><b> <?php echo $LDCentralLab." - ".$formtitle ?></b></td>
10 </tr>
12 <tr>
13 <td bgcolor="#ee6666"><font size=1 color="#ffffff" face="verdana,arial"><b><?php echo strtoupper($LDMaterial); ?></b></td>
14 <td bgcolor="#ee6666"><font size=1 color="#ffffff" face="verdana,arial"><b><?php echo strtoupper($LDRequestedTest); ?></b></td>
15 <td bgcolor="#ee6666" align="center"><font size=1 color="#ffffff" face="verdana,arial"><b><?php echo strtoupper($LDLabel); ?></b></td>
16 <td bgcolor="<?php echo $bgc1 ?>"></td>
17 </tr>
19 <tr valign="top">
21 <td bgcolor="<?php echo $bgc1 ?>"><font size=1 color="#990000" face="arial">
22 <table border=0 cellpadding=0 cellspacing=0 class="lab">
25 <?php
26 while(list($x,$v)=each($LDBacLabMaterialType))
28 list($x2,$v2)=each($LDBacLabMaterialType);
29 echo '
30 <tr>
31 <td>'.$v.'&nbsp;&nbsp;&nbsp;</td>
32 <td>'.$v2.'&nbsp;&nbsp;&nbsp;</td>
33 </tr>
34 <tr>
35 <td>';
37 if($edit) echo '<a href="javascript:setM(\''.$x.'\')">';
39 $inp_v='0';
40 if($edit_form || $read_form )
42 if($stored_material[$x])
44 echo '<img src="../img/filled_pink_block.gif" ';
45 $inp_v='1';
47 else
49 echo '<img src="../img/pink_border.gif" ';
52 else
54 echo '<img src="../img/pink_border.gif" ';
57 echo 'border=0 width=18 height=6 align="absmiddle" id="'.$x.'">';
59 if($edit) echo '</a><input type="hidden" name="'.$x.'" value="'.$inp_v.'">';
60 echo '
61 </td>
62 <td>';
63 if($edit) echo '<a href="javascript:setM(\''.$x2.'\')">';
65 $inp_v='0';
66 if($edit_form || $read_form )
68 if($stored_material[$x2])
70 echo '<img src="../img/filled_pink_block.gif" ';
71 $inp_v='1';
73 else
75 echo '<img src="../img/pink_border.gif" ';
78 else
80 echo '<img src="../img/pink_border.gif" ';
83 echo 'border=0 width=18 height=6 align="absmiddle" id="'.$x2.'">';
85 if($edit) echo '</a><input type="hidden" name="'.$x2.'" value="'.$inp_v.'">';
86 echo '
87 </td>
88 </tr>';
91 ?>
92 </table>
94 </td>
95 <td bgcolor="<?php echo $bgc1 ?>"><font size=1 color="#990000" face="arial">
96 <table border=0 cellpadding=0 cellspacing=0 class="lab">
98 <?php
99 while(list($x3,$v3)=each($LDBacLabTestType))
101 list($x4,$v4)=each($LDBacLabTestType);
102 echo '
103 <tr>
104 <td>'.$v3.'&nbsp;&nbsp;&nbsp;</td>
105 <td>'.$v4.'&nbsp;&nbsp;&nbsp;</td>
106 </tr>
107 <tr>
108 <td>';
109 if($edit) echo '<a href="javascript:setM(\''.$x3.'\')">';
111 $inp_v='0';
112 if($edit_form || $read_form )
114 if($stored_test_type[$x3])
116 echo '<img src="../img/filled_pink_block.gif" ';
117 $inp_v='1';
119 else
121 echo '<img src="../img/pink_border.gif" ';
124 else
126 echo '<img src="../img/pink_border.gif" ';
129 echo 'border=0 width=18 height=6 align="absmiddle" id="'.$x3.'">';
131 if($edit) echo '</a><input type="hidden" name="'.$x3.'" value="'.$inp_v.'">';
132 echo '
133 </td>
134 <td>';
135 if($edit) echo '<a href="javascript:setM(\''.$x4.'\')">';
137 $inp_v='0';
138 if($edit_form || $read_form )
140 if($stored_test_type[$x4])
142 echo '<img src="../img/filled_pink_block.gif" ';
143 $inp_v='1';
145 else
147 echo '<img src="../img/pink_border.gif" ';
150 else
152 echo '<img src="../img/pink_border.gif" ';
155 echo 'border=0 width=18 height=6 align="absmiddle" id="'.$x4.'">';
156 if($edit) echo '</a><input type="hidden" name="'.$x4.'" value="'.$inp_v.'">';
157 echo '
158 </td>
159 </tr>';
163 </table>
165 </td>
168 <td bgcolor="<?php echo $bgc1 ?>" align="right">
169 <table border=0 cellpadding=10 bgcolor="#ee6666">
170 <tr>
171 <td>
173 <?php
175 if($edit || $edit_findings || $read_form || $edit_form)
177 echo '<img src="'.$root_path.'main/imgcreator/barcode_label_single_large.php?sid='.$sid.'&lang='.$lang.'&pn='.$result['patnum'].'" width=282 height=178>';
181 </td>
182 </tr>
183 </table>
185 </td>
186 <td align="right" bgcolor="<?php echo $bgc1 ?>">
188 <!-- Table for the case nr -->
189 <table border=0 cellspacing=0 cellpadding=0>
190 <?php
191 for($n=0;$n<8;$n++)
194 <tr align="center">
195 <?php
196 for($i=0;$i<10;$i++)
197 echo "<td><font size=1 face=\"verdana,arial\" color= \"#990000\">".$i."</td>";
199 </tr>
200 <tr>
201 <?php
203 for($i=0;$i<10;$i++)
205 echo '<td>';
206 if(substr($result['patnum'],$n,1)==$i) echo '<img src="../img/filled_pink_block.gif"';
207 else echo '<img src="../img/pink_border.gif"';
208 echo ' border=0 width=18 height=6 align="absmiddle"></td>';
211 </tr>
212 <?php
216 <tr>
217 <td><font size=1>&nbsp;</td>
218 </tr>
220 </table>
222 <!-- Table for the day and month code -->
223 <table border=0 cellspacing=0 cellpadding=0>
224 <tr align="center">
225 <?php
226 for($i=1;$i<11;$i++)
227 echo "<td><font size=1 face=\"verdana,arial\" color= \"#990000\">".$i."</td>";
229 <td><font size=1 face="arial" color= "#990000">20</td>
231 <td><font size=1 face="arial" color= "#990000">30</td>
233 </tr>
235 <tr align="center">
236 <?php
238 $day_tens=0;
239 $day_ones=0;
241 if($edit_form || $read_form )
243 /* Process the sampling date, isolate the elements from the DATE format */
244 list($yearval,$monval,$dayval) = explode("-",$stored_request['sample_date']);
246 else
248 /* If fresh form, assume today */
249 $yearval=(int)date('Y');
250 $dayval=(int)date('d');
251 $monval=(int)date('m');
254 /* Process the day of the week, separate the 10's from ones */
256 if($dayval>29)
258 $day_tens=30;
259 $day_ones=$dayval-$day_tens;
261 elseif($dayval>19)
263 $day_tens=20;
264 $day_ones=$dayval-$day_tens;
266 elseif($dayval>10)
268 $day_tens=10;
269 $day_ones=$dayval-$day_tens;
271 else
273 $day_ones=$dayval;
275 //echo $day_ones." ".$day_tens;
276 for($i=1;$i<10;$i++)
278 echo '<td>';
279 if($day_ones==$i) echo '<img src="../img/filled_pink_block.gif"';
280 else echo '<img src="../img/pink_border.gif"';
281 echo ' border=0 width=18 height=6 align="absmiddle"></td>';
283 /* For the 10's */
285 echo '<td>';
286 if($day_tens==10) echo '<img src="../img/filled_pink_block.gif"';
287 else echo '<img src="../img/pink_border.gif"';
288 echo ' border=0 width=18 height=6 align="absmiddle"></td>';
291 /* For the 20's */
293 echo '<td>';
294 if($day_tens==20) echo '<img src="../img/filled_pink_block.gif"';
295 else echo '<img src="../img/pink_border.gif"';
296 echo ' border=0 width=18 height=6 align="absmiddle"></td>';
299 /* For the 30's */
301 echo '<td>';
302 if($day_tens==30) echo '<img src="../img/filled_pink_block.gif"';
303 else echo '<img src="../img/pink_border.gif"';
304 echo ' border=0 width=18 height=6 align="absmiddle"></td>';
307 </tr>
308 <tr>
309 <?php
310 for($i=1;$i<13;$i++)
311 echo "<td><font size=1 face=\"arial\" color= \"#990000\">".$LDShortMonth[$i]."&nbsp;</td>";
314 </tr>
315 <tr>
316 <?php
318 for($i=1;$i<13;$i++)
320 echo '<td>';
321 if($monval==$i) echo '<img src="../img/filled_pink_block.gif"';
322 else echo '<img src="../img/pink_border.gif"';
323 echo ' border=0 width=18 height=6 align="absmiddle"></td>';
326 </tr>
327 <tr>
328 <td><font size=1>&nbsp;</td>
329 </tr>
330 </table>
333 </td>
334 </tr>
336 <!-- The red row for batch number -->
337 <tr bgcolor="<?php echo $bgc1 ?>">
338 <td bgcolor="#ee6666" colspan=4><font size=1 color="#ffffff" face="verdana,arial">
339 <b><?php echo $LDBatchNumber." ".$batch_nr ?> </b>
340 </td>
342 </tr>
346 <tr bgcolor="#fff3f3" valign="top">
347 <td colspan=3><?php
348 echo "<img src='".$root_path."classes/barcode/image.php?code=".$batch_nr."&style=68&type=I25&width=180&height=40&xres=2&font=5' border=0>";
349 ?> </td>
350 <td>&nbsp;</td>
351 <td align="right" rowspan=7>
355 </td>
356 <td></td>
357 </tr>
360 <tr bgcolor="#fff3f3" valign="top">
361 <td align="right"><font size=3 color="#ee6666" face="verdana,arial"><b><?php echo $LDMaterial ?></b></td>
362 <td colspan=2><font size=2 color="black" face="verdana,arial">&nbsp;<?php if($edit_form || $read_form || $edit_findings) echo stripslashes($stored_request['material_note']); ?></font></td>
363 </td>
364 </tr>
366 <tr bgcolor="#fff3f3" valign="top">
367 <td align="right"><font size=3 color="#ee6666" face="verdana,arial"><b><?php echo $LDDiagnosis ?></b></td>
368 <td colspan=2><font size=2 color="black" face="verdana,arial"><?php if($edit_form || $read_form || $edit_findings) echo stripslashes($stored_request['diagnosis_note']); ?></font></td>
369 </tr>
371 <tr bgcolor="<?php echo $bgc1 ?>" valign="top">
372 <td align="right" ><font size=1 color="#cc0000" face="verdana,arial">
373 <?php echo $LDImmuneSupp ?></td>
374 <td colspan=2><?php printRadioButton('immune_supp',1) ?> <?php echo $LDYes ?> <?php printRadioButton('immune_supp',0) ?> <?php echo $LDNo ?><br>
375 </td>
376 </tr>
378 <tr bgcolor="#fff3f3" valign="top">
379 <td colspan=3><font size=2 color="#ee6666" face="verdana,arial"><b><?php echo $LDFillLabOnly ?></b></td>
380 </tr>
382 <tr bgcolor="#fff3f3" valign="top">
383 <td><font size=1 color="#ee6666" face="verdana,arial"><?php
384 echo $LDLEN.'&nbsp;';
385 if($edit_findings)
387 echo '<input type="text" name="entry_nr" size=10 maxlength=10 ';
388 if($stored_findings['entry_nr']) echo 'value="'.$stored_findings['entry_nr'].'">';
389 else echo '>';
391 else
393 if($stored_findings['entry_nr']) echo $stored_findings['entry_nr'];
395 ?></td>
396 <td colspan=2><font size=1 color="#ee6666" face="verdana,arial"><?php
397 echo $LDDate.'&nbsp;';
398 if($edit_findings)
400 echo '&nbsp;<input type="text" name="rec_date" size=10 maxlength=10 value="';
401 if($stored_findings['rec_date'] && $stored_findings['rec_date']!=DBF_NODATE) echo formatDate2Local($stored_findings['rec_date'],$date_format);
402 else echo formatDate2Local(date('Y-m-d'),$date_format);
403 echo '" onBlur="IsValidDate(this,\''.$date_format.'\')">';
405 else
407 if($stored_findings['rec_date'] && $stored_findings['rec_date']!=DBF_NODATE) echo formatDate2Local($stored_findings['rec_date'],$date_format);
409 ?></font></td>
410 </tr>
412 <tr bgcolor="<?php echo $bgc1 ?>" valign="top">
413 <td align="right" >&nbsp;</td>
414 <td colspan=2>
415 <?php
416 if($edit_findings) echo '
417 <a href="javascript:setM(\'findings_init\')">';
418 if($stored_findings['findings_init'])
420 echo '<img src="f.gif"';
421 $inp_v=1;
423 else
425 echo '<img src="b.gif"';
426 $inp_v=0;
429 echo ' width=18 height=6';
431 if($edit_findings) echo ' border=0 id="findings_init"></a><input type="hidden" name="findings_init" value="'.$inp_v.'">';
432 else echo '>';
434 echo $LDInitFindings.'&nbsp;';
436 if($edit_findings) echo '
437 <a href="javascript:setM(\'findings_current\')">';
438 if($stored_findings['findings_current'])
440 echo '<img src="f.gif"';
441 $inp_v=1;
443 else
445 echo '<img src="b.gif"';
446 $inp_v=0;
449 echo ' width=18 height=6';
451 if($edit_findings) echo ' border=0 id="findings_current"></a><input type="hidden" name="findings_current" value="'.$inp_v.'">';
452 else echo '>';
454 echo $LDCurrentFindings.'&nbsp;';
456 if($edit_findings) echo '
457 <a href="javascript:setM(\'findings_final\')">';
458 if($stored_findings['findings_final'])
460 echo '<img src="f.gif"';
461 $inp_v=1;
463 else
465 echo '<img src="b.gif"';
466 $inp_v=0;
469 echo ' width=18 height=6';
471 if($edit_findings) echo ' border=0 id="findings_final"></a><input type="hidden" name="findings_final" value="'.$inp_v.'">';
472 else echo '>';
474 echo $LDFinalFindings.'&nbsp;';
478 </td>
479 </tr>
480 </table>
482 </td>
483 </tr>
484 </tbody>
485 </table>