4 * forms/eye_mag/report.php
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
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/>.
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') {
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
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
98 $objQuery =sqlQuery($query,array($encounter,$pid));
101 $dated = new DateTime($encounter_date);
102 $dated = $dated->format('Y/m/d');
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') {
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>
136 // $filetoshow = "../../forms/".$form_folder."/images/".$side."_".$zone[$i]."_BASE.png?".rand();
142 } else if ($choice == "drawing") {
145 <div
class="borderShadow">
146 <?php
display_draw_section ("VISION",$encounter,$pid); ?
>
148 <div
class="borderShadow">
149 <?php
display_draw_section ("NEURO",$encounter,$pid); ?
>
151 <div
class="borderShadow">
152 <?php
display_draw_section ("EXT",$encounter,$pid); ?
>
154 <div
class="borderShadow">
155 <?php
display_draw_section ("ANTSEG",$encounter,$pid); ?
>
157 <div
class="borderShadow">
158 <?php
display_draw_section ("RETINA",$encounter,$pid); ?
>
160 <div
class="borderShadow">
161 <?php
display_draw_section ("IMPPLAN",$encounter,$pid); ?
>
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');
173 function left_overs() {
175 * Keep: this could be co-opted to export an XML/HL7 type of document
178 $data = formFetch($table_name, $id);
181 foreach($data as $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') {
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
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">
223 <?php
if ($PDF_OUTPUT) { ?
>
240 if (($cols =='Fax')||
($cols=='Report')) echo report_header($pid,'PDF');
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'];
246 $sql = "SELECT * FROM facility ORDER BY billing_location DESC LIMIT 1";
248 $facility = sqlQuery($sql);
251 if ($choice !== 'TEXT') { ?
>
255 <table
class="report_exam_group">
257 <td style
="text-align:left;padding:1px;vertical-align:top;max-width:720px;">
258 <table style
="padding:5px;width:700px;">
260 <td colspan
="1" style
="text-align: justify;text-justify: inter-word;width:100%;">
261 <b
><?php
echo xlt('Chief Complaint'); ?
>:</b
>  
;<?php
echo text($CC1); ?
>
263 <b
><?php
echo xlt('HPI'); ?
>:</b
>
264  
;<?php
echo $HPI1; ?
>
266 <div style
="padding-left:20px;">
269 echo "<i>".xlt('Timing'); ?
>:</i
>  
;<?php
echo text($TIMING1)."<br />";
272 echo "<i>".xlt('Context'); ?
>:</i
>  
;<?php
echo text($CONTEXT1)."<br />";
275 echo "<i>".xlt('Severity'); ?
>:</i
>  
;<?php
echo text($SEVERITY1)."<br />";
278 echo "<i>".xlt('Modifying'); ?
>:</i
>  
;<?php
echo text($MODIFY1)."<br />";
281 echo "<i>".xlt('Associated'); ?
>:</i
>  
;<?php
echo text($ASSOCIATED1)."<br />";
284 echo "<i>".xlt('Location'); ?
>:</i
>  
;<?php
echo text($LOCATION1)."<br />";
287 echo "<i>".xlt('Quality'); ?
>:</i
>  
;<?php
echo text($QUALITY1)."<br />";
290 echo "<i>".xlt('Duration'); ?
>:</i
>  
;<?php
echo text($DURATION1)."<br />";
298 echo "<b>".xlt('Chief Complaint 2'); ?
>:</b
>  
;<?php
echo text($CC2); ?
>
300 <b
><?php
echo xlt('HPI'); ?
>:</b
>
301  
;<?php
echo text($HPI2); ?
>
304 <div style
="padding-left:10px;">
307 echo "<i>".xlt('Timing'); ?
>:</i
>  
;<?php
echo text($TIMING2)."<br />";
310 echo "<i>".xlt('Context'); ?
>:</i
>  
;<?php
echo text($CONTEXT2)."<br />";
313 echo "<i>".xlt('Severity'); ?
>:</i
>  
;<?php
echo text($SEVERITY2)."<br />";
316 echo "<i>".xlt('Modifying'); ?
>:</i
>  
;<?php
echo text($MODIFY2)."<br />";
319 echo "<i>".xlt('Associated'); ?
>:</i
>  
;<?php
echo text($ASSOCIATED2)."<br />";
322 echo "<i>".xlt('Location'); ?
>:</i
>  
;<?php
echo text($LOCATION2)."<br />";
325 echo "<i>".xlt('Quality'); ?
>:</i
>  
;<?php
echo text($QUALITY2)."<br />";
328 echo "<i>".xlt('Duration'); ?
>:</i
>  
;<?php
echo text($DURATION2)."<br />";
338 <?php
echo "<b>".xlt('Chief Complaint 3'); ?
>:</b
>  
;<?php
echo text($CC3); ?
>
340 <?php
echo xlt('HPI'); ?
> 
; <?php
echo text($HPI3); ?
>
342 <div style
="padding-left:10px;">
345 echo "<i>".xlt('Timing'); ?
>:</i
>  
;<?php
echo text($TIMING3)."<br />";
348 echo "<i>".xlt('Context'); ?
>:</i
>  
;<?php
echo text($CONTEXT3)."<br />";
351 echo "<i>".xlt('Severity'); ?
>:</i
>  
;<?php
echo text($SEVERITY3)."<br />";
354 echo "<i>".xlt('Modifying'); ?
>:</i
>  
;<?php
echo text($MODIFY3)."<br />";
357 echo "<i>".xlt('Associated'); ?
>:</i
>  
;<?php
echo text($ASSOCIATED3)."<br />";
360 echo "<i>".xlt('Location'); ?
>:</i
>  
;<?php
echo text($LOCATION3)."<br />";
363 echo "<i>".xlt('Quality'); ?
>:</i
>  
;<?php
echo text($QUALITY3)."<br />";
366 echo "<i>".xlt('Duration'); ?
>:</i
>  
;<?php
echo text($DURATION3)."<br />";
376 if (($CHRONIC1)&&($cols != 'Fax')) { ?
>
377 <b
><?php
echo xlt('Chronic or Inactive Problems'); ?
>:</b
> <br
/>
378  
;<?php
echo text($CHRONIC1)."<br />";
379 if ($CHRONIC2) echo " ".$CHRONIC2."<br />";
380 if ($CHRONIC3) echo " ".$CHRONIC3."<br />";
387 <td style
="width:220px;padding:1px;vertical-align:top;">
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;
421 $from_file = $GLOBALS["fileroot"] . "/sites/" . $_SESSION['site_id'] .
422 '/documents/' . $from_pathname . '/' . $from_filename;
425 echo "<img src='". $from_file."' style='width:220px;'>";
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;'>";
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">
442 <td style
="width:680px;text-align:center;margin:1 auto;">
444 $PMSFH = build_PMSFH($pid);
445 if ($cols !='Fax') show_PMSFH_report($PMSFH);
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)) {
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'];
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
>
489 <?php
if ($SCODVA||
$SCOSVA) { ?
>
491 <td
><?php
echo xlt('sc{{without correction}}'); ?
></td
>
492 <td
><?php
echo text($SCODVA); ?
></td
>
493 <td
><?php
echo text($SCOSVA); ?
></td
>
495 <?php
} if ($ODVA_1||
$OSVA_1) { ?
>
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
>
501 <?php
} if ($ARODVA||
$AROSVA) { ?
>
503 <td
><?php
echo xlt('AR{{Auto-refraction}}'); ?
></td
>
504 <td
><?php
echo text($ARODVA); ?
></td
>
505 <td
><?php
echo text($AROSVA); ?
></td
>
507 <?php
} if ($MRODVA||
$MROSVA) { ?
>
509 <td
><?php
echo xlt('MR{{Manifest Refraction}}'); ?
></td
>
510 <td
><?php
echo text($MRODVA); ?
></td
>
511 <td
><?php
echo text($MROSVA); ?
></td
>
513 <?php
} if ($CRODVA||
$CROSVA) { ?
>
515 <td
><?php
echo xlt('CR{{Cycloplegic Refraction}}'); ?
></td
>
516 <td
><?php
echo text($CRODVA); ?
></td
>
517 <td
><?php
echo text($CROSVA); ?
></td
>
519 <?php
} if ($PHODVA||
$PHOSVA) { ?
>
521 <td
><?php
echo xlt('PH{{Pinhole Vision}}'); ?
></td
>
522 <td
><?php
echo text($PHODVA); ?
></td
>
523 <td
><?php
echo text($PHOSVA); ?
></td
>
525 <?php
} if ($CTLODVA||
$CTLOSVA) { ?
>
527 <td
><?php
echo xlt('CTL{{Contact Lens Vision}}'); ?
></td
>
528 <td
><?php
echo text($CTLODVA); ?
></td
>
529 <td
><?php
echo text($CTLOSVA); ?
></td
>
531 <?php
} if ($SCNEARODVA||
$SCNEAROSVA) { ?
>
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
>
537 <?php
} if ($ODNEARVA_1||
$WNEAROSVA_1) { ?
>
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
>
543 <?php
} if ($ARNEARODVA||
$ARNEAROSVA) { ?
>
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
>
549 <?php
} if ($MRNEARODVA||
$MRNEAROSVA) { ?
>
551 <td
><?php
echo xlt('MRNear{{Manifest Near Acuity}}'); ?
></td
>
552 <td
><?php
echo text($MRNEARODVA); ?
></td
>
553 <td
><?php
echo text($MRNEAROSVA); ?
></td
>
555 <?php
} if ($PAMODVA||
$PAMOSVA) { ?
>
557 <td
><?php
echo xlt('PAM{{Potential Acuity Meter}}'); ?
></td
>
558 <td
><?php
echo text($PAMODVA); ?
></td
>
559 <td
><?php
echo text($PAMOSVA); ?
></td
>
561 <?php
} if ($GLAREODVA||
$GLAREOSVA) { ?
>
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
>
567 <?php
} if ($CONTRASTODVA||
$CONTRASTOSVA) { ?
>
569 <td
><?php
echo xlt('Contrast{{Constaast Visual Acuity}}'); ?
></td
>
570 <td
><?php
echo text($CONTRASTODVA); ?
></td
>
571 <td
><?php
echo text($CONTRASTOSVA); ?
></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
>
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>";
591 <td colspan
="3" style
="text-align:center;">
592 @ <?php
echo text($IOPTIME); ?
>
597 <!-- START OF THE FIELDS BOX
-->
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++
) {
603 if ($
$ODzone =='1') {
604 $ODVF[$z] = '<i class="fa fa-square fa-5">X</i>';
605 if ($PDF_OUTPUT) $ODVF[$z] = 'X';
608 $ODVF[$z] = '<i class="fa fa-square-o fa-5"></i>';
609 if ($PDF_OUTPUT) $ODVF[$z] = 'O';
613 if ($
$OSzone =="1") {
614 $OSVF[$z] = '<i class="fa fa-square fa-5">X</i>';
615 if ($PDF_OUTPUT) $OSVF[$z] = 'X';
618 $OSVF[$z] = '<i class="fa fa-square-o fa-5"></i>';
619 if ($PDF_OUTPUT) $OSVF[$z] = 'O';
625 if ($bad < '1' ) { ?
>
626 <td
class="report_vitals">
627 <b
class="underline"><?php
echo xlt('Fields'); ?
></b
>
629 echo "<br /><br /> Full to CF OU <br /><br /><br />";
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
>
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
>
647 <td style
="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
648 <?php
echo $ODVF['1']; ?
>
650 <td style
="border-left:1pt solid black;border-bottom:1pt solid black;text-align:center;">
651 <?php
echo $ODVF['2']; ?
>
654 <td style
="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
655 <?php
echo $OSVF['1']; ?
>
657 <td style
="border-left:1pt solid black;border-bottom:1pt solid black;text-align:center;">
658 <?php
echo $OSVF['2']; ?
>
662 <td style
="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
663 <?php
echo $ODVF['3']; ?
>
665 <td style
="border-left:1pt solid black;border-top:1pt solid black;text-align:center;">
666 <?php
echo $ODVF['4']; ?
>
669 <td style
="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
670 <?php
echo $OSVF['3']; ?
>
672 <td style
="border-left:1pt solid black;border-top:1pt solid black;text-align:center;">
673 <?php
echo $OSVF['4']; ?
>
681 <!-- START OF THE MOTILITY BOX
-->
682 <td
class="report_vitals">
683 <b
class="underline"><?php
echo xlt('Motility'); ?
></b
>
685 if ($MOTILITYNORMAL =='on') {
686 echo "<br /><br /> ".xlt('D&V Full OU{{Ductions and Versions full both eyes}}') ." <br /><br />";
689 $background = "url(".$GLOBALS["fileroot"] . "/interface/forms/".$form_folder."/images/eom.jpg)";
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
>
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;">
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
>
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
>
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
>
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;">
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
>
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
>
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
>
749 if (($PUPIL_NORMAL =='1')||
$ODPUPILSIZE1||
$OSPUPILSIZE1) {
751 <td
class="report_vitals" style
="border-right:0px;">
753 if (($PUPIL_NORMAL =='1')&&(!$ODPUPILSIZE1||
!$OSPUPILSIZE1)) { ?
>
754 <b
class="underline"><?php
echo xlt('Pupils'); ?
></b
> 
; 
;
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;">
760 <!-- start of the Pupils box
-->
762 <b
class="underline"><?php
echo xlt('Pupils'); ?
></b
>
763 <table style
="font-size: 8px;text-align:middle;">
767 <th style
="padding: 2px 5px;"><?php
echo xlt('size'); ?
> (<?php
echo xlt('mm{{size in millimeters}}'); ?
>)
769 <th style
="padding: 2px;"><?php
echo xlt('react{{reactivity}}'); ?
>
771 <th style
="padding: 2px;"><?php
echo xlt('APD{{Afferent Pupillary Defect}}'); ?
>
775 <td
><b
><?php
echo xlt('OD'); ?
></b
>
777 <td style
="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
778 <?php
echo text($ODPUPILSIZE1); ?
>
780 <?php
echo text($ODPUPILSIZE2); ?
>
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); ?
>
785 <td style
="text-align:center;border-bottom:1pt solid black;">
786 <?php
echo text($ODAPD); ?
>
790 <td
><b
><?php
echo xlt('OS'); ?
></b
>
792 <td style
="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
793 <?php
echo text($OSPUPILSIZE1); ?
>
795 <?php
echo text($OSPUPILSIZE2); ?
>
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); ?
>
800 <td style
="text-align:center;border-top:1pt solid black;">
801 <?php
echo text($OSAPD); ?
>
816 if ($DIMODPUPILSIZE1||
$DIMOSPUPILSIZE1||
$PUPIL_COMMENTS||
$AMSLEROD||
$AMSLEROS) { ?
>
817 <!-- start of slide down pupils_panel
-->
819 <table
class='borderShadow' style
="margin:1px;text-align:center;font-size:9px;">
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;">
826 <th style
="padding: 2px;text-align:center;" ><?php
echo xlt('size'); ?
> (<?php
echo xlt('mm'); ?
>)
830 <td
><b
><?php
echo xlt('OD'); ?
></b
>
832 <td style
="text-align:bottom;border-bottom:1pt solid black;padding-left:0.1in;">
833 <?php
echo text($DIMODPUPILSIZE1); ?
>
835 <?php
echo text($DIMODPUPILSIZE2); ?
>
840 <td
><b
><?php
echo xlt('OS'); ?
></b
>
842 <td style
="border-top:1pt solid black;padding-left:0.1in;">
843 <?php
echo text($DIMOSPUPILSIZE1); ?
>
845 <?php
echo text($DIMOSPUPILSIZE2); ?
>
848 <tr
><td colspan
="2" style
="padding-left:2px;text-align:bottom;">
850 <?php
echo text($PUPIL_COMMENTS); ?
>
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
>
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
>
868 <td style
="text-align:center;text-decoration:underline;"><?php
echo xlt('OS'); ?
></td
>
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;" />
875 <small
><?php
echo text($AMSLEROD); ?
>/5</small
>
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
>
893 if ($ODVA||
$OSVA||
$ARODSPH||
$AROSSPH||
$MRODSPH||
$MROSSPH||
$CRODSPH||
$CROSSPH||
$CTLODSPH||
$CTLOSSPH) { ?
>
894 <!-- start of the refraction boxes
-->
896 <table
class="refraction_tables">
898 <td colspan
="9" style
="text-align:left;text-decoration:underline;font-weight:bold;"><?php
echo xlt('Refractive States'); ?
>
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
>
915 for ($i=1; $i <= $count_rx; $i++
) {
916 if ($
{"RX_TYPE_$i"} =="0") {
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))?:"-");
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
>
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
>
957 if ($
{"COMMENTS_$i"}) {
961 <td colspan
="2"><?php
echo xlt('Comments'); ?
>:</td
>
962 <td colspan
="7"><?php
echo text($
{"COMMENTS_$i"}); ?
></td
>
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
>
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
>
994 if ($
{"COMMENTS_$i"}) {
999 <td colspan
="7"><?php
echo text($
{"COMMENTS_$i"}); ?
></td
>
1004 if ($MRODSPH||
$MROSSPH) { ?
>
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
>
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
>
1032 if ($CRODSPH||
$CROSSPH) { ?
>
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
>
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)?
:"-"); ?
> 
;</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
>
1059 if ($CTLODSPH||
$CTLOSSPH) { ?
>
1060 <tr style
="text-align:center;padding:5px;text-decoration:underline;">
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
>
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
>
1082 <tr style
="font-size:0.6em;">
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
>
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
>
1101 <tr style
="font-size:0.6em;">
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
>
1118 if ($GLAREODVA||
$CONTRASTODVA||
$ODK1||
$ODK2||
$LIODVA||
$PAMODBA) { ?
>
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
>
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
>
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
>
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
>
1152 <tr
><td
> 
;</td
></tr
>
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
> -->
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
> -->
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
> -->
1191 <!-- end of the refraction boxes
-->
1193 <!-- start of external exam
-->
1194 <div
class="report_exam_group">
1197 <td style
="text-align:left;vertical-align:top;">
1198 <b
class="underline"><?php
echo xlt('External Exam'); ?
>:</b
>
1199 <table
class="report_section">
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
>
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
>
1211 <td
class="report_text right ">
1212 <?php
echo text($RUL); ?
>
1214 <td
class="middle"><?php
echo xlt('Upper Lids'); ?
></td
>
1215 <td
class="report_text left"><?php
echo text($LUL); ?
></td
>
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
>
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
>
1228 if ($RADNEXA ||
$LADNEXA) {
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
>
1237 if ($EXT_COMMENTS) { ?
>
1241 <b
><?php
echo xlt('Comments'); ?
>:</b
>
1242 <span style
="height:3.0em;">
1243 <?php
echo text($EXT_COMMENTS); ?
>
1250 <td style
="text-align:center;padding:1px;vertical-align:middle;">
1252 display_draw_image ("EXT",$encounter,$pid);
1258 <!-- end of external exam
-->
1259 <div
class="report_exam_group">
1261 if ($OSCONJ||
$ODCONJ||
$ODCORNEA||
$OSCORNEA||
$ODAC||
$OSAC||
$ODLENS||
$OSLENS||
$ODIRIS||
$OSIRIS) {
1263 <!-- start of Anterior Segment exam
-->
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">
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
>
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
>
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
>
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
>
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
>
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
>
1299 <?php
if ($ODGONIO||
$OSDGONIO) { ?
>
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
>
1305 <?php
} if ($ODKTHICKNESS||
$OSKTHICKNESS) { ?
>
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
>
1311 <?php
} if ($ODSCHIRMER1||
$OSSCHIRMER1) { ?
>
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
>
1317 <?php
} if ($ODSCHIRMER2||
$OSSCHIRMER2) { ?
>
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
>
1323 <?php
} if ($ODTBUT||
$OSTBUT) { ?
>
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
>
1330 if ($ANTSEG_COMMENTS) { ?
>
1333 <b
><?php
echo xlt('Comments'); ?
>:</b
>
1334 <span style
="height:3.0em;">
1335 <?php
echo text($ANTSEG_COMMENTS); ?
>
1342 <td style
="text-align:center;padding:1px;vertical-align:middle;">
1344 display_draw_image ("ANTSEG",$encounter,$pid);
1349 <!-- end of Anterior Segment exam
-->
1355 <div
class="report_exam_group">
1357 <!-- start of Other exam
-->
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) {
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'); ?
>
1374 <table
class="report_section">
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
>
1381 if ($RLF ||
$LLF) { ?
>
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
>
1389 if ($RMRD ||
$LMRD) { ?
>
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
>
1397 if ($RVFISSURE ||
$LVFISSURE) { ?
>
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
>
1405 if ($RCAROTID ||
$LCAROTID) { ?
>
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
>
1413 if ($RTEMPART ||
$LTEMPART) { ?
>
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
>
1421 if ($RCNV ||
$LCNV) { ?
>
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
>
1429 if ($RCNVII ||
$LCNVII) { ?
>
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
>
1437 if ($HERTELBASE) { ?
>
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'); ?
>
1445 if ($HERTELBASE) { ?
>
1447 <b style
="border:1pt solid black;width:30px;text-align:center;padding:0 5;">
1448 <?php
echo text($ODHERTEL); ?
>
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); ?
>
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); ?
>
1465 if ($ODCOLOR ||
$OSCOLOR ||
$ODREDDESAT ||
1466 $OSREDDESAT ||
$ODCOINS ||
$OSCOINS ||
1467 $ODNPA ||
$OSNPA ||
$NPA ||
$NPC ||
$STEREOPSIS) { ?
>
1468 <!-- start of NEURO exam
-->
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
>
1474 <?php
if ($ODREDDESAT or $OSREDDESAT) { ?
>
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
>
1481 if ($ODCOINS or $OSCOINS) { ?
>
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
>
1489 if ($ODNPA or $OSNPA) { ?
>
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
>
1496 if ($ODNPC or $OSNPC) { ?
>
1498 <td
class="right" style
="font-weight:600;"><?php
echo xlt('NPC{{near point of convergence}}'); ?
>: 
;</td
>
1499 <td
class="center" colspan
="2" ><?php
echo text($NPC); ?
></td
>
1502 if ($DACCDIST or $DACCNEAR or $CACCDIST or $CACCNEAR or $VERTFUSAMPS) { ?
>
1503 <tr style
="text-decoration:underline;">
1505 <td
class="middle"><?php
echo xlt('Distance'); ?
> </td
>
1506 <td
class="middle"> <?php
echo xlt('Near'); ?
></td
>
1509 if ($DACCDIST or $DACCNEAR) { ?
>
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
>
1516 if ($CACCDIST or $CACCNEAR) { ?
>
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
>
1523 if ($VERTFUSAMPS) { ?
>
1525 <td
class="right" style
="font-weight:600;">
1526 <?php
echo xlt('Vert Fusional Amps'); ?
>:
1528 <td colspan
="2" class="center">
1529 <?php
echo text($VERTFUSAMPS); ?
>
1534 if ($STEREOPSIS) { ?
>
1536 <td
class="right" style
="font-weight:600;"><?php
echo xlt('Stereopsis'); ?
>: 
;</td
>
1537 <td
class="center" colspan
="2"><?php
echo text($STEREOPSIS); ?
></td
>
1543 <td style
="text-align:center;padding:1px;vertical-align:middle;">
1545 display_draw_image ("NEURO",$encounter,$pid);
1552 <!-- end of Other exam
-->
1554 <div
class="report_exam_group">
1556 <!-- start of the Retina exam
-->
1558 if ($ODDISC||
$OSDISC||
$ODCUP||
$ODMACULA||
$ODVESSELS||
$ODPERIPH) {
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">
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
>
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
>
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
>
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
>
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
>
1590 <?php
if ($ODPERIPH||
$OSPERIPH) { ?
>
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
>
1596 <?php
} if ($ODCMT||
$OSCMT) { ?
>
1598 <td
class="report_text right"> 
;<?php
echo text($ODCMT); ?
></td
>
1599 <td
class="middle"><?php
echo xlt('Central Macular Thickness'); ?
> </td
>
1600 <td
class="report_text left" > 
;<?php
echo text($OSCMT); ?
></td
>
1603 <?php
if ($RETINA_COMMENTS) { ?
>
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); ?
>
1617 <td style
="text-align:center;padding:1px;vertical-align:middle;">
1619 display_draw_image ("RETINA",$encounter,$pid);
1627 <!-- end of Retina exam
-->
1630 if ($ACT !='on') { ?
>
1631 <table style
="text-align:center;font-size:0.7em;">
1633 <td colspan
=3 style
="">
1635 <tr style
="text-align:left;height:16px;vertical-align:middle;width:880px;">
1637 <span id
="ACTTRIGGER" name
="ACTTRIGGER" style
="text-decoration:underline;padding-left:2px;">
1638 <?php
echo xlt('Alternate Cover Test'); ?
>:
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;">
1649 <td id
="ACT_tab_SCDIST" name
="ACT_tab_SCDIST" class="ACT_deselected"> <?php
echo xlt('sc Distance{{without correction distance}}'); ?
> </td
>
1652 <td colspan
="4" style
="text-align:center;font-size:0.9em;">
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
>
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
>
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
>
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;">
1687 <td
class="ACT_deselected"> <?php
echo xlt('cc Distance{{with correction at distance}}'); ?
> </td
>
1690 <td colspan
="4" style
="text-align:center;font-size:0.8em;">
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
>
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
>
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); ?
>
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;">
1729 <td
class="ACT_deselected"> <?php
echo xlt('sc Near{{without correction near'); ?
> </td
>
1732 <td colspan
="4" style
="text-align:center;font-size:0.8em;">
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
>
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
>
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); ?
>
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;">
1769 <td
class="ACT_deselected"> <?php
echo xlt('cc Near{{with correction at Near}}'); ?
> </td
>
1772 <td colspan
="4" style
="text-align:center;font-size:1.0em;">
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
>
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
>
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
>
1804 <?php
if ($NEURO_COMMENTS) { ?
>
1808 <b
><?php
echo xlt('Comments'); ?
>:</b
><br
/>
1809 <span style
="height:3.0em;">
1810 <?php
echo report_ACT($NEURO_COMMENTS); ?
>
1823 //end choice !== 'TEXT' -- include this in summary mouseover report.
1825 <!-- start of IMPPLAN exam
-->
1826 <table
class="report_exam_group">
1828 <td style
="text-align:left;padding:1px;vertical-align:top;width:480px;">
1829 <b
><u
><?php
echo xlt('Impression/Plan'); ?
>:</u
></b
>
1832 <td style
="padding:5px;text-align: left;text-align:justify;width:475px;">
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));
1840 $order = array("\r\n", "\n", "\r","\v","\f","\x85","\u2028","\u2029");
1841 $replace = "<br />";
1843 while ($ip_list = sqlFetchArray($result)) {
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;
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 />";
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
>
1878 <div style
="padding-left:15px;padding-bottom:10px;width:400px;">
1880 $PLAN_items = explode('|',$PLAN);
1881 foreach ($PLAN_items as $item) {
1882 echo $item."<br />";
1885 echo $PLAN2."<br />";
1896 <td style
="text-align:center;vertical-align:bottom;padding:1px;">
1898 display_draw_image ("IMPPLAN",$encounter,$pid);
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>";
1910 <span style
="border-top:1pt solid black;padding-left:50px;"><?php
echo text($providerNAME); ?
></span
>
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' />";
1929 function display_draw_image($zone,$encounter,$pid){
1930 global $form_folder;
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) {
1951 echo '<td>' . xlt('Note') . ' #' . $note->get_id() . '</td>';
1954 echo '<td>' . xlt('Date') . ': ' . oeFormatShortDate($note->get_date()) . '</td>';
1957 echo '<td>'.$note->get_note().'<br /><br /></td>';
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';
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") {
1988 echo "<img src='". $from_file."' style='width:220px;height:120px;'>";
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
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;'>";
2007 function report_ACT($term) {
2008 $term = nl2br(htmlspecialchars($term,ENT_NOQUOTES
));
2009 return $term." ";