incremented database counter for prior commit and removed trailing whitespacing
[openemr.git] / interface / forms / eye_mag / report.php
blobed52c8aa0a9ce56bc4dc95db1dcd5b625e6356d3
1 <?php
3 /**
4 * forms/eye_mag/report.php
5 *
6 * Central report form for the eye_mag form. Here is where all new data for display
7 * is created. New reports are created via new.php and then this script is displayed.
8 * Edit are performed in view.php. Nothing is editable here, but it is scrollable
9 * across time...
11 * Copyright (C) 2016 Raymond Magauran <magauran@MedFetch.com>
13 * LICENSE: This program is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU Affero General Public License as
15 * published by the Free Software Foundation, either version 3 of the
16 * License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Affero General Public License for more details.
23 * You should have received a copy of the GNU Affero General Public License
24 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 * @package OpenEMR
27 * @author Ray Magauran <magauran@MedFetch.com>
28 * @link http://www.open-emr.org
30 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
31 * The HTML5 Sketch plugin stuff:
32 * Copyright (C) 2011 by Michael Bleigh and Intridea, Inc.
34 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
35 * and associated documentation files (the "Software"), to deal in the Software without restriction,
36 * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
37 * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
38 * subject to the following conditions:
40 * The above copyright notice and this permission notice shall be included in all copies or substantial
41 * portions of the Software.
42 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
45 $fake_register_globals=false;
46 $sanitize_all_escapes=true;
48 require_once("../../globals.php");
49 require_once(dirname(__FILE__) ."/../../../library/acl.inc");
50 require_once(dirname(__FILE__) ."/../../../library/api.inc");
51 require_once(dirname(__FILE__) ."/../../../library/sql.inc");
52 require_once(dirname(__FILE__) ."/../../../library/formatting.inc.php");
53 require_once(dirname(__FILE__) ."/../../../library/classes/Document.class.php");
54 require_once(dirname(__FILE__) ."/../../../library/classes/Note.class.php");
55 require_once(dirname(__FILE__) ."/../../../library/lists.inc");
56 require_once(dirname(__FILE__) ."/../../../library/forms.inc");
57 require_once(dirname(__FILE__) ."/../../../library/patient.inc");
59 $form_name = "eye_mag";
60 $form_folder = "eye_mag";
62 require_once("../../forms/".$form_folder."/php/".$form_folder."_functions.php");
64 if ($_REQUEST['CHOICE']) $choice = $_REQUEST['choice'];
66 if ($_REQUEST['ptid']) $pid = $_REQUEST['ptid'];
67 if ($_REQUEST['encid']) $encounter=$_REQUEST['encid'];
68 if ($_REQUEST['formid']) $form_id = $_REQUEST['formid'];
69 if ($_REQUEST['formname']) $form_name=$_REQUEST['formname'];
70 if (!$id) $id=$form_id;
71 // Get users preferences, for this user
72 // (and if not the default where a fresh install begins from, or someone else's)
73 $query = "SELECT * FROM form_eye_mag_prefs where PEZONE='PREFS' AND id=? ORDER BY ZONE_ORDER,ordering";
74 $result = sqlStatement($query,array($_SESSION['authUserID']));
75 while ($prefs= sqlFetchArray($result)) {
76 $LOCATION = $prefs['LOCATION'];
77 $$LOCATION = text($prefs['GOVALUE']);
80 function eye_mag_report($pid, $encounter, $cols, $id, $formname='eye_mag') {
81 global $form_folder;
82 global $form_name;
83 global $choice;
85 /** openEMR note: eye_mag Index is id,
86 * linked to encounter in form_encounter
87 * whose encounter is linked to id in forms.
90 $query="select form_encounter.date as encounter_date,form_eye_mag.*
91 from form_eye_mag ,forms,form_encounter
92 where
93 form_encounter.encounter =? and
94 form_encounter.encounter = forms.encounter and
95 form_eye_mag.id=forms.form_id and
96 forms.pid =form_eye_mag.pid and
97 form_eye_mag.pid=? ";
98 $objQuery =sqlQuery($query,array($encounter,$pid));
99 @extract($objQuery);
101 $dated = new DateTime($encounter_date);
102 $dated = $dated->format('Y/m/d');
103 global $visit_date;
105 $visit_date = oeFormatShortDate($dated);
108 * Patient/Client -> Visits -> Visit History, on mouse over this is called with variable "choice".
109 * To use this feature, this "choice" variable must be added programmatically to
110 * /interface/patient_file/history/encounters_ajax.php, currently line 20.
111 * The variable $choice will tell us what to display.
112 * If it is not present it will display everything == 'narrative'.
113 * @param string $choice options NULL,TEXT,DRAW,NARRATIVE
114 * @param string $encounter = encounter number
115 * @param string $pid value = patient id
116 * @return string => returns the HTML of the report selected
119 if ($choice == 'DRAW') {
121 $side="OU";
122 $zone = array("HPI","PMH","VISION","NEURO","EXT","ANTSEG","RETINA","IMPPLAN");
123 // for ($i = 0; $i < count($zone); ++$i) {
124 // show only 2 for now in the encounter page
125 ($choice =='drawing') ? ($count = count($zone)) : ($count ='2');
126 for ($i = 0; $i < $count; ++$i) {
127 $file_location = $GLOBALS["OE_SITES_BASE"]."/".$_SESSION['site_id']."/documents/".$pid."/".$form_folder."/".$encounter."/".$side."_".$zone[$i]."_VIEW.png";
128 $sql = "SELECT * from documents where url='file://".$file_location."'";
129 $doc = sqlQuery($sql);
130 if (file_exists($file_location) && ($doc['id'] > '0')) {
131 $filetoshow = $GLOBALS['web_root']."/controller.php?document&retrieve&patient_id=$pid&document_id=$doc[id]&as_file=false";
132 ?><div style='position:relative;float:left;width:100px;height:75px;'>
133 <img src='<?php echo $filetoshow; ?>' width=100 heght=75>
134 </div> <?
135 } else {
136 // $filetoshow = "../../forms/".$form_folder."/images/".$side."_".$zone[$i]."_BASE.png?".rand();
140 <?php
142 } else if ($choice == "drawing") {
145 <div class="borderShadow">
146 <?php display_draw_section ("VISION",$encounter,$pid); ?>
147 </div>
148 <div class="borderShadow">
149 <?php display_draw_section ("NEURO",$encounter,$pid); ?>
150 </div>
151 <div class="borderShadow">
152 <?php display_draw_section ("EXT",$encounter,$pid); ?>
153 </div>
154 <div class="borderShadow">
155 <?php display_draw_section ("ANTSEG",$encounter,$pid); ?>
156 </div>
157 <div class="borderShadow">
158 <?php display_draw_section ("RETINA",$encounter,$pid); ?>
159 </div>
160 <div class="borderShadow">
161 <?php display_draw_section ("IMPPLAN",$encounter,$pid); ?>
162 </div>
163 <?php
164 } else if ($choice == 'TEXT') {
165 //just display HPI and A/P
166 narrative($pid, $encounter, $cols, $id,'TEXT');
168 } else if ($choice !="narrative") {
169 narrative($pid, $encounter, $cols, $id,'narrative');
170 //return;
173 function left_overs() {
175 * Keep: this could be co-opted to export an XML/HL7 type of document
177 $count = 0;
178 $data = formFetch($table_name, $id);
180 if ($data) {
181 foreach($data as $key => $value) {
182 $$key=$value;
188 * This is the core report, including Practice logo, patient ID/header.
189 * It relies on the presence of the PMSFH,IMPPLAN arrays.
190 * Rest of fields are pulled from the DB.
192 function narrative($pid, $encounter, $cols, $form_id,$choice='full') {
193 global $form_folder;
194 global $PDF_OUTPUT;
195 global $OE_SITE_DIR;
196 global $formres;
197 global $dateres;
198 global $printable;
199 //if $cols == 'Fax', we are here from taskman, making a fax and this a one page short form - leave out PMSFH, prescriptions
200 //and any clinical area that is blank.
201 $query="select form_encounter.date as encounter_date,form_eye_mag.id as form_id,form_encounter.*, form_eye_mag.*
202 from form_eye_mag ,forms,form_encounter
203 where
204 form_encounter.encounter =? and
205 form_encounter.encounter = forms.encounter and
206 form_eye_mag.id=forms.form_id and
207 forms.deleted != '1' and
208 form_eye_mag.pid=? ";
210 $encounter_data =sqlQuery($query,array($encounter,$pid));
211 @extract($encounter_data);
212 $providerID = getProviderIdOfEncounter($encounter);
213 $providerNAME = getProviderName($providerID);
214 $dated = new DateTime($encounter_date);
215 $dated = $dated->format('Y/m/d');
216 $visit_date = oeFormatShortDate($dated);
219 <link rel="stylesheet" href="<?php echo attr($css_header);?>" type="text/css">
220 <link rel="stylesheet" href="../../forms/<?php echo attr($form_folder); ?>/css/report.css" type="text/css">
221 <style>
223 <?php if ($PDF_OUTPUT) { ?>
224 .mot {
225 text-align: center;
226 width:3mm;
227 height:3mm;
229 <?php } else { ?>
230 .mot {
231 text-align: center;
232 width:5mm;
233 height:5mm;
236 <?php } ?>
237 </style>
238 <div>
239 <?php
240 if (($cols =='Fax')||($cols=='Report')) echo report_header($pid,'PDF');
241 if ($PDF_OUTPUT) {
242 $titleres = getPatientData($pid, "fname,lname,providerID,DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
243 if ($_SESSION['pc_facility']) {
244 $sql = "select * from facility where id=" . $_SESSION['pc_facility'];
245 } else {
246 $sql = "SELECT * FROM facility ORDER BY billing_location DESC LIMIT 1";
248 $facility = sqlQuery($sql);
251 if ($choice !== 'TEXT') { ?>
253 <?php
254 } ?>
255 <table class="report_exam_group">
256 <tr>
257 <td style="text-align:left;padding:1px;vertical-align:top;max-width:720px;">
258 <table style="padding:5px;width:700px;">
259 <tr>
260 <td colspan="1" style="text-align: justify;text-justify: inter-word;width:100%;">
261 <b><?php echo xlt('Chief Complaint'); ?>:</b> &nbsp;<?php echo text($CC1); ?>
262 <br /><br />
263 <b><?php echo xlt('HPI'); ?>:</b>
264 &nbsp;<?php echo $HPI1; ?>
265 <br />
266 <div style="padding-left:20px;">
267 <?php
268 if ($TIMING1) {
269 echo "<i>".xlt('Timing'); ?>:</i> &nbsp;<?php echo text($TIMING1)."<br />";
271 if ($CONTEXT1) {
272 echo "<i>".xlt('Context'); ?>:</i> &nbsp;<?php echo text($CONTEXT1)."<br />";
274 if ($SEVERITY1) {
275 echo "<i>".xlt('Severity'); ?>:</i> &nbsp;<?php echo text($SEVERITY1)."<br />";
277 if ($MODIFY1) {
278 echo "<i>".xlt('Modifying'); ?>:</i> &nbsp;<?php echo text($MODIFY1)."<br />";
280 if ($ASSOCIATED1) {
281 echo "<i>".xlt('Associated'); ?>:</i> &nbsp;<?php echo text($ASSOCIATED1)."<br />";
283 if ($LOCATION1) {
284 echo "<i>".xlt('Location'); ?>:</i> &nbsp;<?php echo text($LOCATION1)."<br />";
286 if ($QUALITY1) {
287 echo "<i>".xlt('Quality'); ?>:</i> &nbsp;<?php echo text($QUALITY1)."<br />";
289 if ($DURATION1) {
290 echo "<i>".xlt('Duration'); ?>:</i> &nbsp;<?php echo text($DURATION1)."<br />";
294 <?php
295 if ($CC2) {
296 echo "
298 echo "<b>".xlt('Chief Complaint 2'); ?>:</b> &nbsp;<?php echo text($CC2); ?>
299 <br />
300 <b><?php echo xlt('HPI'); ?>:</b>
301 &nbsp;<?php echo text($HPI2); ?>
302 <br />
304 <div style="padding-left:10px;">
305 <?php
306 if ($TIMING2) {
307 echo "<i>".xlt('Timing'); ?>:</i> &nbsp;<?php echo text($TIMING2)."<br />";
309 if ($CONTEXT2) {
310 echo "<i>".xlt('Context'); ?>:</i> &nbsp;<?php echo text($CONTEXT2)."<br />";
312 if ($SEVERITY2) {
313 echo "<i>".xlt('Severity'); ?>:</i> &nbsp;<?php echo text($SEVERITY2)."<br />";
315 if ($MODIFY2) {
316 echo "<i>".xlt('Modifying'); ?>:</i> &nbsp;<?php echo text($MODIFY2)."<br />";
318 if ($ASSOCIATED2) {
319 echo "<i>".xlt('Associated'); ?>:</i> &nbsp;<?php echo text($ASSOCIATED2)."<br />";
321 if ($LOCATION2) {
322 echo "<i>".xlt('Location'); ?>:</i> &nbsp;<?php echo text($LOCATION2)."<br />";
324 if ($QUALITY2) {
325 echo "<i>".xlt('Quality'); ?>:</i> &nbsp;<?php echo text($QUALITY2)."<br />";
327 if ($DURATION2) {
328 echo "<i>".xlt('Duration'); ?>:</i> &nbsp;<?php echo text($DURATION2)."<br />";
331 </div>
332 <?php
334 if ($CC3) {
338 <?php echo "<b>".xlt('Chief Complaint 3'); ?>:</b> &nbsp;<?php echo text($CC3); ?>
339 <br />
340 <?php echo xlt('HPI'); ?>&nbsp; <?php echo text($HPI3); ?>
341 <br />
342 <div style="padding-left:10px;">
343 <?php
344 if ($TIMING3) {
345 echo "<i>".xlt('Timing'); ?>:</i> &nbsp;<?php echo text($TIMING3)."<br />";
347 if ($CONTEXT3) {
348 echo "<i>".xlt('Context'); ?>:</i> &nbsp;<?php echo text($CONTEXT3)."<br />";
350 if ($SEVERITY3) {
351 echo "<i>".xlt('Severity'); ?>:</i> &nbsp;<?php echo text($SEVERITY3)."<br />";
353 if ($MODIFY3) {
354 echo "<i>".xlt('Modifying'); ?>:</i> &nbsp;<?php echo text($MODIFY3)."<br />";
356 if ($ASSOCIATED3) {
357 echo "<i>".xlt('Associated'); ?>:</i> &nbsp;<?php echo text($ASSOCIATED3)."<br />";
359 if ($LOCATION3) {
360 echo "<i>".xlt('Location'); ?>:</i> &nbsp;<?php echo text($LOCATION3)."<br />";
362 if ($QUALITY3) {
363 echo "<i>".xlt('Quality'); ?>:</i> &nbsp;<?php echo text($QUALITY3)."<br />";
365 if ($DURATION3) {
366 echo "<i>".xlt('Duration'); ?>:</i> &nbsp;<?php echo text($DURATION3)."<br />";
369 </div>
371 <?php
375 <?php
376 if (($CHRONIC1)&&($cols != 'Fax')) { ?>
377 <b><?php echo xlt('Chronic or Inactive Problems'); ?>:</b> <br />
378 &nbsp;<?php echo text($CHRONIC1)."<br />";
379 if ($CHRONIC2) echo "&nbsp;".$CHRONIC2."<br />";
380 if ($CHRONIC3) echo "&nbsp;".$CHRONIC3."<br />";
381 } ?>
382 </div>
383 </td>
384 </tr>
385 </table>
386 </td>
387 <td style="width:220px;padding:1px;vertical-align:top;">
388 <?php
389 //get patient photo
390 //no idea if this works for couchDB people
391 $sql = "SELECT * FROM documents,categories,categories_to_documents WHERE
392 documents.id=categories_to_documents.document_id and
393 categories.id=categories_to_documents.category_id and
394 categories.name='Patient Photograph' and
395 documents.foreign_id=?";
396 $doc = sqlQuery($sql,array($pid));
397 $document_id =$doc['document_id'];
398 if (is_numeric($document_id)) {
400 $d = new Document($document_id);
401 $fname = basename($d->get_url());
402 $couch_docid = $d->get_couch_docid();
403 $couch_revid = $d->get_couch_revid();
404 $url_file = $d->get_url_filepath();
405 if($couch_docid && $couch_revid){
406 $url_file = $d->get_couch_url($pid,$encounter);
408 // Collect filename and path
409 $from_all = explode("/",$url_file);
410 $from_filename = array_pop($from_all);
411 $from_pathname_array = array();
412 for ($i=0;$i<$d->get_path_depth();$i++) {
413 $from_pathname_array[] = array_pop($from_all);
415 $from_pathname_array = array_reverse($from_pathname_array);
416 $from_pathname = implode("/",$from_pathname_array);
417 if($couch_docid && $couch_revid) {
418 $from_file = $GLOBALS['OE_SITE_DIR'] . '/documents/temp/' . $from_filename;
420 else {
421 $from_file = $GLOBALS["fileroot"] . "/sites/" . $_SESSION['site_id'] .
422 '/documents/' . $from_pathname . '/' . $from_filename;
424 if ($PDF_OUTPUT) {
425 echo "<img src='". $from_file."' style='width:220px;'>";
426 } else {
427 $filetoshow = $GLOBALS['webroot']."/controller.php?document&retrieve&patient_id=$pid&document_id=".$doc['document_id']."&as_file=false&blahblah=".rand();
428 echo "<img src='".$filetoshow."' style='width:220px;'>";
432 </td>
433 </tr>
434 </table>
435 <?php
436 if ($choice !== 'TEXT') {
437 //exclude all of this from displaying on the summary mouseover by default
439 <hr style="width:50%;text-align:center;" />
440 <table style="margin:1 auto;" class="report_exam_group">
441 <tr>
442 <td style="width:680px;text-align:center;margin:1 auto;">
443 <?php
444 $PMSFH = build_PMSFH($pid);
445 if ($cols !='Fax') show_PMSFH_report($PMSFH);
446 $count_rx = '0';
448 $query = "select * from form_eye_mag_wearing where PID=? and FORM_ID=? and ENCOUNTER=? ORDER BY RX_NUMBER";
449 $wear = sqlStatement($query,array($pid,$form_id,$encounter));
450 while ($wearing = sqlFetchArray($wear)) {
451 $count_rx++;
452 ${"display_W_$count_rx"} = '';
453 ${"ODSPH_$count_rx"} = $wearing['ODSPH'];
454 ${"ODCYL_$count_rx"} = $wearing['ODCYL'];
455 ${"ODAXIS_$count_rx"} = $wearing['ODAXIS'];
456 ${"OSSPH_$count_rx"} = $wearing['OSSPH'];
457 ${"OSCYL_$count_rx"} = $wearing['OSCYL'];
458 ${"OSAXIS_$count_rx"} = $wearing['OSAXIS'];
459 ${"ODMIDADD_$count_rx"} = $wearing['ODMIDADD'];
460 ${"OSMIDADD_$count_rx"} = $wearing['OSMIDADD'];
461 ${"ODADD_$count_rx"} = $wearing['ODADD'];
462 ${"OSADD_$count_rx"} = $wearing['OSADD'];
463 ${"ODVA_$count_rx"} = $wearing['ODVA'];
464 ${"OSVA_$count_rx"} = $wearing['OSVA'];
465 ${"ODNEARVA_$count_rx"} = $wearing['ODNEARVA'];
466 ${"OSNEARVA_$count_rx"} = $wearing['OSNEARVA'];
467 ${"ODPRISM_$count_rx"} = $wearing['ODPRISM'];
468 ${"OSPRISM_$count_rx"} = $wearing['OSPRISM'];
469 ${"COMMENTS_$count_rx"} = $wearing['COMMENTS'];
470 ${"W_$count_rx"} = '1';
471 ${"RX_TYPE_$count_rx"} = $wearing['RX_TYPE'];
475 </td>
476 </tr>
477 </table>
478 <table class="borderShadow" >
479 <tr style="font-size:10px;">
480 <!-- Start of the Vision box -->
481 <td class="report_vitals">
482 <b class="underline"><?php echo xlt('Visual Acuities'); ?></b>
483 <table id="Additional_VA" cellspacing="2" style="text-align:center;font-size:1.0em;">
484 <tr style="font-weight:bold;">
485 <td style="text-align:center;"></td>
486 <td style="width:50px;text-align:center;text-decoration:underline;"><?php echo xlt('OD'); ?></td>
487 <td style="width:50px;text-align:center;text-decoration:underline;"><?php echo xlt('OS'); ?></td>
488 </tr>
489 <?php if ($SCODVA||$SCOSVA) { ?>
490 <tr>
491 <td><?php echo xlt('sc{{without correction}}'); ?></td>
492 <td><?php echo text($SCODVA); ?></td>
493 <td><?php echo text($SCOSVA); ?></td>
494 </tr>
495 <?php } if ($ODVA_1||$OSVA_1) { ?>
496 <tr>
497 <td><?php echo xlt('cc{{with correction}}'); ?></td>
498 <td><?php echo text($ODVA_1); ?></td>
499 <td><?php echo text($OSVA_1); ?></td>
500 </tr>
501 <?php } if ($ARODVA||$AROSVA) { ?>
502 <tr>
503 <td><?php echo xlt('AR{{Auto-refraction}}'); ?></td>
504 <td><?php echo text($ARODVA); ?></td>
505 <td><?php echo text($AROSVA); ?></td>
506 </tr>
507 <?php } if ($MRODVA||$MROSVA) { ?>
508 <tr>
509 <td><?php echo xlt('MR{{Manifest Refraction}}'); ?></td>
510 <td><?php echo text($MRODVA); ?></td>
511 <td><?php echo text($MROSVA); ?></td>
512 </tr>
513 <?php } if ($CRODVA||$CROSVA) { ?>
514 <tr>
515 <td><?php echo xlt('CR{{Cycloplegic Refraction}}'); ?></td>
516 <td><?php echo text($CRODVA); ?></td>
517 <td><?php echo text($CROSVA); ?></td>
518 </tr>
519 <?php } if ($PHODVA||$PHOSVA) { ?>
520 <tr>
521 <td><?php echo xlt('PH{{Pinhole Vision}}'); ?></td>
522 <td><?php echo text($PHODVA); ?></td>
523 <td><?php echo text($PHOSVA); ?></td>
524 </tr>
525 <?php } if ($CTLODVA||$CTLOSVA) { ?>
526 <tr>
527 <td><?php echo xlt('CTL{{Contact Lens Vision}}'); ?></td>
528 <td><?php echo text($CTLODVA); ?></td>
529 <td><?php echo text($CTLOSVA); ?></td>
530 </tr>
531 <?php } if ($SCNEARODVA||$SCNEAROSVA) { ?>
532 <tr>
533 <td><?php echo xlt('scNear{{without correction at Near}}'); ?></td>
534 <td><?php echo text($SCNEARODVA); ?></td>
535 <td><?php echo text($SCNEAROSVA); ?></td>
536 </tr>
537 <?php } if ($ODNEARVA_1||$WNEAROSVA_1) { ?>
538 <tr>
539 <td><?php echo xlt('ccNear{{with correction at Near}}'); ?></td>
540 <td><?php echo text($ODNEARVA_1); ?></td>
541 <td><?php echo text($OSNEARVA_1); ?></td>
542 </tr>
543 <?php } if ($ARNEARODVA||$ARNEAROSVA) { ?>
544 <tr>
545 <td><?php echo xlt('ARNear{{Auto-refraction near acuity}}'); ?></td>
546 <td><?php echo text($ARNEARODVA); ?></td>
547 <td><?php echo text($ARNEAROSVA); ?></td>
548 </tr>
549 <?php } if ($MRNEARODVA||$MRNEAROSVA) { ?>
550 <tr>
551 <td><?php echo xlt('MRNear{{Manifest Near Acuity}}'); ?></td>
552 <td><?php echo text($MRNEARODVA); ?></td>
553 <td><?php echo text($MRNEAROSVA); ?></td>
554 </tr>
555 <?php } if ($PAMODVA||$PAMOSVA) { ?>
556 <tr>
557 <td><?php echo xlt('PAM{{Potential Acuity Meter}}'); ?></td>
558 <td><?php echo text($PAMODVA); ?></td>
559 <td><?php echo text($PAMOSVA); ?></td>
560 </tr>
561 <?php } if ($GLAREODVA||$GLAREOSVA) { ?>
562 <tr>
563 <td><?php echo xlt('Glare{{Acuity under Glare conditions}}'); ?></td>
564 <td><?php echo text($GLAREODVA); ?></td>
565 <td><?php echo text($GLAREOSVA); ?></td>
566 </tr>
567 <?php } if ($CONTRASTODVA||$CONTRASTOSVA) { ?>
568 <tr>
569 <td><?php echo xlt('Contrast{{Constaast Visual Acuity}}'); ?></td>
570 <td><?php echo text($CONTRASTODVA); ?></td>
571 <td><?php echo text($CONTRASTOSVA); ?></td>
572 </tr>
573 <?php } ?>
574 </table>
575 </td>
576 <!-- START OF THE PRESSURE BOX -->
577 <td class="report_vitals">
578 <b class="underline"><?php echo xlt('Intraocular Pressures'); ?></b>
579 <table cellspacing="2" style="margin:2;text-align:center;font-size:1.0em;">
580 <tr style="font-weight:bold;">
581 <td style="text-align:center;"></td>
582 <td style="text-align:center;text-decoration:underline;"><?php echo xlt('OD'); ?></td>
583 <td style="text-align:center;text-decoration:underline;"><?php echo xlt('OS'); ?></td>
584 </tr>
585 <?php
586 if ($ODIOPAP||$OSIOPAP) echo "<tr><td style='text-align:right;padding-right:10px;'>".xlt('App{{Applanation abbreviation}}').":</td><td style='text-align:center;'>".text($ODIOPAP)."</td><td style='width:75px;text-align:center;'>".text($OSIOPAP)."</td></tr>";
587 if ($ODIOPTPN||$OSIOPTPN) echo "<tr><td style='text-align:right;padding-right:10px;'>".xlt('Tpn{{Tonopen abbreviation}}').":</td><td style='text-align:center;'>".text($ODIOPTPN)."</td><td style='width:75px;text-align:center;'>".text($OSIOPTPN)."</td></tr>";
588 if ($ODIOPFTN||$OSIOPFTN) echo "<tr><td style='text-align:right;padding-right:10px;'>".xlt('FTN{{Finger Tension abbreviation}}').":</td><td style='text-align:center;'>".text($ODIOPFTN)."</td><td style='width:75px;text-align:center;'>".text($OSIOPFTN)."</td></tr>";
590 <tr>
591 <td colspan="3" style="text-align:center;">
592 @ <?php echo text($IOPTIME); ?>
593 </td>
594 </tr>
595 </table>
596 </td>
597 <!-- START OF THE FIELDS BOX -->
598 <?php
599 // if the VF zone is checked, display it
600 // if ODVF1 = 1 (true boolean) the value="0" checked="true"
601 for ($z=1; $z <5; $z++) {
602 $ODzone = "ODVF".$z;
603 if ($$ODzone =='1') {
604 $ODVF[$z] = '<i class="fa fa-square fa-5">X</i>';
605 if ($PDF_OUTPUT) $ODVF[$z] = 'X';
606 $bad++;
607 } else {
608 $ODVF[$z] = '<i class="fa fa-square-o fa-5"></i>';
609 if ($PDF_OUTPUT) $ODVF[$z] = 'O';
612 $OSzone = "OSVF".$z;
613 if ($$OSzone =="1") {
614 $OSVF[$z] = '<i class="fa fa-square fa-5">X</i>';
615 if ($PDF_OUTPUT) $OSVF[$z] = 'X';
616 $bad++;
617 } else {
618 $OSVF[$z] = '<i class="fa fa-square-o fa-5"></i>';
619 if ($PDF_OUTPUT) $OSVF[$z] = 'O';
624 <?php
625 if ($bad < '1' ) { ?>
626 <td class="report_vitals">
627 <b class="underline"><?php echo xlt('Fields'); ?></b>
628 <?php
629 echo "<br /><br />&nbsp;Full to CF OU&nbsp;<br /><br /><br />";
630 } else {
632 <td class="report_vitals">
633 <b class="underline"><?php echo xlt('Fields'); ?></b>
634 <table style="font-size:1.0em;text-align:center;">
635 <tr style="font-weight:bold;">
636 <td style="width:0.5in;text-align:center;text-decoration:underline;" colspan="2"><b><?php echo xlt('OD'); ?></b>
637 <br />
638 <br />
639 </td>
640 <td style="width:0.1in;"> </td>
641 <td style="width:0.5in;text-align:center;text-decoration:underline;" colspan="2"><b><?php echo xlt('OS'); ?></b>
642 <br />
643 <br />
644 </td>
645 </tr>
646 <tr>
647 <td style="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
648 <?php echo $ODVF['1']; ?>
649 </td>
650 <td style="border-left:1pt solid black;border-bottom:1pt solid black;text-align:center;">
651 <?php echo $ODVF['2']; ?>
652 </td>
653 <td></td>
654 <td style="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
655 <?php echo $OSVF['1']; ?>
656 </td>
657 <td style="border-left:1pt solid black;border-bottom:1pt solid black;text-align:center;">
658 <?php echo $OSVF['2']; ?>
659 </td>
660 </tr>
661 <tr>
662 <td style="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
663 <?php echo $ODVF['3']; ?>
664 </td>
665 <td style="border-left:1pt solid black;border-top:1pt solid black;text-align:center;">
666 <?php echo $ODVF['4']; ?>
667 </td>
668 <td></td>
669 <td style="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
670 <?php echo $OSVF['3']; ?>
671 </td>
672 <td style="border-left:1pt solid black;border-top:1pt solid black;text-align:center;">
673 <?php echo $OSVF['4']; ?>
674 </td>
675 </tr>
676 </table>
677 <?php
678 } ?>
679 </td>
681 <!-- START OF THE MOTILITY BOX -->
682 <td class="report_vitals">
683 <b class="underline"><?php echo xlt('Motility'); ?></b>
684 <?php
685 if ($MOTILITYNORMAL =='on') {
686 echo "<br /><br />&nbsp;".xlt('D&V Full OU{{Ductions and Versions full both eyes}}') ."&nbsp;<br /><br />";
687 } else {
688 if ($PDF_OUTPUT) {
689 $background = "url(".$GLOBALS["fileroot"] . "/interface/forms/".$form_folder."/images/eom.jpg)";
690 } else {
691 $background = "url(../../forms/".$form_folder."/images/eom.bmp)";
693 $zone = array("MOTILITY_RRSO","MOTILITY_RS","MOTILITY_RLSO","MOTILITY_RR","MOTILITY_R0","MOTILITY_RL","MOTILITY_RRIO","MOTILITY_RI","MOTILITY_RLIO","MOTILITY_LRSO","MOTILITY_LS","MOTILITY_LLSO","MOTILITY_LR","MOTILITY_L0","MOTILITY_LL","MOTILITY_LRIO","MOTILITY_LI","MOTILITY_LLIO");
694 for ($i = 0; $i < count($zone); ++$i) {
695 ($$zone[$i] >= '1') ? ($$zone[$i] = "-".$$zone[$i]) : ($$zone[$i] = '');
698 <table style="font-size:1.0em;">
699 <tr style="font-weight:bold;">
700 <td style="text-align:center;text-decoration:underline;"><?php echo xlt('OD'); ?></td>
701 <td style="text-align:center;text-decoration:underline;"><?php echo xlt('OS'); ?></td>
702 </tr>
703 <tr>
704 <td style="font-weight:600;">
705 <table style="background: <?php echo $background; ?> no-repeat center center;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50); -moz-opacity: 0.5; -webkit-opacity: 0.5; opacity:1.0;padding-bottom:5px;">
706 <tr>
707 <td class="mot"><?php echo $MOTILITY_RRSO; ?></td>
708 <td class="mot"><?php echo $MOTILITY_RS; ?></td>
709 <td class="mot"><?php echo $MOTILITY_RLSO; ?></td>
710 </tr>
711 <tr>
712 <td class="mot"><?php echo $MOTILITY_RR; ?></td>
713 <td class="mot"><?php echo $MOTILITY_R0; ?></td>
714 <td class="mot"><?php echo $MOTILITY_RL; ?></td>
715 </tr>
716 <tr>
717 <td class="mot"><?php echo $MOTILITY_RRIO; ?></td>
718 <td class="mot"><?php echo $MOTILITY_RI; ?></td>
719 <td class="mot"><?php echo $MOTILITY_RLIO; ?></td>
720 </tr>
721 </table>
722 </td>
723 <td style="text-align:center;font-weight:600;padding-left:20px;">
724 <table style="background: <?php echo $background; ?> no-repeat center center;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50) -moz-opacity: 0.5; -webkit-opacity: 1.0; opacity:0.5; padding:1px;">
725 <tr>
726 <td class="mot"><?php echo $MOTILITY_LRSO; ?></td>
727 <td class="mot"><?php echo $MOTILITY_LS; ?></td>
728 <td class="mot"><?php echo $MOTILITY_LLSO; ?></td>
729 </tr>
730 <tr>
731 <td class="mot"><?php echo $MOTILITY_LR; ?></td>
732 <td class="mot"><?php echo $MOTILITY_L0; ?></td>
733 <td class="mot"><?php echo $MOTILITY_LL; ?></td>
734 </tr>
735 <tr>
736 <td class="mot"><?php echo $MOTILITY_LLIO; ?></td>
737 <td class="mot"><?php echo $MOTILITY_LI; ?></td>
738 <td class="mot"><?php echo $MOTILITY_LLIO; ?></td>
739 </tr>
740 </table>
741 </td>
742 </tr>
743 </table>
744 <?php
745 } ?>
746 </td>
748 <?php
749 if (($PUPIL_NORMAL =='1')|| $ODPUPILSIZE1||$OSPUPILSIZE1) {
751 <td class="report_vitals" style="border-right:0px;">
752 <?php
753 if (($PUPIL_NORMAL =='1')&&(!$ODPUPILSIZE1||!$OSPUPILSIZE1)) { ?>
754 <b class="underline"><?php echo xlt('Pupils'); ?></b>&nbsp;&nbsp;
755 <?php echo xlt('Round and Reactive')."<br />";
757 if ($ODPUPILSIZE1||$OSPUPILSIZE1) { ?>
758 <table cellspacing="0" style="margin:1px;text-align:center;font-size:9px;">
759 <tr>
760 <!-- start of the Pupils box -->
761 <td>
762 <b class="underline"><?php echo xlt('Pupils'); ?></b>
763 <table style="font-size: 8px;text-align:middle;">
764 <tr>
765 <th> &nbsp;
766 </th>
767 <th style="padding: 2px 5px;"><?php echo xlt('size'); ?> (<?php echo xlt('mm{{size in millimeters}}'); ?>)
768 </th>
769 <th style="padding: 2px;"><?php echo xlt('react{{reactivity}}'); ?>
770 </th>
771 <th style="padding: 2px;"><?php echo xlt('APD{{Afferent Pupillary Defect}}'); ?>
772 </th>
773 </tr>
774 <tr>
775 <td><b><?php echo xlt('OD'); ?></b>
776 </td>
777 <td style="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
778 <?php echo text($ODPUPILSIZE1); ?>
779 --&gt;
780 <?php echo text($ODPUPILSIZE2); ?>
781 </td>
782 <td style="text-align:center;border-left:1pt solid black;border-right:1pt solid black;border-bottom:1pt solid black;">
783 <?php echo text($ODPUPILREACTIVITY); ?>
784 </td>
785 <td style="text-align:center;border-bottom:1pt solid black;">
786 <?php echo text($ODAPD); ?>
787 </td>
788 </tr>
789 <tr>
790 <td><b><?php echo xlt('OS'); ?></b>
791 </td>
792 <td style="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
793 <?php echo text($OSPUPILSIZE1); ?>
794 --&gt;
795 <?php echo text($OSPUPILSIZE2); ?>
796 </td>
797 <td style="text-align:center;border-left:1pt solid black;border-right:1pt solid black;border-top:1pt solid black;">
798 <?php echo text($OSPUPILREACTIVITY); ?>
799 </td>
800 <td style="text-align:center;border-top:1pt solid black;">
801 <?php echo text($OSAPD); ?>
802 </td>
803 </tr>
804 </table>
805 </td>
806 </tr>
807 </table>
808 </td>
809 <?php
811 } ?>
812 </tr>
813 </table>
814 <?php
816 if ($DIMODPUPILSIZE1||$DIMOSPUPILSIZE1||$PUPIL_COMMENTS||$AMSLEROD||$AMSLEROS) { ?>
817 <!-- start of slide down pupils_panel -->
818 <br />
819 <table class='borderShadow' style="margin:1px;text-align:center;font-size:9px;">
820 <tr>
821 <td>
822 <b class="underline"><?php echo xlt('Pupils') ?>: <?php echo xlt('Dim'); ?></b>
823 <table style="report_vitals" style="font-size: 8px;text-align:middle;">
824 <tr >
825 <th></th>
826 <th style="padding: 2px;text-align:center;" ><?php echo xlt('size'); ?> (<?php echo xlt('mm'); ?>)
827 </th>
828 </tr>
829 <tr>
830 <td><b><?php echo xlt('OD'); ?></b>
831 </td>
832 <td style="text-align:bottom;border-bottom:1pt solid black;padding-left:0.1in;">
833 <?php echo text($DIMODPUPILSIZE1); ?>
834 --&gt;
835 <?php echo text($DIMODPUPILSIZE2); ?>
836 </td>
838 </tr>
839 <tr>
840 <td ><b><?php echo xlt('OS'); ?></b>
841 </td>
842 <td style="border-top:1pt solid black;padding-left:0.1in;">
843 <?php echo text($DIMOSPUPILSIZE1); ?>
844 --&gt;
845 <?php echo text($DIMOSPUPILSIZE2); ?>
846 </td>
847 </tr>
848 <tr><td colspan="2" style="padding-left:2px;text-align:bottom;">
850 <?php echo text($PUPIL_COMMENTS); ?>
851 </td>
852 </tr>
853 </table>
854 </td>
855 <!-- end of slide down pupils_panel -->
856 <!-- START OF THE AMSLER BOX -->
857 <?php if ($AMSLEROD||$AMSLEROS) { ?>
858 <td class="report_vitals" style="border-right:0px;border-left:1pt solid black;">
859 <b class="underline"><?php echo xlt('Amsler'); ?></b>
860 <?php
861 if (!$AMSLEROD) $AMSLEROD= "0";
862 if (!$AMSLEROS) $AMSLEROS= "0";
864 <table style="font-size:1.0em;">
865 <tr style="font-weight:bold;">
866 <td style="text-align:center;text-decoration:underline;"><?php echo xlt('OD'); ?></td>
867 <td></td>
868 <td style="text-align:center;text-decoration:underline;"><?php echo xlt('OS'); ?></td>
869 </tr>
871 <tr>
872 <td style="text-align:center;">
873 <img src="../../forms/<?php echo $form_folder; ?>/images/Amsler_<?php echo attr($AMSLEROD); ?>.jpg" id="AmslerOD" style="margin:0.05in;height:0.5in;width:0.6in;" />
874 <br />
875 <small><?php echo text($AMSLEROD); ?>/5</small>
876 </td>
877 <td></td>
878 <td style="text-align:center;">
879 <img src="../../forms/<?php echo $form_folder; ?>/images/Amsler_<?php echo attr($AMSLEROS); ?>.jpg" id="AmslerOS" style="margin:0.05in;height:0.5in;width:0.6in;" />
880 <br /><small><?php echo text($AMSLEROS); ?>/5</small>
881 </td>
882 </tr>
883 </table>
884 </td>
885 <?php } ?>
886 </tr>
887 </table>
889 <?php
892 if ($cols !='Fax') {
893 if ($ODVA||$OSVA||$ARODSPH||$AROSSPH||$MRODSPH||$MROSSPH||$CRODSPH||$CROSSPH||$CTLODSPH||$CTLOSSPH) { ?>
894 <!-- start of the refraction boxes -->
895 <br />
896 <table class="refraction_tables">
897 <tr>
898 <td colspan="9" style="text-align:left;text-decoration:underline;font-weight:bold;"><?php echo xlt('Refractive States'); ?>
899 </td>
900 </tr>
901 <tr style="text-align:center;padding:5px;text-decoration:underline;">
902 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Type').$count_rx; ?></td>
903 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Eye'); ?></td>
904 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Sph{{Sphere}}'); ?></td>
905 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Cyl{{Cylinder}}'); ?></td>
906 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Axis'); ?></td>
907 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Prism'); ?></td>
908 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Acuity'); ?></td>
909 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Mid{{Middle Distance Add}}'); ?></td>
910 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('ADD{{Near Add}}'); ?></td>
911 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('Acuity'); ?></td>
912 </tr>
913 <?php
914 //$count_rx++;
915 for ($i=1; $i <= $count_rx; $i++) {
916 if (${"RX_TYPE_$i"} =="0") {
917 $RX_TYPE = '';
918 } else if (${"RX_TYPE_$i"} =="1") {
919 $RX_TYPE = xlt('Bifocals');
920 } else if (${"RX_TYPE_$i"} =="2") {
921 $RX_TYPE = xlt('Trifocals');
922 } else if (${"RX_TYPE_$i"} =="3") {
923 $RX_TYPE = xlt('Progressive');
926 Note html2pdf does not like the last field of a table to be blank.
927 If it is it will squish the lines together.
928 Work around: if the field is blank, then replace it with a "-" else echo it.
929 aka echo (text($field))?:"-");
932 <tr>
933 <td style="font-weight:600;font-size:0.7em;text-align:right;"><?php echo xlt('Current RX')." #".$i.": "; ?></td>
934 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('OD{{right eye}}'); ?></td>
935 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"ODSPH_$i"})?:"-"); ?></td>
936 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"ODCYL_$i"})?:"-"); ?></td>
937 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"ODAXIS_$i"})?:"-"); ?></td>
938 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"ODPRISM_$i"})?:"-"); ?></td>
939 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"ODVA_$i"})?:"-"); ?></td>
940 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"ODMIDADD_$i"})?:"-"); ?></td>
941 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"ODADD_$i"})?:"-"); ?></td>
942 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"ODNEARVA_$i"})?:"-"); ?></td>
943 </tr>
944 <tr>
945 <td style="font-weight:600;font-size:0.7em;text-align:right;"><?php echo $RX_TYPE; ?></td>
946 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('OS{{left eye}}'); ?></td>
947 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"OSSPH_$i"})?:"-"); ?></td>
948 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"OSCYL_$i"})?:"-"); ?></td>
949 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"OSAXIS_$i"})?:"-"); ?></td>
950 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"OSPRISM_$i"})?:"-"); ?></td>
951 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"OSVA_$i"})?:"-"); ?></td>
952 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"OSMIDADD_$i"})?:"-"); ?></td>
953 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"OSADD_$i"})?:"-"); ?></td>
954 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text(${"OSNEARVA_$i"})?:"-"); ?></td>
955 </tr>
956 <?php
957 if (${"COMMENTS_$i"}) {
959 <tr>
960 <td></td>
961 <td colspan="2"><?php echo xlt('Comments'); ?>:</td>
962 <td colspan="7"><?php echo text(${"COMMENTS_$i"}); ?></td>
963 </tr>
964 <?php
968 if ($ARODSPH||$AROSSPH) { ?>
969 <tr style="border-bottom:1pt solid black;">
970 <td style="font-weight:600;font-size:0.7em;text-align:right;"><?php echo xlt('Autorefraction'); ?></td>
971 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('OD{{right eye}}'); ?></td>
972 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($ARODSPH)?:"-"); ?></td>
973 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($ARODCYL)?:"-"); ?></td>
974 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($ARODAXIS)?:"-"); ?></td>
975 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($ARODPRISM)?:"-"); ?></td>
976 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($ARODVA)?:"-"); ?></td>
977 <td style="font-weight:400;font-size:1.0em;text-align:center;">-</td>
978 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($ARODADD)?:"-"); ?></td>
979 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($ARNEARODVA)?:"-"); ?></td>
980 </tr>
981 <tr>
982 <td>&nbsp;</td>
983 <td style="font-weight:400;font-size:1.0em;text-align:right;"><?php echo xlt('OS{{left eye}}'); ?></td>
984 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($AROSSPH)?:"-"); ?></td>
985 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($AROSCYL)?:"-"); ?></td>
986 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($AROSAXIS)?:"-"); ?></td>
987 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($AROSPRISM)?:"-"); ?></td>
988 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($AROSVA)?:"-"); ?></td>
989 <td style="font-weight:400;font-size:1.0em;text-align:center;">-</td>
990 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($AROSADD)?:"-"); ?></td>
991 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($ARNEAROSVA)?:"-"); ?></td>
992 </tr>
993 <?php
994 if (${"COMMENTS_$i"}) {
996 <tr>
997 <td></td><td></td>
998 <td>Comments:</td>
999 <td colspan="7"><?php echo text(${"COMMENTS_$i"}); ?></td>
1000 </tr>
1001 <?php
1004 if ($MRODSPH||$MROSSPH) { ?>
1005 <tr>
1006 <td style="font-weight:600;font-size:0.7em;text-align:right;"><?php echo xlt('Manifest (Dry) Refraction'); ?></td>
1007 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('OD{{right eye}}'); ?></td>
1008 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MRODSPH)?:"-"); ?></td>
1009 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MRODCYL)?:"-"); ?></td>
1010 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MRODAXIS)?:"-"); ?></td>
1011 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MRODPRISM)?:"-"); ?></td>
1012 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MRODVA)?:"-"); ?></td>
1013 <td style="font-weight:400;font-size:1.0em;text-align:center;">-</td>
1014 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MRODADD)?:"-"); ?></td>
1015 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MRNEARODVA)?:"-"); ?></td>
1016 </tr>
1017 <tr></tr>
1018 <tr>
1019 <td></td>
1020 <td style="font-weight:400;font-size:1.0em;text-align:right;"><?php echo xlt('OS{{left eye}}'); ?></td>
1021 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MROSSPH)?:"-"); ?></td>
1022 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MROSCYL)?:"-"); ?></td>
1023 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MROSAXIS)?:"-"); ?></td>
1024 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MROSPRISM)?:"-"); ?></td>
1025 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MROSVA)?:"-"); ?></td>
1026 <td style="font-weight:400;font-size:1.0em;text-align:center;">-</td>
1027 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MROSADD)?:"-"); ?></td>
1028 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($MRNEAROSVA)?:"-"); ?></td>
1029 </tr>
1030 <?php
1032 if ($CRODSPH||$CROSSPH) { ?>
1033 <tr>
1034 <td style="font-weight:600;font-size:0.8em;text-align:right;"><?php echo xlt('Cycloplegic (Wet) Refraction'); ?></td>
1035 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('OD{{right eye}}'); ?></td>
1036 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CRODSPH)?:"-"); ?></td>
1037 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CRODCYL)?:"-"); ?></td>
1038 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CRODAXIS)?:"-"); ?></td>
1039 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CRODPRISM)?:"-"); ?></td>
1040 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CRODVA)?:"-"); ?></td>
1041 <td style="font-weight:400;font-size:1.0em;text-align:center;">-</td>
1042 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CRODADD)?:"-"); ?></td>
1043 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CRNEARODVA)?:"-"); ?></td>
1044 </tr>
1045 <tr>
1046 <td></td>
1047 <td style="font-weight:400;font-size:1.0em;text-align:right;"><?php echo xlt('OS{{left eye}}'); ?></td>
1048 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CROSSPH)?:"-"); ?></td>
1049 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CROSCYL)?:"-"); ?></td>
1050 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CROSAXIS)?:"-"); ?></td>
1051 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CROSPRISM)?:"-"); ?>&nbsp;</td>
1052 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CROSVA)?:"-"); ?></td>
1053 <td style="font-weight:400;font-size:1.0em;text-align:center;">-</td>
1054 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CROSADD)?:"-"); ?></td>
1055 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CRNEAROSVA)?:"-"); ?></td>
1056 </tr>
1057 <?php
1059 if ($CTLODSPH||$CTLOSSPH) { ?>
1060 <tr style="text-align:center;padding:5px;text-decoration:underline;">
1061 <td></td>
1062 <td><?php echo xlt('Eye'); ?></td>
1063 <td><?php echo xlt('Sph{{Sphere}}'); ?></td>
1064 <td><?php echo xlt('Cyl{{Cyinder}}'); ?></td>
1065 <td><?php echo xlt('Axis'); ?></td>
1066 <td><?php echo xlt('BC{{Base Curve}}'); ?></td>
1067 <td><?php echo xlt('Diam{{Diameter}}'); ?></td>
1068 <td><?php echo xlt('ADD'); ?></td>
1069 <td><?php echo xlt('Acuity'); ?></td>
1070 </tr>
1071 <tr>
1072 <td style="font-weight:600;font-size:0.8em;text-align:right;"><?php echo xlt('Contact Lens'); ?></td>
1073 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('OD{{right eye}}'); ?></td>
1074 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLODSPH)?:"-"); ?></td>
1075 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLODCYL)?:"-"); ?></td>
1076 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLODAXIS)?:"-"); ?></td>
1077 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLODBC)?:"-"); ?></td>
1078 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLODDIAM)?:"-"); ?></td>
1079 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLODADD)?:"-"); ?></td>
1080 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLODVA)?:"-"); ?></td>
1081 </tr>
1082 <tr style="font-size:0.6em;">
1083 <td></td>
1084 <td></td>
1085 <td colspan="3" style="font-weight:400;font-size:1.0em;text-align:left;"><?php echo xlt('Brand'); ?>:<?php echo (text($CTLBRANDOD)?:"-"); ?></td>
1086 <td colspan="3" style="font-weight:400;font-size:1.0em;text-align:left;"><?php echo xlt('by{{made by/manufacturer}}'); ?> <?php echo (text($CTLMANUFACTUREROD)?:"-"); ?></td>
1087 <td colspan="3" style="font-weight:400;font-size:1.0em;text-align:left;"><?php echo xlt('via{{shipped by/supplier}}'); ?> <?php echo (text($CTLSUPPLIEROD)?:"-"); ?></td>
1089 </tr>
1090 <tr>
1091 <td></td>
1092 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo xlt('OS{{left eye}}'); ?></td>
1093 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLOSSPH)?:"-"); ?></td>
1094 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLOSCYL)?:"-"); ?></td>
1095 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLOSAXIS)?:"-"); ?></td>
1096 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLOSBC)?:"-"); ?></td>
1097 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLOSDIAM)?:"-"); ?></td>
1098 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo (text($CTLOSADD)?:"-"); ?></td>
1099 <td style="font-weight:400;font-size:1.0em;text-align:center;"><?php echo ($CTLOSVA?:"-"); ?></td>
1100 </tr>
1101 <tr style="font-size:0.6em;">
1102 <td></td>
1103 <td></td>
1104 <td colspan="3" style="font-weight:400;font-size:1.0em;text-align:left;"><?php echo xlt('Brand'); ?>: <?php echo (text($CTLBRANDOS)?:"-"); ?></td>
1105 <td colspan="3" style="font-weight:400;font-size:1.0em;text-align:left;"><?php echo xlt('by{{made by/manufacturer}}'); ?> <?php echo (text($CTLMANUFACTUREROS)?:"-"); ?></td>
1106 <td colspan="3" style="font-weight:400;font-size:1.0em;text-align:left;"><?php echo xlt('via{{shipped by/supplier}}'); ?> <?php echo (text($CTLSUPPLIEROS)?:"-"); ?></td>
1107 </tr>
1109 <?php
1112 </table>
1113 <?php
1114 } ?>
1115 <br />
1117 <?php
1118 if ($GLAREODVA||$CONTRASTODVA||$ODK1||$ODK2||$LIODVA||$PAMODBA) { ?>
1119 <table>
1120 <tr>
1121 <td id="LayerVision_ADDITIONAL" class="refraction <?php echo $display_Add; ?>" style="padding:10px;font-size:0.9em;">
1122 <table id="Additional" style="padding:5;font-size:1.0em;">
1123 <tr><td colspan="9" style="text-align:left;text-decoration:underline;font-weight:bold;"><?php echo xlt('Additional Data Points'); ?></td></tr>
1124 <tr><td></td>
1125 <td><?php echo xlt('PH{{Pinhole}}'); ?></td>
1126 <td><?php echo xlt('PAM{{Potential Acuity Meter}}'); ?></td>
1127 <td><?php echo xlt('LI{{Laser Interferometry}}'); ?></td>
1128 <td><?php echo xlt('BAT{{Brightness Acuity Testing}}'); ?></td>
1129 <td><?php echo xlt('K1{{Keratometry 1}}'); ?></td>
1130 <td><?php echo xlt('K2{{Keratometry 2}}'); ?></td>
1131 <td><?php echo xlt('Axis'); ?></td>
1132 </tr>
1133 <tr><td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1134 <td><?php echo text($PHODVA); ?></td>
1135 <td><?php echo text($PAMODVA); ?></td>
1136 <td><?php echo text($LIODVA); ?></td>
1137 <td><?php echo text($GLAREODVA); ?></td>
1138 <td><?php echo text($ODK1); ?></td>
1139 <td><?php echo text($ODK2); ?></td>
1140 <td><?php echo text($ODK2AXIS); ?></td>
1141 </tr>
1142 <tr>
1143 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1144 <td><?php echo text($PHOSVA); ?></td>
1145 <td><?php echo text($PAMOSVA); ?></td>
1146 <td><?php echo text($LIOSVA); ?></td>
1147 <td><?php echo text($GLAREOSVA); ?></td>
1148 <td><?php echo text($OSK1); ?></td>
1149 <td><?php echo text($OSK2); ?></td>
1150 <td><?php echo text($OSK2AXIS); ?></td>
1151 </tr>
1152 <tr><td>&nbsp;</td></tr>
1153 <tr>
1154 <td></td>
1155 <td><?php echo xlt('AxLength{{axial Length}}'); ?></td>
1156 <td><?php echo xlt('ACD{{anterior chamber depth}}'); ?></td>
1157 <td><?php echo xlt('PD{{pupillary distance}}'); ?></td>
1158 <td><?php echo xlt('LT{{lens thickness}}'); ?></td>
1159 <td><?php echo xlt('W2W{{white-to-white}}'); ?></td>
1160 <td><?php echo xlt('ECL{{equivalent contact lens power at the corneal level}}'); ?></td>
1161 <!-- <td><?php echo xlt('pend'); ?></td> -->
1162 </tr>
1163 <tr><td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1164 <td><?php echo text($ODAXIALLENGTH); ?></td>
1165 <td><?php echo text($ODACD); ?></td>
1166 <td><?php echo text($ODPDMeasured); ?></td>
1167 <td><?php echo text($ODLT); ?></td>
1168 <td><?php echo text($ODW2W); ?></td>
1169 <td><?php echo text($ODECL); ?></td>
1170 <!-- <td><input type=text id="pend" name="pend" value="<?php echo text($pend); ?>"></td> -->
1171 </tr>
1172 <tr>
1173 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1174 <td><?php echo text($OSAXIALLENGTH); ?></td>
1175 <td><?php echo text($OSACD); ?></td>
1176 <td><?php echo text($OSPDMeasured); ?></td>
1177 <td><?php echo text($OSLT); ?></td>
1178 <td><?php echo text($OSW2W); ?></td>
1179 <td><?php echo text($OSECL); ?></td>
1180 <!-- <td><input type=text id="pend" name="pend" value="<?php echo text($pend); ?>"></td> -->
1181 </tr>
1182 </table>
1183 </td>
1184 </tr>
1185 </table>
1186 <?php
1191 <!-- end of the refraction boxes -->
1193 <!-- start of external exam -->
1194 <div class="report_exam_group">
1195 <table>
1196 <tr>
1197 <td style="text-align:left;vertical-align:top;">
1198 <b class="underline"><?php echo xlt('External Exam'); ?>:</b>
1199 <table class="report_section">
1200 <tr>
1201 <td class="bold" style="text-align:right;padding-right:10px;text-decoration:underline;max-width:150px;"><?php echo xlt('Right'); ?></td>
1202 <td style="width:100px;"></td>
1203 <td class="bold" style="text-align:left;padding-left:10px;text-decoration:underline;max-width:150px;"><?php echo xlt('Left'); ?></td>
1204 </tr>
1205 <tr>
1206 <td class="report_text right"><?php echo text($RBROW); ?></td>
1207 <td class="middle"><?php echo xlt('Brow'); ?></td>
1208 <td class="report_text left"><?php echo text($LBROW); ?></td>
1209 </tr>
1210 <tr>
1211 <td class="report_text right ">
1212 <?php echo text($RUL); ?>
1213 </td>
1214 <td class="middle"><?php echo xlt('Upper Lids'); ?></td>
1215 <td class="report_text left"><?php echo text($LUL); ?></td>
1216 </tr>
1217 <tr>
1218 <td class="report_text right "><?php echo text($RLL); ?></td>
1219 <td class="middle"><?php echo xlt('Lower Lids'); ?></td>
1220 <td class="report_text left"><?php echo text($LLL); ?></td>
1221 </tr>
1222 <tr>
1223 <td class="report_text right "><?php echo text($RMCT); ?></td>
1224 <td class="middle"><?php echo xlt('Medial Canthi'); ?></td>
1225 <td class="report_text left"><?php echo text($LMCT); ?></td>
1226 </tr>
1227 <?php
1228 if ($RADNEXA || $LADNEXA) {
1230 <tr>
1231 <td class="report_text right"><?php echo text($RADNEXA); ?></td>
1232 <td class="middle"><?php echo xlt('Adnexa'); ?></td>
1233 <td class="report_text left"><?php echo text($LADNEXA); ?></td>
1234 </tr>
1235 <?php
1237 if ($EXT_COMMENTS) { ?>
1238 <tr>
1239 <td colspan="3">
1241 <b><?php echo xlt('Comments'); ?>:</b>
1242 <span style="height:3.0em;">
1243 <?php echo text($EXT_COMMENTS); ?>
1244 </span>
1245 </td>
1246 </tr>
1247 <?php } ?>
1248 </table>
1249 </td>
1250 <td style="text-align:center;padding:1px;vertical-align:middle;">
1251 <?php
1252 display_draw_image ("EXT",$encounter,$pid);
1254 </td>
1255 </tr>
1256 </table>
1257 </div>
1258 <!-- end of external exam -->
1259 <div class="report_exam_group">
1260 <?php
1261 if ($OSCONJ||$ODCONJ||$ODCORNEA||$OSCORNEA||$ODAC||$OSAC||$ODLENS||$OSLENS||$ODIRIS||$OSIRIS) {
1263 <!-- start of Anterior Segment exam -->
1264 <table>
1265 <tr>
1266 <td style="text-align:left;padding:1px;vertical-align:top;">
1267 <b class="underline"><?php echo xlt('Anterior Segment'); ?>:</b>
1268 <table class="report_section">
1269 <tr>
1270 <td class="bold" style="text-align:right;padding-right:10px;text-decoration:underline;max-width:200px;"><?php echo xlt('Right'); ?></td>
1271 <td style="width:100px;"></td>
1272 <td class="bold" style="text-align:left;padding-left:10px;text-decoration:underline;max-width:200px;"><?php echo xlt('Left'); ?></td>
1273 </tr>
1274 <tr>
1275 <td class="report_text right"><?php echo text($ODCONJ); ?></td>
1276 <td class="middle"><?php echo xlt('Conj'); ?></td>
1277 <td class="report_text left"><?php echo text($OSCONJ); ?></td>
1278 </tr>
1279 <tr>
1280 <td class="report_text right "><?php echo text($ODCORNEA); ?></td>
1281 <td class="middle"><?php echo xlt('Cornea'); ?></td>
1282 <td class="report_text left"><?php echo text($OSCORNEA); ?></td>
1283 </tr>
1284 <tr>
1285 <td class="report_text right "><?php echo text($ODAC); ?></td>
1286 <td class="middle"><?php echo xlt('A/C'); ?></td>
1287 <td class="report_text left"><?php echo text($OSAC); ?></td>
1288 </tr>
1289 <tr>
1290 <td class="report_text right "><?php echo text($ODLENS); ?></td>
1291 <td class="middle"><?php echo xlt('Lens'); ?></td>
1292 <td class="report_text left"><?php echo text($OSLENS); ?></td>
1293 </tr>
1294 <tr>
1295 <td class="report_text right"><?php echo text($ODIRIS); ?></td>
1296 <td class="middle"><?php echo xlt('Iris'); ?></td>
1297 <td class="report_text left"><?php echo text($OSIRIS); ?></td>
1298 </tr>
1299 <?php if ($ODGONIO||$OSDGONIO) { ?>
1300 <tr>
1301 <td class="report_text right" style="width:100px;"><?php echo text($ODGONIO); ?></td>
1302 <td class="middle"><?php echo xlt('Gonioscopy'); ?></td>
1303 <td class="report_text left" style="width:100px;"><?php echo text($OSGONIO); ?></td>
1304 </tr>
1305 <?php } if ($ODKTHICKNESS||$OSKTHICKNESS) { ?>
1306 <tr>
1307 <td class="report_text right"><?php echo text($ODKTHICKNESS); ?></td>
1308 <td class="middle" title="<?php echo xla('Pachymetry'); ?>"><?php echo xlt('Pachymetry'); ?></td>
1309 <td class="report_text left"><?php echo text($OSKTHICKNESS); ?></td>
1310 </tr>
1311 <?php } if ($ODSCHIRMER1||$OSSCHIRMER1) { ?>
1312 <tr>
1313 <td class="report_text right"><?php echo text($ODSCHIRMER1); ?></td>
1314 <td class="middle" title="<?php echo xla('Schirmers I (w/o anesthesia)'); ?>"><?php echo xlt('Schirmers I'); ?></td>
1315 <td class="report_text left"><?php echo text($OSSCHIRMER1); ?></td>
1316 </tr>
1317 <?php } if ($ODSCHIRMER2||$OSSCHIRMER2) { ?>
1318 <tr>
1319 <td class="report_text right"><?php echo text($ODSCHIRMER2); ?></td>
1320 <td class="middle" title="<?php echo xla('Schirmers II (w/ anesthesia)'); ?>"><?php echo xlt('Schirmers II'); ?></td>
1321 <td class="report_text left"><?php echo text($OSSCHIRMER2); ?></td>
1322 </tr>
1323 <?php } if ($ODTBUT||$OSTBUT) { ?>
1324 <tr>
1325 <td class="report_text right"><?php echo text($ODTBUT); ?></td>
1326 <td class="middle" title="<?php echo xla('Tear Break Up Time'); ?>"><?php echo xlt('TBUT'); ?></td>
1327 <td class="report_text left"><?php echo text($OSTBUT); ?></td>
1328 </tr>
1329 <?php }
1330 if ($ANTSEG_COMMENTS) { ?>
1331 <tr>
1332 <td colspan="2">
1333 <b><?php echo xlt('Comments'); ?>:</b>
1334 <span style="height:3.0em;">
1335 <?php echo text($ANTSEG_COMMENTS); ?>
1336 </span>
1337 </td>
1338 </tr>
1339 <?php } ?>
1340 </table>
1341 </td>
1342 <td style="text-align:center;padding:1px;vertical-align:middle;">
1343 <?php
1344 display_draw_image ("ANTSEG",$encounter,$pid);
1346 </td>
1347 </tr>
1348 </table>
1349 <!-- end of Anterior Segment exam -->
1351 <?php
1354 </div>
1355 <div class="report_exam_group">
1357 <!-- start of Other exam -->
1358 <?php
1359 if ($RLF || $LLF || $RMRD || $LMRD || $RVFISSURE || $LVFISSURE ||
1360 $RCAROTID || $LCAROTID || $RTEMPART || $LTEMPART || $RCNV || $LCNV ||
1361 $RCNVII || $LCNVII || $HERTELBASE || $ODCOLOR || $OSCOLOR || $ODREDDESAT ||
1362 $OSREDDESAT ||$ODCOINS || $OSCOINS || $ODNPA || $OSNPA || $NPA || $NPC || $STEREOPSIS ||
1363 $DACCDIST || $DACCNEAR || $CACCDIST || $CACCNEAR || $VERTFUSAMPS) {
1365 <table>
1366 <tr>
1367 <td style="text-align:left;vertical-align:top;padding:1px;">
1368 <b><u><?php echo xlt('Additional Findings'); ?>:</u></b>
1369 <?php if ($ACT =='on' and $MOTILITYNORMAL == 'on') { ?>
1370 <span id="ACTNORMAL_CHECK" name="ACTNORMAL_CHECK">
1371 <?php echo xlt('Orthophoric'); ?>
1372 </span>
1373 <?php } ?>
1374 <table class="report_section">
1375 <tr>
1376 <td class="bold" style="text-align:right;padding-right:10px;text-decoration:underline;max-width:200px;"><?php echo xlt('Right'); ?></td>
1377 <td style="width:100px;"></td>
1378 <td class="bold" style="text-align:left;padding-left:10px;text-decoration:underline;max-width:200px;"><?php echo xlt('Left'); ?></td>
1379 </tr>
1380 <?php
1381 if ($RLF || $LLF) { ?>
1382 <tr>
1383 <td class="report_text right" style=""><?php echo text($RLF); ?></td>
1384 <td class="middle" style="width:100px;"><?php echo xlt('Levator Function'); ?></td>
1385 <td class="report_text left" style=""><?php echo text($LLF); ?></td>
1386 </tr>
1387 <?php
1389 if ($RMRD || $LMRD) { ?>
1390 <tr>
1391 <td class="report_text right"><?php echo text($RMRD); ?></td>
1392 <td class="middle" title="<?php echo xla('Marginal Reflex Distance'); ?>"><?php echo xlt('MRD{{marginal reflex distance}}'); ?></td>
1393 <td class="report_text left"><?php echo text($LMRD); ?></td>
1394 </tr>
1395 <?php
1397 if ($RVFISSURE || $LVFISSURE) { ?>
1398 <tr>
1399 <td class="report_text right"><?php echo text($RVFISSURE); ?></td>
1400 <td class="middle" title="<?php echo xla('Vertical Fissure: central height between lid margins'); ?>"><?php echo xlt('Vert Fissure{{vertical fissure}}'); ?></td>
1401 <td class="report_text left"><?php echo text($LVFISSURE); ?></td>
1402 </tr>
1403 <?php
1405 if ($RCAROTID || $LCAROTID) { ?>
1406 <tr>
1407 <td class="report_text right"><?php echo text($RCAROTID); ?></td>
1408 <td class="middle" title="<?php echo xla('Any carotid bruits appreciated?'); ?>"><?php echo xlt('Carotid{{carotid arteries}}'); ?></td>
1409 <td class="report_text left"><?php echo text($LCAROTID); ?></td>
1410 </tr>
1411 <?php
1413 if ($RTEMPART || $LTEMPART) { ?>
1414 <tr>
1415 <td class="report_text right"><?php echo text($RTEMPART); ?></td>
1416 <td class="middle" title="<?php echo xla('Temporal Arteries'); ?>"><?php echo xlt('Temp. Art.{{temporal arteries}}'); ?></td>
1417 <td class="report_text left"><?php echo text($LTEMPART); ?></td>
1418 </tr>
1419 <?php
1421 if ($RCNV || $LCNV) { ?>
1422 <tr>
1423 <td class="report_text right"><?php echo text($RCNV); ?></td>
1424 <td class="middle" title="<?php echo xla('Cranial Nerve 5: Trigeminal Nerve'); ?>"><?php echo xlt('CN V{{cranial nerve five}}'); ?></td>
1425 <td class="report_text left"><?php echo text($LCNV); ?></td>
1426 </tr>
1427 <?php
1429 if ($RCNVII || $LCNVII) { ?>
1430 <tr>
1431 <td class="report_text right"><?php echo text($RCNVII); ?></td>
1432 <td class="middle" title="<?php echo xla('Cranial Nerve 7: Facial Nerve'); ?>"><?php echo xlt('CN VII{{cranial nerve seven}}'); ?></td>
1433 <td class="report_text left"><?php echo text($LCNVII); ?></td>
1434 </tr>
1435 <?php
1437 if ($HERTELBASE) { ?>
1438 <tr>
1439 <td colspan="3" style="text-align:center;padding-top:15px;">
1440 <b style="font-weight:bold;padding-bottom:5px;">
1441 <?php echo xlt('Hertel Exophthalmometry'); ?>
1442 </b>
1443 <br />
1444 <?php
1445 if ($HERTELBASE) { ?>
1447 <b style="border:1pt solid black;width:30px;text-align:center;padding:0 5;">
1448 <?php echo text($ODHERTEL); ?>
1449 </b>
1450 <b class="fa fa-minus">--</b>
1451 <b style="border:1pt solid black;width:40px;text-align:center;padding:0 5;">
1452 <?php echo text($HERTELBASE); ?>
1453 </b>
1454 <b class="fa fa-minus">--</b>
1455 <b style="border:1pt solid black;width:30px;text-align:center;padding:0 5;">
1456 <?php echo text($OSHERTEL); ?>
1457 </b>
1458 <?php
1459 } ?>
1460 </td>
1461 </tr>
1462 <?php
1465 if ($ODCOLOR || $OSCOLOR || $ODREDDESAT ||
1466 $OSREDDESAT ||$ODCOINS || $OSCOINS ||
1467 $ODNPA || $OSNPA || $NPA || $NPC || $STEREOPSIS) { ?>
1468 <!-- start of NEURO exam -->
1469 <tr>
1470 <td class="report_text right"><?php echo text($ODCOLOR); ?></td>
1471 <td class="middle"><?php echo xlt('Color Vision'); ?></td>
1472 <td class="report_text left"><?php echo text($OSCOLOR); ?></td>
1473 </tr>
1474 <?php if ($ODREDDESAT or $OSREDDESAT) { ?>
1475 <tr>
1476 <td class="report_text right"><?php echo text($ODREDDESAT); ?></td>
1477 <td class="middle"><span title="<?php xla('Variation in red color discrimination between the eyes (eg. OD=100, OS=75)'); ?>"><?php echo xlt('Red Desaturation'); ?></span></td>
1478 <td class="report_text left"><?php echo text($OSREDDESAT); ?></td>
1479 </tr><?php
1481 if ($ODCOINS or $OSCOINS) { ?>
1482 <tr>
1483 <td class="report_text right"><?php echo text($ODCOINS); ?></td>
1484 <td class="middle"><span title="<?php echo xla('Variation in white (muscle) light brightness discrimination between the eyes (eg. OD=$1.00, OS=$0.75)'); ?>"><?php echo xlt('Coins'); ?></span></td>
1485 <td class="report_text left"><?php echo text($OSCOINS); ?></td>
1486 </tr>
1487 <?php
1489 if ($ODNPA or $OSNPA) { ?>
1490 <tr>
1491 <td class="report_text right"><?php echo text($ODNPA); ?></td>
1492 <td class="middle"><span title="<?php echo xla('Near Point of Accomodation'); ?>"><?php echo xlt('NPA{{near point of accomodation}}'); ?></span></td>
1493 <td class="report_text left"><?php echo text($OSNPA); ?></td>
1494 </tr>
1495 <?php }
1496 if ($ODNPC or $OSNPC) { ?>
1497 <tr>
1498 <td class="right" style="font-weight:600;"><?php echo xlt('NPC{{near point of convergence}}'); ?>:&nbsp;</td>
1499 <td class="center" colspan="2" ><?php echo text($NPC); ?></td>
1500 </tr>
1501 <?php }
1502 if ($DACCDIST or $DACCNEAR or $CACCDIST or $CACCNEAR or $VERTFUSAMPS) { ?>
1503 <tr style="text-decoration:underline;">
1504 <td></td>
1505 <td class="middle"><?php echo xlt('Distance'); ?> </td>
1506 <td class="middle"> <?php echo xlt('Near'); ?></td>
1507 </tr>
1508 <?php }
1509 if ($DACCDIST or $DACCNEAR) { ?>
1510 <tr>
1511 <td class="right" style="font-weight:600;"><?php echo xlt('Divergence Amps'); ?>: </td>
1512 <td class="center"><?php echo text($DACCDIST); ?></td>
1513 <td class="center"><?php echo text($DACCNEAR); ?></td>
1514 </tr>
1515 <?php }
1516 if ($CACCDIST or $CACCNEAR) { ?>
1517 <tr>
1518 <td class="right" style="font-weight:600;"><?php echo xlt('Convergence Amps'); ?>: </td>
1519 <td class="center"><?php echo text($CACCDIST); ?></td>
1520 <td class="center"><?php echo text($CACCNEAR); ?></td>
1521 </tr>
1522 <?php }
1523 if ($VERTFUSAMPS) { ?>
1524 <tr>
1525 <td class="right" style="font-weight:600;">
1526 <?php echo xlt('Vert Fusional Amps'); ?>:
1527 </td>
1528 <td colspan="2" class="center">
1529 <?php echo text($VERTFUSAMPS); ?>
1530 <br />
1531 </td>
1532 </tr>
1533 <?php }
1534 if ($STEREOPSIS) { ?>
1535 <tr>
1536 <td class="right" style="font-weight:600;"><?php echo xlt('Stereopsis'); ?>:&nbsp;</td>
1537 <td class="center" colspan="2"><?php echo text($STEREOPSIS); ?></td>
1538 </tr>
1539 <?php }
1540 } ?>
1541 </table>
1542 </td>
1543 <td style="text-align:center;padding:1px;vertical-align:middle;">
1544 <?php
1545 display_draw_image ("NEURO",$encounter,$pid);
1547 </td>
1548 </tr>
1549 </table>
1550 <?php
1551 } ?>
1552 <!-- end of Other exam -->
1553 </div>
1554 <div class="report_exam_group">
1556 <!-- start of the Retina exam -->
1557 <?php
1558 if ($ODDISC||$OSDISC||$ODCUP||$ODMACULA||$ODVESSELS||$ODPERIPH) {
1560 <table>
1561 <tr>
1562 <td style="text-align:left;padding:1px;vertical-align:top;">
1563 <b><u><?php echo xlt('Retina'); ?>:</u></b>
1564 <table class="report_section">
1565 <tr>
1566 <td class="bold" style="text-align:right;text-decoration:underline;max-width:150px;"><?php echo xlt('Right'); ?></td>
1567 <td style="width:100px;"></td>
1568 <td class="bold" style="text-align:left;text-decoration:underline;max-width:150px;"><?php echo xlt('Left'); ?></td>
1569 </tr>
1570 <tr>
1571 <td class="report_text right"><?php echo text($ODDISC); ?></td>
1572 <td class="middle"><?php echo xlt('Disc'); ?></td>
1573 <td class="report_text left"><?php echo text($OSDISC); ?></td>
1574 </tr>
1575 <tr>
1576 <td class="report_text right"><?php echo text($ODCUP); ?></td>
1577 <td class="middle"><?php echo xlt('Cup'); ?></td>
1578 <td class="report_text left"><?php echo text($OSCUP); ?></td>
1579 </tr>
1580 <tr>
1581 <td class="report_text right"><?php echo text($ODMACULA); ?></td>
1582 <td class="middle"><?php echo xlt('Macula'); ?></td>
1583 <td class="report_text left"><?php echo text($OSMACULA); ?></td>
1584 </tr>
1585 <tr>
1586 <td class="report_text right"><?php echo text($ODVESSELS); ?></td>
1587 <td class="middle"><?php echo xlt('Vessels'); ?></td>
1588 <td class="report_text left"><?php echo text($OSVESSELS); ?></td>
1589 </tr>
1590 <?php if ($ODPERIPH||$OSPERIPH) { ?>
1591 <tr>
1592 <td class="report_text right"><?php echo text($ODPERIPH); ?></td>
1593 <td class="middle"><?php echo xlt('Periph{{periphery}}'); ?></td>
1594 <td class="report_text left"><?php echo text($OSPERIPH); ?></td>
1595 </tr>
1596 <?php } if ($ODCMT||$OSCMT) { ?>
1597 <tr>
1598 <td class="report_text right">&nbsp;<?php echo text($ODCMT); ?></td>
1599 <td class="middle"><?php echo xlt('Central Macular Thickness'); ?> </td>
1600 <td class="report_text left" >&nbsp;<?php echo text($OSCMT); ?></td>
1601 </tr>
1602 <?php } ?>
1603 <?php if ($RETINA_COMMENTS) { ?>
1604 <tr>
1605 <td colspan="2" class="report_text left">
1607 <b><?php echo xlt('Comments'); ?>:</b>
1608 <span style="height:3.0em;">
1609 <?php echo text($RETINA_COMMENTS); ?>
1610 </span>
1612 </td>
1613 </tr>
1614 <?php } ?>
1615 </table>
1616 </td>
1617 <td style="text-align:center;padding:1px;vertical-align:middle;">
1618 <?php
1619 display_draw_image ("RETINA",$encounter,$pid);
1621 </td>
1622 </tr>
1623 </table>
1625 <?php
1626 } ?>
1627 <!-- end of Retina exam -->
1628 </div>
1629 <?php
1630 if ($ACT !='on') { ?>
1631 <table style="text-align:center;font-size:0.7em;">
1632 <tr>
1633 <td colspan=3 style="">
1634 <table>
1635 <tr style="text-align:left;height:16px;vertical-align:middle;width:880px;">
1636 <td>
1637 <span id="ACTTRIGGER" name="ACTTRIGGER" style="text-decoration:underline;padding-left:2px;">
1638 <?php echo xlt('Alternate Cover Test'); ?>:
1639 </span>
1640 </td>
1641 </tr>
1642 <tr>
1643 <?php
1644 if ($ACT5SCDIST) { ?>
1645 <td style="text-align:center;"> <!-- scDIST -->
1646 <table cellpadding="0"
1647 style="position:relative;text-align:center;font-size:1.2em;margin: 7 5 10 5;">
1648 <tr>
1649 <td id="ACT_tab_SCDIST" name="ACT_tab_SCDIST" class="ACT_deselected"> <?php echo xlt('sc Distance{{without correction distance}}'); ?> </td>
1650 </tr>
1651 <tr>
1652 <td colspan="4" style="text-align:center;font-size:0.9em;">
1653 <table>
1654 <tr>
1655 <td style="text-align:center;"><?php echo xlt('R{{Right}}'); ?></td>
1656 <td class="ACT"><?php echo report_ACT($ACT1SCDIST); ?></td>
1657 <td class="ACT"><?php echo report_ACT($ACT2SCDIST); ?></td>
1658 <td class="ACT"><?php echo report_ACT($ACT3SCDIST); ?></td>
1659 <td style="text-align:center;"><?php echo xlt('L{{Left}}'); ?></td>
1660 </tr>
1661 <tr>
1662 <td style="text-align:right;"><i class="fa fa-reply rotate-left"></i></td>
1663 <td class="ACT"><?php echo report_ACT($ACT4SCDIST); ?></td>
1664 <td class="ACT"><?php echo report_ACT($ACT5SCDIST); ?></td>
1665 <td class="ACT"><?php echo report_ACT($ACT6SCDIST); ?></td>
1666 <td><i class="fa fa-share rotate-right"></i></td>
1667 </tr>
1668 <tr>
1669 <td class="ACT"><?php echo report_ACT($ACT10SCDIST); ?></td>
1670 <td class="ACT"><?php echo report_ACT($ACT7SCDIST); ?></td>
1671 <td class="ACT"><?php echo report_ACT($ACT8SCDIST); ?></td>
1672 <td class="ACT"><?php echo report_ACT($ACT9SCDIST); ?></td>
1673 <td class="ACT"><?php echo report_ACT($ACT11SCDIST); ?></td>
1674 </tr>
1675 </table>
1676 </td>
1677 </tr>
1678 </table>
1679 </td>
1680 <?php
1682 if ($ACT5CCDIST) {
1684 <td style="text-align:center;"> <!-- ccDIST -->
1685 <table cellpadding="0" style="position:relative;text-align:center;font-size:1.5em;margin: 7 5 10 5;border-collapse: separate;">
1686 <tr>
1687 <td class="ACT_deselected"> <?php echo xlt('cc Distance{{with correction at distance}}'); ?> </td>
1688 </tr>
1689 <tr>
1690 <td colspan="4" style="text-align:center;font-size:0.8em;">
1691 <table>
1692 <tr>
1693 <td style="text-align:center;"><?php echo xlt('R{{Right}}'); ?></td>
1694 <td class="ACT"><?php echo report_ACT($ACT1CCDIST); ?></td>
1695 <td class="ACT"><?php echo report_ACT($ACT2CCDIST); ?></td>
1696 <td class="ACT"><?php echo report_ACT($ACT3CCDIST); ?></td>
1697 <td style="text-align:center;"><?php echo xlt('L{{Left}}'); ?></td>
1698 </tr>
1699 <tr>
1700 <td style="text-align:right;"><i class="fa fa-reply rotate-left"></i></td>
1701 <td class="ACT"><?php echo report_ACT($ACT4CCDIST); ?></td>
1702 <td class="ACT"><?php echo report_ACT($ACT5CCDIST); ?></td>
1703 <td class="ACT"><?php echo report_ACT($ACT6CCDIST); ?></td>
1704 <td><i class="fa fa-share rotate-right"></i></td>
1705 </tr>
1706 <tr>
1707 <td class="ACT"><?php echo report_ACT($ACT10CCDIST); ?></td>
1708 <td class="ACT"><?php echo report_ACT($ACT7CCDIST); ?></td>
1709 <td class="ACT"><?php echo report_ACT($ACT8CCDIST); ?></td>
1710 <td class="ACT"><?php echo report_ACT($ACT9CCDIST); ?></td>
1711 <td class="ACT"><?php echo report_ACT($ACT11CCDIST); ?>
1712 </td>
1713 </tr>
1714 </table>
1715 </td>
1716 </tr>
1717 </table>
1718 </td>
1719 </tr>
1720 <tr>
1721 <?php
1723 if ($ACT5SCNEAR) {
1726 <td style="text-align:center;"> <!-- scNEAR -->
1727 <table cellpadding="0" style="position:relative;text-align:center;font-size:1.5em;margin: 7 5 10 5;border-collapse: separate;">
1728 <tr>
1729 <td class="ACT_deselected"> <?php echo xlt('sc Near{{without correction near'); ?> </td>
1730 </tr>
1731 <tr>
1732 <td colspan="4" style="text-align:center;font-size:0.8em;">
1733 <table>
1734 <tr>
1735 <td style="text-align:center;"><?php echo xlt('R{{Right}}'); ?></td>
1736 <td class="ACT"><?php echo report_ACT($ACT1SCNEAR); ?></td>
1737 <td class="ACT"><?php echo report_ACT($ACT2SCNEAR); ?></td>
1738 <td class="ACT"><?php echo report_ACT($ACT3SCNEAR); ?></td>
1739 <td style="text-align:center;"><?php echo xlt('L{{Left}}'); ?></td>
1740 </tr>
1741 <tr>
1742 <td style="text-align:right;"><i class="fa fa-reply rotate-left"></i></td>
1743 <td class="ACT"><?php echo report_ACT($ACT4SCNEAR); ?></td>
1744 <td class="ACT"><?php echo report_ACT($ACT5SCNEAR); ?></td>
1745 <td class="ACT"><?php echo report_ACT($ACT6SCNEAR); ?></td>
1746 <td><i class="fa fa-share rotate-right"></i></td>
1747 </tr>
1748 <tr>
1749 <td class="ACT"><?php echo report_ACT($ACT10SCNEAR); ?></td>
1750 <td class="ACT"><?php echo report_ACT($ACT7SCNEAR); ?></td>
1751 <td class="ACT"><?php echo report_ACT($ACT8SCNEAR); ?></td>
1752 <td class="ACT"><?php echo report_ACT($ACT9SCNEAR); ?></td>
1753 <td class="ACT"><?php echo report_ACT($ACT11SCNEAR); ?>
1754 </td>
1755 </tr>
1756 </table>
1757 </td>
1758 </tr>
1759 </table>
1760 </td>
1761 <?php
1763 if ($ACT5CCNEAR) {
1766 <td style="text-align:center;"> <!-- ccNEAR -->
1767 <table cellpadding="0" style="position:relative;text-align:center;font-size:1.5em;margin: 7 5 10 5;border-collapse: separate;">
1768 <tr>
1769 <td class="ACT_deselected"> <?php echo xlt('cc Near{{with correction at Near}}'); ?> </td>
1770 </tr>
1771 <tr>
1772 <td colspan="4" style="text-align:center;font-size:1.0em;">
1773 <table>
1774 <tr>
1775 <td style="text-align:center;"><?php echo xlt('R{{Right}}'); ?></td>
1776 <td class="ACT"><?php echo report_ACT($ACT1CCNEAR); ?></td>
1777 <td class="ACT"><?php echo report_ACT($ACT2CCNEAR); ?></td>
1778 <td class="ACT"><?php echo report_ACT($ACT3CCNEAR); ?></td>
1779 <td style="text-align:center;"><?php echo xlt('L{{Left}}'); ?></td>
1780 </tr>
1781 <tr>
1782 <td style="text-align:right;"><i class="fa fa-reply rotate-left"></i></td>
1783 <td class="ACT"><?php echo report_ACT($ACT4CCNEAR); ?></td>
1784 <td class="ACT"><?php echo report_ACT($ACT5CCNEAR); ?></td>
1785 <td class="ACT"><?php echo report_ACT($ACT6CCNEAR); ?></td>
1786 <td><i class="fa fa-share rotate-right"></i></td>
1787 </tr>
1788 <tr>
1789 <td class="ACT"><?php echo report_ACT($ACT10CCNEAR); ?></td>
1790 <td class="ACT"><?php echo report_ACT($ACT7CCNEAR); ?></td>
1791 <td class="ACT"><?php echo report_ACT($ACT8CCNEAR); ?></td>
1792 <td class="ACT"><?php echo report_ACT($ACT9CCNEAR); ?></td>
1793 <td class="ACT"><?php echo report_ACT($ACT11CCNEAR); ?></td>
1794 </tr>
1795 </table>
1796 </td>
1797 </tr>
1798 </table>
1800 </td>
1801 <?php } ?>
1802 </tr>
1803 </table>
1804 <?php if ($NEURO_COMMENTS) { ?>
1805 <table>
1806 <tr>
1807 <td colspan="2">
1808 <b><?php echo xlt('Comments'); ?>:</b><br />
1809 <span style="height:3.0em;">
1810 <?php echo report_ACT($NEURO_COMMENTS); ?>
1811 </span>
1812 <br /><br />
1813 </td>
1814 </tr>
1815 </table>
1816 <?php } ?>
1817 </td>
1818 </tr>
1819 </table>
1820 <?php
1823 //end choice !== 'TEXT' -- include this in summary mouseover report.
1825 <!-- start of IMPPLAN exam -->
1826 <table class="report_exam_group">
1827 <tr>
1828 <td style="text-align:left;padding:1px;vertical-align:top;width:480px;">
1829 <b><u><?php echo xlt('Impression/Plan'); ?>:</u></b>
1830 <table style="">
1831 <tr>
1832 <td style="padding:5px;text-align: left;text-align:justify;width:475px;">
1833 <?php
1834 /**
1835 * Retrieve and Display the IMPPLAN_items for the Impression/Plan zone.
1837 $query = "select * from form_".$form_folder."_impplan where form_id=? and pid=? order by IMPPLAN_order ASC";
1838 $result = sqlStatement($query,array($form_id,$pid));
1839 $i='0';
1840 $order = array("\r\n", "\n", "\r","\v","\f","\x85","\u2028","\u2029");
1841 $replace = "<br />";
1842 // echo '<ol>';
1843 while ($ip_list = sqlFetchArray($result)) {
1844 $newdata = array (
1845 'form_id' => $ip_list['form_id'],
1846 'pid' => $ip_list['pid'],
1847 'title' => $ip_list['title'],
1848 'code' => $ip_list['code'],
1849 'codetype' => $ip_list['codetype'],
1850 'codetext' => $ip_list['codetext'],
1851 'plan' => str_replace($order, $replace, $ip_list['plan']),
1852 'IMPPLAN_order' => $ip_list['IMPPLAN_order']
1854 $IMPPLAN_items[$i] =$newdata;
1855 $i++;
1857 //for ($i=0; $i < count($IMPPLAN_item); $i++) {
1858 foreach ($IMPPLAN_items as $item) {
1859 echo ($item['IMPPLAN_order'] +1).'. <b>'.text($item['title']).'</b><br />';
1860 echo '<div style="padding-left:15px;">';
1861 $pattern = '/Code/';
1862 if (preg_match($pattern,$item['code'])) $item['code'] = '';
1863 if ($item['codetext'] > '') {
1864 echo $item['codetext']."<br />";
1865 } else {
1866 if ($item['code'] > '') {
1867 if ($item['codetype'] > '') {
1868 $item['code'] = $item['codetype'].": ".$item['code'];
1870 echo $item['code']."<br />";
1873 echo $item['plan']."</div><br />";
1875 if ($PLAN && $PLAN != '0') { ?>
1876 <b><?php echo xlt('Orders')."/".xlt('Next Visit'); ?>:</b>
1877 <br />
1878 <div style="padding-left:15px;padding-bottom:10px;width:400px;">
1879 <?php
1880 $PLAN_items = explode('|',$PLAN);
1881 foreach ($PLAN_items as $item) {
1882 echo $item."<br />";
1884 if ($PLAN2) {
1885 echo $PLAN2."<br />";
1888 </div>
1889 <?php
1892 </td>
1893 </tr>
1894 </table>
1895 </td>
1896 <td style="text-align:center;vertical-align:bottom;padding:1px;">
1897 <?php
1898 display_draw_image ("IMPPLAN",$encounter,$pid);
1900 if ($PDF_OUTPUT) {
1901 //display a stored optional electronic sig for this providerID, ie the patient's Doc not the tech
1902 $from_file = $GLOBALS["webserver_root"] ."/interface/forms/".$form_folder."/images/sign_".$providerID.".jpg";
1903 if (file_exists($from_file)) {
1904 echo "<img style='width:50mm;' src='$from_file'><hr style='width:40mm;' />".
1905 text($providerNAME)."<br />
1906 <i style='font-size:9px;'>".xlt('electronically signed on')." ".oeFormatShortDate()."</i>";
1909 <br />
1910 <span style="border-top:1pt solid black;padding-left:50px;"><?php echo text($providerNAME); ?></span>
1911 <?php
1912 } else {
1913 $signature = $GLOBALS["webserver_root"]."/interface/forms/".$form_folder."/images/sign_".$providerID.".jpg";
1914 if (file_exists($signature)) {
1915 echo "<img src='".$GLOBALS['web_root']."/interface/forms/".$form_folder."/images/sign_".$providerID.".jpg' style='width:30mm; height:6mm;bottom:1px;' height='10' />";
1921 </td>
1922 </tr>
1923 </table>
1924 </div>
1925 <?php
1926 return;
1929 function display_draw_image($zone,$encounter,$pid){
1930 global $form_folder;
1931 global $web_root;
1932 global $PDF_OUTPUT;
1933 $side = "OU";
1934 $base_name = $pid."_".$encounter."_".$side."_".$zone."_VIEW";
1935 $filename = $base_name.".jpg";
1936 $sql = "SELECT * from documents where documents.url like '%".$filename."'";
1937 $doc = sqlQuery($sql);
1938 $document_id =$doc['id'];
1940 if (($document_id > '1')&&(is_numeric($document_id))) {
1941 $d = new Document($document_id);
1942 $fname = basename($d->get_url());
1944 $couch_docid = $d->get_couch_docid();
1945 $couch_revid = $d->get_couch_revid();
1946 $extension = substr($fname, strrpos($fname,"."));
1947 $notes = Note::notes_factory($d->get_id());
1948 if (!empty($notes)) echo "<table>";
1949 foreach ($notes as $note) {
1950 echo '<tr>';
1951 echo '<td>' . xlt('Note') . ' #' . $note->get_id() . '</td>';
1952 echo '</tr>';
1953 echo '<tr>';
1954 echo '<td>' . xlt('Date') . ': ' . oeFormatShortDate($note->get_date()) . '</td>';
1955 echo '</tr>';
1956 echo '<tr>';
1957 echo '<td>'.$note->get_note().'<br /><br /></td>';
1958 echo '</tr>';
1960 if (!empty($notes)) echo "</table>";
1962 $url_file = $d->get_url_filepath();
1963 if($couch_docid && $couch_revid){
1964 $url_file = $d->get_couch_url($pid,$encounter);
1966 // Collect filename and path
1967 $from_all = explode("/",$url_file);
1968 $from_filename = array_pop($from_all);
1969 $from_pathname_array = array();
1970 for ($i=0;$i<$d->get_path_depth();$i++) {
1971 $from_pathname_array[] = array_pop($from_all);
1973 $from_pathname_array = array_reverse($from_pathname_array);
1974 $from_pathname = implode("/",$from_pathname_array);
1976 if($couch_docid && $couch_revid) {
1977 $from_file = $GLOBALS['OE_SITE_DIR'] . '/documents/temp/' . $from_filename;
1978 $to_file = substr($from_file, 0, strrpos($from_file, '.')) . '_converted.jpg';
1980 else {
1981 $from_file = $GLOBALS["fileroot"] . "/sites/" . $_SESSION['site_id'] .
1982 '/documents/' . $from_pathname . '/' . $from_filename;
1983 $to_file = substr($from_file, 0, strrpos($from_file, '.')) . '_converted.jpg';
1986 // if ($extension == ".png" || $extension == ".jpg" || $extension == ".jpeg" || $extension == ".gif") {
1987 if ($PDF_OUTPUT) {
1988 echo "<img src='". $from_file."' style='width:220px;height:120px;'>";
1989 } else {
1990 $filetoshow = $GLOBALS['webroot']."/controller.php?document&retrieve&patient_id=$pid&document_id=".$doc['id']."&as_file=false&blahblah=".rand();
1991 echo "<img src='".$filetoshow."' style='width:220px;height:120px;'>";
1994 //else show base_image
1995 else {
1997 $filetoshow = "../../forms/".$form_folder."/images/".$side."_".$zone."_BASE.jpg";
1998 if ($PDF_OUTPUT) $filetoshow = $GLOBALS["webroot"] ."/interface/forms/".$form_folder."/images/".$side."_".$zone."_BASE.jpg";
1999 // uncomment to show base image, no touch up by user.
2000 // echo "<img src='". $filetoshow."' style='width:220px;height:120px;'>";
2003 return;
2007 function report_ACT($term) {
2008 $term = nl2br(htmlspecialchars($term,ENT_NOQUOTES));
2009 return $term."&nbsp;";