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 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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/lists.inc");
52 require_once(dirname(__FILE__
) ."/../../../library/forms.inc");
53 require_once(dirname(__FILE__
) ."/../../../library/patient.inc");
55 $form_name = "eye_mag";
56 $form_folder = "eye_mag";
58 $facilityService = new \services\
FacilityService();
60 require_once("../../forms/".$form_folder."/php/".$form_folder."_functions.php");
62 if ($_REQUEST['CHOICE']) {
63 $choice = $_REQUEST['choice'];
66 if ($_REQUEST['ptid']) {
67 $pid = $_REQUEST['ptid'];
70 if ($_REQUEST['encid']) {
71 $encounter=$_REQUEST['encid'];
74 if ($_REQUEST['formid']) {
75 $form_id = $_REQUEST['formid'];
78 if ($_REQUEST['formname']) {
79 $form_name=$_REQUEST['formname'];
86 // Get users preferences, for this user
87 // (and if not the default where a fresh install begins from, or someone else's)
88 $query = "SELECT * FROM form_eye_mag_prefs where PEZONE='PREFS' AND id=? ORDER BY ZONE_ORDER,ordering";
89 $result = sqlStatement($query, array($_SESSION['authUserID']));
90 while ($prefs= sqlFetchArray($result)) {
91 $LOCATION = $prefs['LOCATION'];
92 $
$LOCATION = text($prefs['GOVALUE']);
95 function eye_mag_report($pid, $encounter, $cols, $id, $formname = 'eye_mag')
101 /** openEMR note: eye_mag Index is id,
102 * linked to encounter in form_encounter
103 * whose encounter is linked to id in forms.
106 $query="select form_encounter.date as encounter_date,form_eye_mag.*
107 from form_eye_mag ,forms,form_encounter
109 form_encounter.encounter =? and
110 form_encounter.encounter = forms.encounter and
111 form_eye_mag.id=forms.form_id and
112 forms.pid =form_eye_mag.pid and
113 form_eye_mag.pid=? ";
114 $objQuery =sqlQuery($query, array($encounter,$pid));
117 $dated = new DateTime($encounter_date);
118 $dated = $dated->format('Y/m/d');
121 $visit_date = oeFormatShortDate($dated);
124 * Patient/Client -> Visits -> Visit History, on mouse over this is called with variable "choice".
125 * To use this feature, this "choice" variable must be added programmatically to
126 * /interface/patient_file/history/encounters_ajax.php, currently line 20.
127 * The variable $choice will tell us what to display.
128 * If it is not present it will display everything == 'narrative'.
129 * @param string $choice options NULL,TEXT,DRAW,NARRATIVE
130 * @param string $encounter = encounter number
131 * @param string $pid value = patient id
132 * @return string => returns the HTML of the report selected
135 if ($choice == 'DRAW') {
138 $zone = array("HPI","PMH","VISION","NEURO","EXT","ANTSEG","RETINA","IMPPLAN");
139 // for ($i = 0; $i < count($zone); ++$i) {
140 // show only 2 for now in the encounter page
141 ($choice =='drawing') ? ($count = count($zone)) : ($count ='2');
142 for ($i = 0; $i < $count; ++$i) {
143 $file_location = $GLOBALS["OE_SITES_BASE"]."/".$_SESSION['site_id']."/documents/".$pid."/".$form_folder."/".$encounter."/".$side."_".$zone[$i]."_VIEW.png";
144 $sql = "SELECT * from documents where url='file://".$file_location."'";
145 $doc = sqlQuery($sql);
146 if (file_exists($file_location) && ($doc['id'] > '0')) {
147 $filetoshow = $GLOBALS['web_root']."/controller.php?document&retrieve&patient_id=$pid&document_id=$doc[id]&as_file=false";
148 ?><div style='position:relative;float:left;width:100px;height:75px;'>
149 <img src='<?php echo $filetoshow; ?>' width=100 heght=75>
152 // $filetoshow = "../../forms/".$form_folder."/images/".$side."_".$zone[$i]."_BASE.png?".rand();
158 } else if ($choice == "drawing") {
161 <div
class="borderShadow">
162 <?php
display_draw_section("VISION", $encounter, $pid); ?
>
164 <div
class="borderShadow">
165 <?php
display_draw_section("NEURO", $encounter, $pid); ?
>
167 <div
class="borderShadow">
168 <?php
display_draw_section("EXT", $encounter, $pid); ?
>
170 <div
class="borderShadow">
171 <?php
display_draw_section("ANTSEG", $encounter, $pid); ?
>
173 <div
class="borderShadow">
174 <?php
display_draw_section("RETINA", $encounter, $pid); ?
>
176 <div
class="borderShadow">
177 <?php
display_draw_section("IMPPLAN", $encounter, $pid); ?
>
180 } else if ($choice == 'TEXT') {
181 //just display HPI and A/P
182 narrative($pid, $encounter, $cols, $id, 'TEXT');
183 } else if ($choice !="narrative") {
184 narrative($pid, $encounter, $cols, $id, 'narrative');
188 function left_overs()
191 * Keep: this could be co-opted to export an XML/HL7 type of document
194 $data = formFetch($table_name, $id);
197 foreach ($data as $key => $value) {
204 * This is the core report, including Practice logo, patient ID/header.
205 * It relies on the presence of the PMSFH,IMPPLAN arrays.
206 * Rest of fields are pulled from the DB.
208 function narrative($pid, $encounter, $cols, $form_id, $choice = 'full')
216 global $facilityService;
217 //if $cols == 'Fax', we are here from taskman, making a fax and this a one page short form - leave out PMSFH, prescriptions
218 //and any clinical area that is blank.
219 $query="select form_encounter.date as encounter_date,form_eye_mag.id as form_id,form_encounter.*, form_eye_mag.*
220 from form_eye_mag ,forms,form_encounter
222 form_encounter.encounter =? and
223 form_encounter.encounter = forms.encounter and
224 form_eye_mag.id=forms.form_id and
225 forms.deleted != '1' and
226 form_eye_mag.pid=? ";
228 $encounter_data =sqlQuery($query, array($encounter,$pid));
229 @extract
($encounter_data);
230 $providerID = getProviderIdOfEncounter($encounter);
231 $providerNAME = getProviderName($providerID);
232 $dated = new DateTime($encounter_date);
233 $dated = $dated->format('Y/m/d');
234 $visit_date = oeFormatShortDate($dated);
237 <link rel
="stylesheet" href
="<?php echo attr($css_header);?>" type
="text/css">
238 <link rel
="stylesheet" href
="../../forms/<?php echo attr($form_folder); ?>/css/report.css" type
="text/css">
241 <?php
if ($PDF_OUTPUT) { ?
>
258 if (($cols =='Fax')||
($cols=='Report')) {
259 echo report_header($pid, 'PDF');
263 $titleres = getPatientData($pid, "fname,lname,providerID,DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
265 if ($_SESSION['pc_facility']) {
266 $facility = $facilityService->getById($_SESSION['pc_facility']);
268 $facility = $facilityService->getPrimaryBillingLocation();
272 if ($choice !== 'TEXT') { ?
>
276 <table
class="report_exam_group">
278 <td style
="text-align:left;padding:1px;vertical-align:top;max-width:720px;">
279 <table style
="padding:5px;width:700px;">
281 <td colspan
="1" style
="text-align: justify;text-justify: inter-word;width:100%;">
282 <b
><?php
echo xlt('Chief Complaint'); ?
>:</b
>  
;<?php
echo text($CC1); ?
>
284 <b
><?php
echo xlt('HPI'); ?
>:</b
>
285  
;<?php
echo $HPI1; ?
>
287 <div style
="padding-left:20px;">
290 echo "<i>".xlt('Timing'); ?
>:</i
>  
;<?php
echo text($TIMING1)."<br />";
294 echo "<i>".xlt('Context'); ?
>:</i
>  
;<?php
echo text($CONTEXT1)."<br />";
298 echo "<i>".xlt('Severity'); ?
>:</i
>  
;<?php
echo text($SEVERITY1)."<br />";
302 echo "<i>".xlt('Modifying'); ?
>:</i
>  
;<?php
echo text($MODIFY1)."<br />";
306 echo "<i>".xlt('Associated'); ?
>:</i
>  
;<?php
echo text($ASSOCIATED1)."<br />";
310 echo "<i>".xlt('Location'); ?
>:</i
>  
;<?php
echo text($LOCATION1)."<br />";
314 echo "<i>".xlt('Quality'); ?
>:</i
>  
;<?php
echo text($QUALITY1)."<br />";
318 echo "<i>".xlt('Duration'); ?
>:</i
>  
;<?php
echo text($DURATION1)."<br />";
326 echo "<b>".xlt('Chief Complaint 2'); ?
>:</b
>  
;<?php
echo text($CC2); ?
>
328 <b
><?php
echo xlt('HPI'); ?
>:</b
>
329  
;<?php
echo text($HPI2); ?
>
332 <div style
="padding-left:10px;">
335 echo "<i>".xlt('Timing'); ?
>:</i
>  
;<?php
echo text($TIMING2)."<br />";
339 echo "<i>".xlt('Context'); ?
>:</i
>  
;<?php
echo text($CONTEXT2)."<br />";
343 echo "<i>".xlt('Severity'); ?
>:</i
>  
;<?php
echo text($SEVERITY2)."<br />";
347 echo "<i>".xlt('Modifying'); ?
>:</i
>  
;<?php
echo text($MODIFY2)."<br />";
351 echo "<i>".xlt('Associated'); ?
>:</i
>  
;<?php
echo text($ASSOCIATED2)."<br />";
355 echo "<i>".xlt('Location'); ?
>:</i
>  
;<?php
echo text($LOCATION2)."<br />";
359 echo "<i>".xlt('Quality'); ?
>:</i
>  
;<?php
echo text($QUALITY2)."<br />";
363 echo "<i>".xlt('Duration'); ?
>:</i
>  
;<?php
echo text($DURATION2)."<br />";
374 <?php
echo "<b>".xlt('Chief Complaint 3'); ?
>:</b
>  
;<?php
echo text($CC3); ?
>
376 <?php
echo xlt('HPI'); ?
> 
; <?php
echo text($HPI3); ?
>
378 <div style
="padding-left:10px;">
381 echo "<i>".xlt('Timing'); ?
>:</i
>  
;<?php
echo text($TIMING3)."<br />";
385 echo "<i>".xlt('Context'); ?
>:</i
>  
;<?php
echo text($CONTEXT3)."<br />";
389 echo "<i>".xlt('Severity'); ?
>:</i
>  
;<?php
echo text($SEVERITY3)."<br />";
393 echo "<i>".xlt('Modifying'); ?
>:</i
>  
;<?php
echo text($MODIFY3)."<br />";
397 echo "<i>".xlt('Associated'); ?
>:</i
>  
;<?php
echo text($ASSOCIATED3)."<br />";
401 echo "<i>".xlt('Location'); ?
>:</i
>  
;<?php
echo text($LOCATION3)."<br />";
405 echo "<i>".xlt('Quality'); ?
>:</i
>  
;<?php
echo text($QUALITY3)."<br />";
409 echo "<i>".xlt('Duration'); ?
>:</i
>  
;<?php
echo text($DURATION3)."<br />";
419 if (($CHRONIC1)&&($cols != 'Fax')) { ?
>
420 <b
><?php
echo xlt('Chronic or Inactive Problems'); ?
>:</b
> <br
/>
421  
;<?php
echo text($CHRONIC1)."<br />";
423 echo " ".$CHRONIC2."<br />";
427 echo " ".$CHRONIC3."<br />";
435 <td style
="width:220px;padding:1px;vertical-align:top;">
438 //no idea if this works for couchDB people
439 $sql = "SELECT * FROM documents,categories,categories_to_documents WHERE
440 documents.id=categories_to_documents.document_id and
441 categories.id=categories_to_documents.category_id and
442 categories.name='Patient Photograph' and
443 documents.foreign_id=?";
444 $doc = sqlQuery($sql, array($pid));
445 $document_id =$doc['document_id'];
446 if (is_numeric($document_id)) {
447 $d = new Document($document_id);
448 $fname = basename($d->get_url());
449 $couch_docid = $d->get_couch_docid();
450 $couch_revid = $d->get_couch_revid();
451 $url_file = $d->get_url_filepath();
452 if ($couch_docid && $couch_revid) {
453 $url_file = $d->get_couch_url($pid, $encounter);
456 // Collect filename and path
457 $from_all = explode("/", $url_file);
458 $from_filename = array_pop($from_all);
459 $from_pathname_array = array();
460 for ($i=0; $i<$d->get_path_depth(); $i++
) {
461 $from_pathname_array[] = array_pop($from_all);
464 $from_pathname_array = array_reverse($from_pathname_array);
465 $from_pathname = implode("/", $from_pathname_array);
466 if ($couch_docid && $couch_revid) {
467 $from_file = $GLOBALS['OE_SITE_DIR'] . '/documents/temp/' . $from_filename;
469 $from_file = $GLOBALS["fileroot"] . "/sites/" . $_SESSION['site_id'] .
470 '/documents/' . $from_pathname . '/' . $from_filename;
474 echo "<img src='". $from_file."' style='width:220px;'>";
476 $filetoshow = $GLOBALS['webroot']."/controller.php?document&retrieve&patient_id=$pid&document_id=".$doc['document_id']."&as_file=false&blahblah=".rand();
477 echo "<img src='".$filetoshow."' style='width:220px;'>";
485 if ($choice !== 'TEXT') {
486 //exclude all of this from displaying on the summary mouseover by default
488 <hr style
="width:50%;text-align:center;" />
489 <table style
="margin:1 auto;" class="report_exam_group">
491 <td style
="width:680px;text-align:center;margin:1 auto;">
493 $PMSFH = build_PMSFH($pid);
495 show_PMSFH_report($PMSFH);
500 $query = "select * from form_eye_mag_wearing where PID=? and FORM_ID=? and ENCOUNTER=? ORDER BY RX_NUMBER";
501 $wear = sqlStatement($query, array($pid,$form_id,$encounter));
502 while ($wearing = sqlFetchArray($wear)) {
504 $
{"display_W_$count_rx"} = '';
505 $
{"ODSPH_$count_rx"} = $wearing['ODSPH'];
506 $
{"ODCYL_$count_rx"} = $wearing['ODCYL'];
507 $
{"ODAXIS_$count_rx"} = $wearing['ODAXIS'];
508 $
{"OSSPH_$count_rx"} = $wearing['OSSPH'];
509 $
{"OSCYL_$count_rx"} = $wearing['OSCYL'];
510 $
{"OSAXIS_$count_rx"} = $wearing['OSAXIS'];
511 $
{"ODMIDADD_$count_rx"} = $wearing['ODMIDADD'];
512 $
{"OSMIDADD_$count_rx"} = $wearing['OSMIDADD'];
513 $
{"ODADD_$count_rx"} = $wearing['ODADD'];
514 $
{"OSADD_$count_rx"} = $wearing['OSADD'];
515 $
{"ODVA_$count_rx"} = $wearing['ODVA'];
516 $
{"OSVA_$count_rx"} = $wearing['OSVA'];
517 $
{"ODNEARVA_$count_rx"} = $wearing['ODNEARVA'];
518 $
{"OSNEARVA_$count_rx"} = $wearing['OSNEARVA'];
519 $
{"ODPRISM_$count_rx"} = $wearing['ODPRISM'];
520 $
{"OSPRISM_$count_rx"} = $wearing['OSPRISM'];
521 $
{"COMMENTS_$count_rx"} = $wearing['COMMENTS'];
522 $
{"W_$count_rx"} = '1';
523 $
{"RX_TYPE_$count_rx"} = $wearing['RX_TYPE'];
530 <table
class="borderShadow" >
531 <tr style
="font-size:10px;">
532 <!-- Start of the Vision box
-->
533 <td
class="report_vitals">
534 <b
class="underline"><?php
echo xlt('Visual Acuities'); ?
></b
>
535 <table id
="Additional_VA" cellspacing
="2" style
="text-align:center;font-size:1.0em;">
536 <tr style
="font-weight:bold;">
537 <td style
="text-align:center;"></td
>
538 <td style
="width:50px;text-align:center;text-decoration:underline;"><?php
echo xlt('OD'); ?
></td
>
539 <td style
="width:50px;text-align:center;text-decoration:underline;"><?php
echo xlt('OS'); ?
></td
>
541 <?php
if ($SCODVA||
$SCOSVA) { ?
>
543 <td
><?php
echo xlt('sc{{without correction}}'); ?
></td
>
544 <td
><?php
echo text($SCODVA); ?
></td
>
545 <td
><?php
echo text($SCOSVA); ?
></td
>
547 <?php
} if ($ODVA_1||
$OSVA_1) { ?
>
549 <td
><?php
echo xlt('cc{{with correction}}'); ?
></td
>
550 <td
><?php
echo text($ODVA_1); ?
></td
>
551 <td
><?php
echo text($OSVA_1); ?
></td
>
553 <?php
} if ($ARODVA||
$AROSVA) { ?
>
555 <td
><?php
echo xlt('AR{{autorefraction}}'); ?
></td
>
556 <td
><?php
echo text($ARODVA); ?
></td
>
557 <td
><?php
echo text($AROSVA); ?
></td
>
559 <?php
} if ($MRODVA||
$MROSVA) { ?
>
561 <td
><?php
echo xlt('MR{{Manifest Refraction}}'); ?
></td
>
562 <td
><?php
echo text($MRODVA); ?
></td
>
563 <td
><?php
echo text($MROSVA); ?
></td
>
565 <?php
} if ($CRODVA||
$CROSVA) { ?
>
567 <td
><?php
echo xlt('CR{{Cycloplegic Refraction}}'); ?
></td
>
568 <td
><?php
echo text($CRODVA); ?
></td
>
569 <td
><?php
echo text($CROSVA); ?
></td
>
571 <?php
} if ($PHODVA||
$PHOSVA) { ?
>
573 <td
><?php
echo xlt('PH{{Pinhole Vision}}'); ?
></td
>
574 <td
><?php
echo text($PHODVA); ?
></td
>
575 <td
><?php
echo text($PHOSVA); ?
></td
>
577 <?php
} if ($CTLODVA||
$CTLOSVA) { ?
>
579 <td
><?php
echo xlt('CTL{{Contact Lens Vision}}'); ?
></td
>
580 <td
><?php
echo text($CTLODVA); ?
></td
>
581 <td
><?php
echo text($CTLOSVA); ?
></td
>
583 <?php
} if ($SCNEARODVA||
$SCNEAROSVA) { ?
>
585 <td
><?php
echo xlt('scNear{{without correction near}}'); ?
></td
>
586 <td
><?php
echo text($SCNEARODVA); ?
></td
>
587 <td
><?php
echo text($SCNEAROSVA); ?
></td
>
589 <?php
} if ($ODNEARVA_1||
$WNEAROSVA_1) { ?
>
591 <td
><?php
echo xlt('ccNear{{with correction at near}}'); ?
></td
>
592 <td
><?php
echo text($ODNEARVA_1); ?
></td
>
593 <td
><?php
echo text($OSNEARVA_1); ?
></td
>
595 <?php
} if ($ARNEARODVA||
$ARNEAROSVA) { ?
>
597 <td
><?php
echo xlt('ARNear{{Auto-refraction near acuity}}'); ?
></td
>
598 <td
><?php
echo text($ARNEARODVA); ?
></td
>
599 <td
><?php
echo text($ARNEAROSVA); ?
></td
>
601 <?php
} if ($MRNEARODVA||
$MRNEAROSVA) { ?
>
603 <td
><?php
echo xlt('MRNear{{Manifest Near Acuity}}'); ?
></td
>
604 <td
><?php
echo text($MRNEARODVA); ?
></td
>
605 <td
><?php
echo text($MRNEAROSVA); ?
></td
>
607 <?php
} if ($PAMODVA||
$PAMOSVA) { ?
>
609 <td
><?php
echo xlt('PAM{{Potential Acuity Meter}}'); ?
></td
>
610 <td
><?php
echo text($PAMODVA); ?
></td
>
611 <td
><?php
echo text($PAMOSVA); ?
></td
>
613 <?php
} if ($GLAREODVA||
$GLAREOSVA) { ?
>
615 <td
><?php
echo xlt('Glare{{Acuity under Glare conditions}}'); ?
></td
>
616 <td
><?php
echo text($GLAREODVA); ?
></td
>
617 <td
><?php
echo text($GLAREOSVA); ?
></td
>
619 <?php
} if ($CONTRASTODVA||
$CONTRASTOSVA) { ?
>
621 <td
><?php
echo xlt('Contrast{{Constrast Visual Acuity}}'); ?
></td
>
622 <td
><?php
echo text($CONTRASTODVA); ?
></td
>
623 <td
><?php
echo text($CONTRASTOSVA); ?
></td
>
628 <!-- START OF THE PRESSURE BOX
-->
629 <td
class="report_vitals">
630 <b
class="underline"><?php
echo xlt('Intraocular Pressures'); ?
></b
>
631 <table cellspacing
="2" style
="margin:2;text-align:center;font-size:1.0em;">
632 <tr style
="font-weight:bold;">
633 <td style
="text-align:center;"></td
>
634 <td style
="text-align:center;text-decoration:underline;"><?php
echo xlt('OD'); ?
></td
>
635 <td style
="text-align:center;text-decoration:underline;"><?php
echo xlt('OS'); ?
></td
>
638 if ($ODIOPAP||
$OSIOPAP) {
639 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>";
642 if ($ODIOPTPN||
$OSIOPTPN) {
643 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>";
646 if ($ODIOPFTN||
$OSIOPFTN) {
647 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>";
651 <td colspan
="3" style
="text-align:center;">
652 @ <?php
echo text($IOPTIME); ?
>
657 <!-- START OF THE FIELDS BOX
-->
659 // if the VF zone is checked, display it
660 // if ODVF1 = 1 (true boolean) the value="0" checked="true"
661 for ($z=1; $z <5; $z++
) {
663 if ($
$ODzone =='1') {
664 $ODVF[$z] = '<i class="fa fa-square fa-5">X</i>';
671 $ODVF[$z] = '<i class="fa fa-square-o fa-5"></i>';
678 if ($
$OSzone =="1") {
679 $OSVF[$z] = '<i class="fa fa-square fa-5">X</i>';
686 $OSVF[$z] = '<i class="fa fa-square-o fa-5"></i>';
695 <td
class="report_vitals">
696 <b
class="underline"><?php
echo xlt('Fields{{visual fields}}'); ?
></b
>
698 echo "<br /><br /> Full to CF OU <br /><br /><br />";
701 <td
class="report_vitals">
702 <b
class="underline"><?php
echo xlt('Fields{{visual fields}}'); ?
></b
>
703 <table style
="font-size:1.0em;text-align:center;">
704 <tr style
="font-weight:bold;">
705 <td style
="width:0.5in;text-align:center;text-decoration:underline;" colspan
="2"><b
><?php
echo xlt('OD'); ?
></b
>
709 <td style
="width:0.1in;"> </td
>
710 <td style
="width:0.5in;text-align:center;text-decoration:underline;" colspan
="2"><b
><?php
echo xlt('OS'); ?
></b
>
716 <td style
="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
717 <?php
echo $ODVF['1']; ?
>
719 <td style
="border-left:1pt solid black;border-bottom:1pt solid black;text-align:center;">
720 <?php
echo $ODVF['2']; ?
>
723 <td style
="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
724 <?php
echo $OSVF['1']; ?
>
726 <td style
="border-left:1pt solid black;border-bottom:1pt solid black;text-align:center;">
727 <?php
echo $OSVF['2']; ?
>
731 <td style
="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
732 <?php
echo $ODVF['3']; ?
>
734 <td style
="border-left:1pt solid black;border-top:1pt solid black;text-align:center;">
735 <?php
echo $ODVF['4']; ?
>
738 <td style
="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
739 <?php
echo $OSVF['3']; ?
>
741 <td style
="border-left:1pt solid black;border-top:1pt solid black;text-align:center;">
742 <?php
echo $OSVF['4']; ?
>
750 <!-- START OF THE MOTILITY BOX
-->
751 <td
class="report_vitals">
752 <b
class="underline"><?php
echo xlt('Motility'); ?
></b
>
754 if ($MOTILITYNORMAL =='on') {
755 echo "<br /><br /> ".xlt('D&V Full OU{{Ductions and Versions full both eyes}}') ." <br /><br />";
758 $background = "url(".$GLOBALS["fileroot"] . "/interface/forms/".$form_folder."/images/eom.jpg)";
760 $background = "url(../../forms/".$form_folder."/images/eom.bmp)";
763 $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");
764 for ($i = 0; $i < count($zone); ++
$i) {
765 ($
$zone[$i] >= '1') ?
($
$zone[$i] = "-".$
$zone[$i]) : ($
$zone[$i] = '');
768 <table style
="font-size:1.0em;">
769 <tr style
="font-weight:bold;">
770 <td style
="text-align:center;text-decoration:underline;"><?php
echo xlt('OD'); ?
></td
>
771 <td style
="text-align:center;text-decoration:underline;"><?php
echo xlt('OS'); ?
></td
>
774 <td style
="font-weight:600;">
775 <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;">
777 <td
class="mot"><?php
echo $MOTILITY_RRSO; ?
></td
>
778 <td
class="mot"><?php
echo $MOTILITY_RS; ?
></td
>
779 <td
class="mot"><?php
echo $MOTILITY_RLSO; ?
></td
>
782 <td
class="mot"><?php
echo $MOTILITY_RR; ?
></td
>
783 <td
class="mot"><?php
echo $MOTILITY_R0; ?
></td
>
784 <td
class="mot"><?php
echo $MOTILITY_RL; ?
></td
>
787 <td
class="mot"><?php
echo $MOTILITY_RRIO; ?
></td
>
788 <td
class="mot"><?php
echo $MOTILITY_RI; ?
></td
>
789 <td
class="mot"><?php
echo $MOTILITY_RLIO; ?
></td
>
793 <td style
="text-align:center;font-weight:600;padding-left:20px;">
794 <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;">
796 <td
class="mot"><?php
echo $MOTILITY_LRSO; ?
></td
>
797 <td
class="mot"><?php
echo $MOTILITY_LS; ?
></td
>
798 <td
class="mot"><?php
echo $MOTILITY_LLSO; ?
></td
>
801 <td
class="mot"><?php
echo $MOTILITY_LR; ?
></td
>
802 <td
class="mot"><?php
echo $MOTILITY_L0; ?
></td
>
803 <td
class="mot"><?php
echo $MOTILITY_LL; ?
></td
>
806 <td
class="mot"><?php
echo $MOTILITY_LLIO; ?
></td
>
807 <td
class="mot"><?php
echo $MOTILITY_LI; ?
></td
>
808 <td
class="mot"><?php
echo $MOTILITY_LLIO; ?
></td
>
819 if (($PUPIL_NORMAL =='1')||
$ODPUPILSIZE1||
$OSPUPILSIZE1) {
821 <td
class="report_vitals" style
="border-right:0px;">
823 if (($PUPIL_NORMAL =='1')&&(!$ODPUPILSIZE1||
!$OSPUPILSIZE1)) { ?
>
824 <b
class="underline"><?php
echo xlt('Pupils'); ?
></b
> 
; 
;
825 <?php
echo xlt('Round and Reactive')."<br />";
828 if ($ODPUPILSIZE1||
$OSPUPILSIZE1) { ?
>
829 <table cellspacing
="0" style
="margin:1px;text-align:center;font-size:9px;">
831 <!-- start of the Pupils box
-->
833 <b
class="underline"><?php
echo xlt('Pupils'); ?
></b
>
834 <table style
="font-size: 8px;text-align:middle;">
838 <th style
="padding: 2px 5px;"><?php
echo xlt('size'); ?
> (<?php
echo xlt('mm{{millimeters}}'); ?
>)
840 <th style
="padding: 2px;"><?php
echo xlt('react{{reactivity}}'); ?
>
842 <th style
="padding: 2px;"><?php
echo xlt('APD{{afferent pupillary defect}}'); ?
>
846 <td
><b
><?php
echo xlt('OD'); ?
></b
>
848 <td style
="border-right:1pt solid black;border-bottom:1pt solid black;text-align:center;">
849 <?php
echo text($ODPUPILSIZE1); ?
>
851 <?php
echo text($ODPUPILSIZE2); ?
>
853 <td style
="text-align:center;border-left:1pt solid black;border-right:1pt solid black;border-bottom:1pt solid black;">
854 <?php
echo text($ODPUPILREACTIVITY); ?
>
856 <td style
="text-align:center;border-bottom:1pt solid black;">
857 <?php
echo text($ODAPD); ?
>
861 <td
><b
><?php
echo xlt('OS'); ?
></b
>
863 <td style
="border-right:1pt solid black;border-top:1pt solid black;text-align:center;">
864 <?php
echo text($OSPUPILSIZE1); ?
>
866 <?php
echo text($OSPUPILSIZE2); ?
>
868 <td style
="text-align:center;border-left:1pt solid black;border-right:1pt solid black;border-top:1pt solid black;">
869 <?php
echo text($OSPUPILREACTIVITY); ?
>
871 <td style
="text-align:center;border-top:1pt solid black;">
872 <?php
echo text($OSAPD); ?
>
887 if ($DIMODPUPILSIZE1||
$DIMOSPUPILSIZE1||
$PUPIL_COMMENTS||
$AMSLEROD||
$AMSLEROS) { ?
>
888 <!-- start of slide down pupils_panel
-->
890 <table
class='borderShadow' style
="margin:1px;text-align:center;font-size:9px;">
893 <b
class="underline"><?php
echo xlt('Pupils') ?
>: <?php
echo xlt('Dim'); ?
></b
>
894 <table style
="report_vitals" style
="font-size: 8px;text-align:middle;">
897 <th style
="padding: 2px;text-align:center;" ><?php
echo xlt('size'); ?
> (<?php
echo xlt('mm{{millimeters}}'); ?
>)
901 <td
><b
><?php
echo xlt('OD'); ?
></b
>
903 <td style
="text-align:bottom;border-bottom:1pt solid black;padding-left:0.1in;">
904 <?php
echo text($DIMODPUPILSIZE1); ?
>
906 <?php
echo text($DIMODPUPILSIZE2); ?
>
911 <td
><b
><?php
echo xlt('OS'); ?
></b
>
913 <td style
="border-top:1pt solid black;padding-left:0.1in;">
914 <?php
echo text($DIMOSPUPILSIZE1); ?
>
916 <?php
echo text($DIMOSPUPILSIZE2); ?
>
919 <tr
><td colspan
="2" style
="padding-left:2px;text-align:bottom;">
921 <?php
echo text($PUPIL_COMMENTS); ?
>
926 <!-- end of slide down pupils_panel
-->
927 <!-- START OF THE AMSLER BOX
-->
928 <?php
if ($AMSLEROD||
$AMSLEROS) { ?
>
929 <td
class="report_vitals" style
="border-right:0px;border-left:1pt solid black;">
930 <b
class="underline"><?php
echo xlt('Amsler'); ?
></b
>
940 <table style
="font-size:1.0em;">
941 <tr style
="font-weight:bold;">
942 <td style
="text-align:center;text-decoration:underline;"><?php
echo xlt('OD'); ?
></td
>
944 <td style
="text-align:center;text-decoration:underline;"><?php
echo xlt('OS'); ?
></td
>
948 <td style
="text-align:center;">
949 <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;" />
951 <small
><?php
echo text($AMSLEROD); ?
>/5</small
>
954 <td style
="text-align:center;">
955 <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;" />
956 <br
/><small
><?php
echo text($AMSLEROS); ?
>/5</small
>
969 if ($ODVA||
$OSVA||
$ARODSPH||
$AROSSPH||
$MRODSPH||
$MROSSPH||
$CRODSPH||
$CROSSPH||
$CTLODSPH||
$CTLOSSPH) { ?
>
970 <!-- start of the refraction boxes
-->
972 <table
class="refraction_tables">
974 <td colspan
="9" style
="text-align:left;text-decoration:underline;font-weight:bold;"><?php
echo xlt('Refractive States'); ?
>
977 <tr style
="text-align:center;padding:5px;text-decoration:underline;">
978 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Type').$count_rx; ?
></td
>
979 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Eye'); ?
></td
>
980 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Sph{{Sphere}}'); ?
></td
>
981 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Cyl{{Cylinder}}'); ?
></td
>
982 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Axis{{Axis of a glasses prescription}}'); ?
></td
>
983 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Prism'); ?
></td
>
984 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Acuity'); ?
></td
>
985 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Mid{{Middle Distance Add}}'); ?
></td
>
986 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('ADD{{Near Add}}'); ?
></td
>
987 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('Acuity'); ?
></td
>
991 for ($i=1; $i <= $count_rx; $i++
) {
992 if ($
{"RX_TYPE_$i"} =="0") {
994 } else if ($
{"RX_TYPE_$i"} =="1") {
995 $RX_TYPE = xlt('Bifocals');
996 } else if ($
{"RX_TYPE_$i"} =="2") {
997 $RX_TYPE = xlt('Trifocals');
998 } else if ($
{"RX_TYPE_$i"} =="3") {
999 $RX_TYPE = xlt('Progressive');
1003 Note html2pdf does not like the last field of a table to be blank.
1004 If it is it will squish the lines together.
1005 Work around: if the field is blank, then replace it with a "-" else echo it.
1006 aka echo (text($field))?:"-");
1010 <td style
="font-weight:600;font-size:0.7em;text-align:right;"><?php
echo xlt('Current RX')." #".$i.": "; ?
></td
>
1011 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('OD{{right eye}}'); ?
></td
>
1012 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"ODSPH_$i"})?
:"-"); ?
></td
>
1013 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"ODCYL_$i"})?
:"-"); ?
></td
>
1014 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"ODAXIS_$i"})?
:"-"); ?
></td
>
1015 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"ODPRISM_$i"})?
:"-"); ?
></td
>
1016 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"ODVA_$i"})?
:"-"); ?
></td
>
1017 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"ODMIDADD_$i"})?
:"-"); ?
></td
>
1018 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"ODADD_$i"})?
:"-"); ?
></td
>
1019 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"ODNEARVA_$i"})?
:"-"); ?
></td
>
1022 <td style
="font-weight:600;font-size:0.7em;text-align:right;"><?php
echo $RX_TYPE; ?
></td
>
1023 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('OS{{left eye}}'); ?
></td
>
1024 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"OSSPH_$i"})?
:"-"); ?
></td
>
1025 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"OSCYL_$i"})?
:"-"); ?
></td
>
1026 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"OSAXIS_$i"})?
:"-"); ?
></td
>
1027 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"OSPRISM_$i"})?
:"-"); ?
></td
>
1028 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"OSVA_$i"})?
:"-"); ?
></td
>
1029 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"OSMIDADD_$i"})?
:"-"); ?
></td
>
1030 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"OSADD_$i"})?
:"-"); ?
></td
>
1031 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($
{"OSNEARVA_$i"})?
:"-"); ?
></td
>
1034 if ($
{"COMMENTS_$i"}) {
1038 <td colspan
="2"><?php
echo xlt('Comments'); ?
>:</td
>
1039 <td colspan
="7"><?php
echo text($
{"COMMENTS_$i"}); ?
></td
>
1045 if ($ARODSPH||
$AROSSPH) { ?
>
1046 <tr style
="border-bottom:1pt solid black;">
1047 <td style
="font-weight:600;font-size:0.7em;text-align:right;"><?php
echo xlt('Auto Refraction'); ?
></td
>
1048 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('OD{{right eye}}'); ?
></td
>
1049 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($ARODSPH)?
:"-"); ?
></td
>
1050 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($ARODCYL)?
:"-"); ?
></td
>
1051 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($ARODAXIS)?
:"-"); ?
></td
>
1052 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($ARODPRISM)?
:"-"); ?
></td
>
1053 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($ARODVA)?
:"-"); ?
></td
>
1054 <td style
="font-weight:400;font-size:1.0em;text-align:center;">-</td
>
1055 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($ARODADD)?
:"-"); ?
></td
>
1056 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($ARNEARODVA)?
:"-"); ?
></td
>
1060 <td style
="font-weight:400;font-size:1.0em;text-align:right;"><?php
echo xlt('OS{{left eye}}'); ?
></td
>
1061 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($AROSSPH)?
:"-"); ?
></td
>
1062 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($AROSCYL)?
:"-"); ?
></td
>
1063 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($AROSAXIS)?
:"-"); ?
></td
>
1064 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($AROSPRISM)?
:"-"); ?
></td
>
1065 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($AROSVA)?
:"-"); ?
></td
>
1066 <td style
="font-weight:400;font-size:1.0em;text-align:center;">-</td
>
1067 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($AROSADD)?
:"-"); ?
></td
>
1068 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($ARNEAROSVA)?
:"-"); ?
></td
>
1071 if ($
{"COMMENTS_$i"}) {
1076 <td colspan
="7"><?php
echo text($
{"COMMENTS_$i"}); ?
></td
>
1082 if ($MRODSPH||
$MROSSPH) { ?
>
1084 <td style
="font-weight:600;font-size:0.7em;text-align:right;"><?php
echo xlt('Manifest (Dry) Refraction'); ?
></td
>
1085 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('OD{{right eye}}'); ?
></td
>
1086 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MRODSPH)?
:"-"); ?
></td
>
1087 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MRODCYL)?
:"-"); ?
></td
>
1088 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MRODAXIS)?
:"-"); ?
></td
>
1089 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MRODPRISM)?
:"-"); ?
></td
>
1090 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MRODVA)?
:"-"); ?
></td
>
1091 <td style
="font-weight:400;font-size:1.0em;text-align:center;">-</td
>
1092 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MRODADD)?
:"-"); ?
></td
>
1093 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MRNEARODVA)?
:"-"); ?
></td
>
1098 <td style
="font-weight:400;font-size:1.0em;text-align:right;"><?php
echo xlt('OS{{left eye}}'); ?
></td
>
1099 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MROSSPH)?
:"-"); ?
></td
>
1100 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MROSCYL)?
:"-"); ?
></td
>
1101 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MROSAXIS)?
:"-"); ?
></td
>
1102 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MROSPRISM)?
:"-"); ?
></td
>
1103 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MROSVA)?
:"-"); ?
></td
>
1104 <td style
="font-weight:400;font-size:1.0em;text-align:center;">-</td
>
1105 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MROSADD)?
:"-"); ?
></td
>
1106 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($MRNEAROSVA)?
:"-"); ?
></td
>
1111 if ($CRODSPH||
$CROSSPH) { ?
>
1113 <td style
="font-weight:600;font-size:0.8em;text-align:right;"><?php
echo xlt('Cycloplegic (Wet) Refraction'); ?
></td
>
1114 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('OD{{right eye}}'); ?
></td
>
1115 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CRODSPH)?
:"-"); ?
></td
>
1116 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CRODCYL)?
:"-"); ?
></td
>
1117 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CRODAXIS)?
:"-"); ?
></td
>
1118 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CRODPRISM)?
:"-"); ?
></td
>
1119 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CRODVA)?
:"-"); ?
></td
>
1120 <td style
="font-weight:400;font-size:1.0em;text-align:center;">-</td
>
1121 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CRODADD)?
:"-"); ?
></td
>
1122 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CRNEARODVA)?
:"-"); ?
></td
>
1126 <td style
="font-weight:400;font-size:1.0em;text-align:right;"><?php
echo xlt('OS{{left eye}}'); ?
></td
>
1127 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CROSSPH)?
:"-"); ?
></td
>
1128 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CROSCYL)?
:"-"); ?
></td
>
1129 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CROSAXIS)?
:"-"); ?
></td
>
1130 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CROSPRISM)?
:"-"); ?
> 
;</td
>
1131 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CROSVA)?
:"-"); ?
></td
>
1132 <td style
="font-weight:400;font-size:1.0em;text-align:center;">-</td
>
1133 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CROSADD)?
:"-"); ?
></td
>
1134 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CRNEAROSVA)?
:"-"); ?
></td
>
1139 if ($CTLODSPH||
$CTLOSSPH) { ?
>
1140 <tr style
="text-align:center;padding:5px;text-decoration:underline;">
1142 <td
><?php
echo xlt('Eye'); ?
></td
>
1143 <td
><?php
echo xlt('Sph{{Sphere}}'); ?
></td
>
1144 <td
><?php
echo xlt('Cyl{{Cylinder}}'); ?
></td
>
1145 <td
><?php
echo xlt('Axis{{Axis of a glasses prescription}}'); ?
></td
>
1146 <td
><?php
echo xlt('BC{{Base Curve}}'); ?
></td
>
1147 <td
><?php
echo xlt('Diam{{Diameter}}'); ?
></td
>
1148 <td
><?php
echo xlt('ADD'); ?
></td
>
1149 <td
><?php
echo xlt('Acuity'); ?
></td
>
1152 <td style
="font-weight:600;font-size:0.8em;text-align:right;"><?php
echo xlt('Contact Lens'); ?
></td
>
1153 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('OD{{right eye}}'); ?
></td
>
1154 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLODSPH)?
:"-"); ?
></td
>
1155 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLODCYL)?
:"-"); ?
></td
>
1156 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLODAXIS)?
:"-"); ?
></td
>
1157 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLODBC)?
:"-"); ?
></td
>
1158 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLODDIAM)?
:"-"); ?
></td
>
1159 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLODADD)?
:"-"); ?
></td
>
1160 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLODVA)?
:"-"); ?
></td
>
1162 <tr style
="font-size:0.6em;">
1165 <td colspan
="3" style
="font-weight:400;font-size:1.0em;text-align:left;"><?php
echo xlt('Brand'); ?
>:<?php
echo (text($CTLBRANDOD)?
:"-"); ?
></td
>
1166 <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
>
1167 <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
>
1172 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo xlt('OS{{left eye}}'); ?
></td
>
1173 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLOSSPH)?
:"-"); ?
></td
>
1174 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLOSCYL)?
:"-"); ?
></td
>
1175 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLOSAXIS)?
:"-"); ?
></td
>
1176 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLOSBC)?
:"-"); ?
></td
>
1177 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLOSDIAM)?
:"-"); ?
></td
>
1178 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo (text($CTLOSADD)?
:"-"); ?
></td
>
1179 <td style
="font-weight:400;font-size:1.0em;text-align:center;"><?php
echo ($CTLOSVA?
:"-"); ?
></td
>
1181 <tr style
="font-size:0.6em;">
1184 <td colspan
="3" style
="font-weight:400;font-size:1.0em;text-align:left;"><?php
echo xlt('Brand'); ?
>: <?php
echo (text($CTLBRANDOS)?
:"-"); ?
></td
>
1185 <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
>
1186 <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
>
1198 if ($GLAREODVA||
$CONTRASTODVA||
$ODK1||
$ODK2||
$LIODVA||
$PAMODBA) { ?
>
1201 <td id
="LayerVision_ADDITIONAL" class="refraction <?php echo $display_Add; ?>" style
="padding:10px;font-size:0.9em;">
1202 <table id
="Additional" style
="padding:5;font-size:1.0em;">
1203 <tr
><td colspan
="9" style
="text-align:left;text-decoration:underline;font-weight:bold;"><?php
echo xlt('Additional Data Points'); ?
></td
></tr
>
1205 <td
><?php
echo xlt('PH{{Pinhole}}'); ?
></td
>
1206 <td
><?php
echo xlt('PAM{{Potential Acuity Meter}}'); ?
></td
>
1207 <td
><?php
echo xlt('LI{{Laser Interferometry}}'); ?
></td
>
1208 <td
><?php
echo xlt('BAT{{Brightness Acuity Testing}}'); ?
></td
>
1209 <td
><?php
echo xlt('K1{{Keratometry 1}}'); ?
></td
>
1210 <td
><?php
echo xlt('K2{{Keratometry 2}}'); ?
></td
>
1211 <td
><?php
echo xlt('Axis{{Axis of a glasses prescription}}'); ?
></td
>
1213 <tr
><td
><b
><?php
echo xlt('OD{{right eye}}'); ?
>:</b
></td
>
1214 <td
><?php
echo text($PHODVA); ?
></td
>
1215 <td
><?php
echo text($PAMODVA); ?
></td
>
1216 <td
><?php
echo text($LIODVA); ?
></td
>
1217 <td
><?php
echo text($GLAREODVA); ?
></td
>
1218 <td
><?php
echo text($ODK1); ?
></td
>
1219 <td
><?php
echo text($ODK2); ?
></td
>
1220 <td
><?php
echo text($ODK2AXIS); ?
></td
>
1223 <td
><b
><?php
echo xlt('OS{{left eye}}'); ?
>:</b
></td
>
1224 <td
><?php
echo text($PHOSVA); ?
></td
>
1225 <td
><?php
echo text($PAMOSVA); ?
></td
>
1226 <td
><?php
echo text($LIOSVA); ?
></td
>
1227 <td
><?php
echo text($GLAREOSVA); ?
></td
>
1228 <td
><?php
echo text($OSK1); ?
></td
>
1229 <td
><?php
echo text($OSK2); ?
></td
>
1230 <td
><?php
echo text($OSK2AXIS); ?
></td
>
1232 <tr
><td
> 
;</td
></tr
>
1235 <td
><?php
echo xlt('AxLength{{axial Length}}'); ?
></td
>
1236 <td
><?php
echo xlt('ACD{{anterior chamber depth}}'); ?
></td
>
1237 <td
><?php
echo xlt('PD{{pupillary distance}}'); ?
></td
>
1238 <td
><?php
echo xlt('LT{{lens thickness}}'); ?
></td
>
1239 <td
><?php
echo xlt('W2W{{white-to-white}}'); ?
></td
>
1240 <td
><?php
echo xlt('ECL{{equivalent contact lens power at the corneal level}}'); ?
></td
>
1241 <!-- <td
><?php
echo xlt('pend'); ?
></td
> -->
1243 <tr
><td
><b
><?php
echo xlt('OD{{right eye}}'); ?
>:</b
></td
>
1244 <td
><?php
echo text($ODAXIALLENGTH); ?
></td
>
1245 <td
><?php
echo text($ODACD); ?
></td
>
1246 <td
><?php
echo text($ODPDMeasured); ?
></td
>
1247 <td
><?php
echo text($ODLT); ?
></td
>
1248 <td
><?php
echo text($ODW2W); ?
></td
>
1249 <td
><?php
echo text($ODECL); ?
></td
>
1250 <!-- <td
><input type
=text id
="pend" name
="pend" value
="<?php echo text($pend); ?>"></td
> -->
1253 <td
><b
><?php
echo xlt('OS{{left eye}}'); ?
>:</b
></td
>
1254 <td
><?php
echo text($OSAXIALLENGTH); ?
></td
>
1255 <td
><?php
echo text($OSACD); ?
></td
>
1256 <td
><?php
echo text($OSPDMeasured); ?
></td
>
1257 <td
><?php
echo text($OSLT); ?
></td
>
1258 <td
><?php
echo text($OSW2W); ?
></td
>
1259 <td
><?php
echo text($OSECL); ?
></td
>
1260 <!-- <td
><input type
=text id
="pend" name
="pend" value
="<?php echo text($pend); ?>"></td
> -->
1271 <!-- end of the refraction boxes
-->
1273 <!-- start of external exam
-->
1274 <div
class="report_exam_group">
1277 <td style
="text-align:left;vertical-align:top;">
1278 <b
class="underline"><?php
echo xlt('External Exam'); ?
>:</b
>
1279 <table
class="report_section">
1281 <td
class="bold" style
="text-align:right;padding-right:10px;text-decoration:underline;max-width:150px;"><?php
echo xlt('Right'); ?
></td
>
1282 <td style
="width:100px;"></td
>
1283 <td
class="bold" style
="text-align:left;padding-left:10px;text-decoration:underline;max-width:150px;"><?php
echo xlt('Left'); ?
></td
>
1286 <td
class="report_text right"><?php
echo text($RBROW); ?
></td
>
1287 <td
class="middle"><?php
echo xlt('Brow'); ?
></td
>
1288 <td
class="report_text left"><?php
echo text($LBROW); ?
></td
>
1291 <td
class="report_text right ">
1292 <?php
echo text($RUL); ?
>
1294 <td
class="middle"><?php
echo xlt('Upper Lids'); ?
></td
>
1295 <td
class="report_text left"><?php
echo text($LUL); ?
></td
>
1298 <td
class="report_text right "><?php
echo text($RLL); ?
></td
>
1299 <td
class="middle"><?php
echo xlt('Lower Lids'); ?
></td
>
1300 <td
class="report_text left"><?php
echo text($LLL); ?
></td
>
1303 <td
class="report_text right "><?php
echo text($RMCT); ?
></td
>
1304 <td
class="middle"><?php
echo xlt('Medial Canthi'); ?
></td
>
1305 <td
class="report_text left"><?php
echo text($LMCT); ?
></td
>
1308 if ($RADNEXA ||
$LADNEXA) {
1311 <td
class="report_text right"><?php
echo text($RADNEXA); ?
></td
>
1312 <td
class="middle"><?php
echo xlt('Adnexa'); ?
></td
>
1313 <td
class="report_text left"><?php
echo text($LADNEXA); ?
></td
>
1318 if ($EXT_COMMENTS) { ?
>
1322 <b
><?php
echo xlt('Comments'); ?
>:</b
>
1323 <span style
="height:3.0em;">
1324 <?php
echo text($EXT_COMMENTS); ?
>
1332 <td style
="text-align:center;padding:1px;vertical-align:middle;">
1334 display_draw_image("EXT", $encounter, $pid);
1340 <!-- end of external exam
-->
1341 <div
class="report_exam_group">
1343 if ($OSCONJ||
$ODCONJ||
$ODCORNEA||
$OSCORNEA||
$ODAC||
$OSAC||
$ODLENS||
$OSLENS||
$ODIRIS||
$OSIRIS) {
1345 <!-- start of Anterior Segment exam
-->
1348 <td style
="text-align:left;padding:1px;vertical-align:top;">
1349 <b
class="underline"><?php
echo xlt('Anterior Segment'); ?
>:</b
>
1350 <table
class="report_section">
1352 <td
class="bold" style
="text-align:right;padding-right:10px;text-decoration:underline;max-width:200px;"><?php
echo xlt('Right'); ?
></td
>
1353 <td style
="width:100px;"></td
>
1354 <td
class="bold" style
="text-align:left;padding-left:10px;text-decoration:underline;max-width:200px;"><?php
echo xlt('Left'); ?
></td
>
1357 <td
class="report_text right"><?php
echo text($ODCONJ); ?
></td
>
1358 <td
class="middle"><?php
echo xlt('Conj{{Conjunctiva}}'); ?
></td
>
1359 <td
class="report_text left"><?php
echo text($OSCONJ); ?
></td
>
1362 <td
class="report_text right "><?php
echo text($ODCORNEA); ?
></td
>
1363 <td
class="middle"><?php
echo xlt('Cornea'); ?
></td
>
1364 <td
class="report_text left"><?php
echo text($OSCORNEA); ?
></td
>
1367 <td
class="report_text right "><?php
echo text($ODAC); ?
></td
>
1368 <td
class="middle"><?php
echo xlt('A/C{{anterior chamber}}'); ?
></td
>
1369 <td
class="report_text left"><?php
echo text($OSAC); ?
></td
>
1372 <td
class="report_text right "><?php
echo text($ODLENS); ?
></td
>
1373 <td
class="middle"><?php
echo xlt('Lens'); ?
></td
>
1374 <td
class="report_text left"><?php
echo text($OSLENS); ?
></td
>
1377 <td
class="report_text right"><?php
echo text($ODIRIS); ?
></td
>
1378 <td
class="middle"><?php
echo xlt('Iris'); ?
></td
>
1379 <td
class="report_text left"><?php
echo text($OSIRIS); ?
></td
>
1381 <?php
if ($ODGONIO||
$OSDGONIO) { ?
>
1383 <td
class="report_text right" style
="width:100px;"><?php
echo text($ODGONIO); ?
></td
>
1384 <td
class="middle"><?php
echo xlt('Gonioscopy'); ?
></td
>
1385 <td
class="report_text left" style
="width:100px;"><?php
echo text($OSGONIO); ?
></td
>
1387 <?php
} if ($ODKTHICKNESS||
$OSKTHICKNESS) { ?
>
1389 <td
class="report_text right"><?php
echo text($ODKTHICKNESS); ?
></td
>
1390 <td
class="middle" title
="<?php echo xla('Pachymetry'); ?>"><?php
echo xlt('Pachymetry'); ?
></td
>
1391 <td
class="report_text left"><?php
echo text($OSKTHICKNESS); ?
></td
>
1393 <?php
} if ($ODSCHIRMER1||
$OSSCHIRMER1) { ?
>
1395 <td
class="report_text right"><?php
echo text($ODSCHIRMER1); ?
></td
>
1396 <td
class="middle" title
="<?php echo xla('Schirmers I (w/o anesthesia)'); ?>"><?php
echo xlt('Schirmers I'); ?
></td
>
1397 <td
class="report_text left"><?php
echo text($OSSCHIRMER1); ?
></td
>
1399 <?php
} if ($ODSCHIRMER2||
$OSSCHIRMER2) { ?
>
1401 <td
class="report_text right"><?php
echo text($ODSCHIRMER2); ?
></td
>
1402 <td
class="middle" title
="<?php echo xla('Schirmers II (w/ anesthesia)'); ?>"><?php
echo xlt('Schirmers II'); ?
></td
>
1403 <td
class="report_text left"><?php
echo text($OSSCHIRMER2); ?
></td
>
1405 <?php
} if ($ODTBUT||
$OSTBUT) { ?
>
1407 <td
class="report_text right"><?php
echo text($ODTBUT); ?
></td
>
1408 <td
class="middle" title
="<?php echo xla('Tear Break Up Time'); ?>"><?php
echo xlt('TBUT'); ?
></td
>
1409 <td
class="report_text left"><?php
echo text($OSTBUT); ?
></td
>
1413 if ($ANTSEG_COMMENTS) { ?
>
1416 <b
><?php
echo xlt('Comments'); ?
>:</b
>
1417 <span style
="height:3.0em;">
1418 <?php
echo text($ANTSEG_COMMENTS); ?
>
1425 <td style
="text-align:center;padding:1px;vertical-align:middle;">
1427 display_draw_image("ANTSEG", $encounter, $pid);
1432 <!-- end of Anterior Segment exam
-->
1438 <div
class="report_exam_group">
1440 <!-- start of Other exam
-->
1442 if ($RLF ||
$LLF ||
$RMRD ||
$LMRD ||
$RVFISSURE ||
$LVFISSURE ||
1443 $RCAROTID ||
$LCAROTID ||
$RTEMPART ||
$LTEMPART ||
$RCNV ||
$LCNV ||
1444 $RCNVII ||
$LCNVII ||
$HERTELBASE ||
$ODCOLOR ||
$OSCOLOR ||
$ODREDDESAT ||
1445 $OSREDDESAT ||
$ODCOINS ||
$OSCOINS ||
$ODNPA ||
$OSNPA ||
$NPA ||
$NPC ||
$STEREOPSIS ||
1446 $DACCDIST ||
$DACCNEAR ||
$CACCDIST ||
$CACCNEAR ||
$VERTFUSAMPS) {
1450 <td style
="text-align:left;vertical-align:top;padding:1px;">
1451 <b
><u
><?php
echo xlt('Additional Findings'); ?
>:</u
></b
>
1452 <?php
if ($ACT =='on' and $MOTILITYNORMAL == 'on') { ?
>
1453 <span id
="ACTNORMAL_CHECK" name
="ACTNORMAL_CHECK">
1454 <?php
echo xlt('Orthophoric'); ?
>
1457 <table
class="report_section">
1459 <td
class="bold" style
="text-align:right;padding-right:10px;text-decoration:underline;max-width:200px;"><?php
echo xlt('Right'); ?
></td
>
1460 <td style
="width:100px;"></td
>
1461 <td
class="bold" style
="text-align:left;padding-left:10px;text-decoration:underline;max-width:200px;"><?php
echo xlt('Left'); ?
></td
>
1464 if ($RLF ||
$LLF) { ?
>
1466 <td
class="report_text right" style
=""><?php
echo text($RLF); ?
></td
>
1467 <td
class="middle" style
="width:100px;"><?php
echo xlt('Levator Function'); ?
></td
>
1468 <td
class="report_text left" style
=""><?php
echo text($LLF); ?
></td
>
1473 if ($RMRD ||
$LMRD) { ?
>
1475 <td
class="report_text right"><?php
echo text($RMRD); ?
></td
>
1476 <td
class="middle" title
="<?php echo xla('Marginal Reflex Distance'); ?>"><?php
echo xlt('MRD{{marginal reflex distance}}'); ?
></td
>
1477 <td
class="report_text left"><?php
echo text($LMRD); ?
></td
>
1482 if ($RVFISSURE ||
$LVFISSURE) { ?
>
1484 <td
class="report_text right"><?php
echo text($RVFISSURE); ?
></td
>
1485 <td
class="middle" title
="<?php echo xla('Vertical Fissure: central height between lid margins'); ?>"><?php
echo xlt('Vert Fissure{{vertical fissure}}'); ?
></td
>
1486 <td
class="report_text left"><?php
echo text($LVFISSURE); ?
></td
>
1491 if ($RCAROTID ||
$LCAROTID) { ?
>
1493 <td
class="report_text right"><?php
echo text($RCAROTID); ?
></td
>
1494 <td
class="middle" title
="<?php echo xla('Any carotid bruits appreciated?'); ?>"><?php
echo xlt('Carotid{{carotid arteries}}'); ?
></td
>
1495 <td
class="report_text left"><?php
echo text($LCAROTID); ?
></td
>
1500 if ($RTEMPART ||
$LTEMPART) { ?
>
1502 <td
class="report_text right"><?php
echo text($RTEMPART); ?
></td
>
1503 <td
class="middle" title
="<?php echo xla('Temporal Arteries'); ?>"><?php
echo xlt('Temp. Art.{{temporal arteries}}'); ?
></td
>
1504 <td
class="report_text left"><?php
echo text($LTEMPART); ?
></td
>
1509 if ($RCNV ||
$LCNV) { ?
>
1511 <td
class="report_text right"><?php
echo text($RCNV); ?
></td
>
1512 <td
class="middle" title
="<?php echo xla('Cranial Nerve 5: Trigeminal Nerve'); ?>"><?php
echo xlt('CN V{{cranial nerve five}}'); ?
></td
>
1513 <td
class="report_text left"><?php
echo text($LCNV); ?
></td
>
1518 if ($RCNVII ||
$LCNVII) { ?
>
1520 <td
class="report_text right"><?php
echo text($RCNVII); ?
></td
>
1521 <td
class="middle" title
="<?php echo xla('Cranial Nerve 7: Facial Nerve'); ?>"><?php
echo xlt('CN VII{{cranial nerve seven}}'); ?
></td
>
1522 <td
class="report_text left"><?php
echo text($LCNVII); ?
></td
>
1527 if ($HERTELBASE) { ?
>
1529 <td colspan
="3" style
="text-align:center;padding-top:15px;">
1530 <b style
="font-weight:bold;padding-bottom:5px;">
1531 <?php
echo xlt('Hertel Exophthalmometry'); ?
>
1535 if ($HERTELBASE) { ?
>
1537 <b style
="border:1pt solid black;width:30px;text-align:center;padding:0 5;">
1538 <?php
echo text($ODHERTEL); ?
>
1540 <b
class="fa fa-minus">--</b
>
1541 <b style
="border:1pt solid black;width:40px;text-align:center;padding:0 5;">
1542 <?php
echo text($HERTELBASE); ?
>
1544 <b
class="fa fa-minus">--</b
>
1545 <b style
="border:1pt solid black;width:30px;text-align:center;padding:0 5;">
1546 <?php
echo text($OSHERTEL); ?
>
1555 if ($ODCOLOR ||
$OSCOLOR ||
$ODREDDESAT ||
1556 $OSREDDESAT ||
$ODCOINS ||
$OSCOINS ||
1557 $ODNPA ||
$OSNPA ||
$NPA ||
$NPC ||
$STEREOPSIS) { ?
>
1558 <!-- start of NEURO exam
-->
1560 if ($ODCOLOR or $OSCOLOR) { ?
>
1562 <td
class="report_text right"><?php
echo text($ODCOLOR); ?
></td
>
1563 <td
class="middle"><?php
echo xlt('Color Vision'); ?
></td
>
1564 <td
class="report_text left"><?php
echo text($OSCOLOR); ?
></td
>
1569 if ($ODREDDESAT or $OSREDDESAT) { ?
>
1571 <td
class="report_text right"><?php
echo text($ODREDDESAT); ?
></td
>
1572 <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
>
1573 <td
class="report_text left"><?php
echo text($OSREDDESAT); ?
></td
>
1578 if ($ODCOINS or $OSCOINS) { ?
>
1580 <td
class="report_text right"><?php
echo text($ODCOINS); ?
></td
>
1581 <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
>
1582 <td
class="report_text left"><?php
echo text($OSCOINS); ?
></td
>
1587 if ($ODNPA or $OSNPA) { ?
>
1589 <td
class="report_text right"><?php
echo text($ODNPA); ?
></td
>
1590 <td
class="middle"><span title
="<?php echo xla('Near Point of Accomodation'); ?>"><?php
echo xlt('NPA{{near point of accomodation}}'); ?
></span
></td
>
1591 <td
class="report_text left"><?php
echo text($OSNPA); ?
></td
>
1596 if ($ODNPC or $OSNPC) { ?
>
1598 <td
class="right" style
="font-weight:600;"><?php
echo xlt('NPC{{near point of convergence}}'); ?
>: 
;</td
>
1599 <td
class="center" colspan
="2" ><?php
echo text($NPC); ?
></td
>
1604 if ($DACCDIST or $DACCNEAR or $CACCDIST or $CACCNEAR or $VERTFUSAMPS) { ?
>
1605 <tr style
="text-decoration:underline;">
1607 <td
class="middle"><?php
echo xlt('Distance'); ?
> </td
>
1608 <td
class="middle"> <?php
echo xlt('Near'); ?
></td
>
1613 if ($DACCDIST or $DACCNEAR) { ?
>
1615 <td
class="right" style
="font-weight:600;"><?php
echo xlt('Divergence Amps'); ?
>: </td
>
1616 <td
class="center"><?php
echo text($DACCDIST); ?
></td
>
1617 <td
class="center"><?php
echo text($DACCNEAR); ?
></td
>
1622 if ($CACCDIST or $CACCNEAR) { ?
>
1624 <td
class="right" style
="font-weight:600;"><?php
echo xlt('Convergence Amps'); ?
>: </td
>
1625 <td
class="center"><?php
echo text($CACCDIST); ?
></td
>
1626 <td
class="center"><?php
echo text($CACCNEAR); ?
></td
>
1631 if ($VERTFUSAMPS) { ?
>
1633 <td
class="right" style
="font-weight:600;">
1634 <?php
echo xlt('Vert Fusional Amps'); ?
>:
1636 <td colspan
="2" class="center">
1637 <?php
echo text($VERTFUSAMPS); ?
>
1644 if ($STEREOPSIS) { ?
>
1646 <td
class="right" style
="font-weight:600;"><?php
echo xlt('Stereopsis'); ?
>: 
;</td
>
1647 <td
class="center" colspan
="2"><?php
echo text($STEREOPSIS); ?
></td
>
1654 <td style
="text-align:center;padding:1px;vertical-align:middle;">
1656 display_draw_image("NEURO", $encounter, $pid);
1663 <!-- end of Other exam
-->
1665 <div
class="report_exam_group">
1667 <!-- start of the Retina exam
-->
1669 if ($ODDISC||
$OSDISC||
$ODCUP||
$ODMACULA||
$ODVESSELS||
$ODPERIPH) {
1673 <td style
="text-align:left;padding:1px;vertical-align:top;">
1674 <b
><u
><?php
echo xlt('Retina'); ?
>:</u
></b
>
1675 <table
class="report_section">
1677 <td
class="bold" style
="text-align:right;text-decoration:underline;max-width:150px;"><?php
echo xlt('Right'); ?
></td
>
1678 <td style
="width:100px;"></td
>
1679 <td
class="bold" style
="text-align:left;text-decoration:underline;max-width:150px;"><?php
echo xlt('Left'); ?
></td
>
1682 <td
class="report_text right"><?php
echo text($ODDISC); ?
></td
>
1683 <td
class="middle"><?php
echo xlt('Disc'); ?
></td
>
1684 <td
class="report_text left"><?php
echo text($OSDISC); ?
></td
>
1687 <td
class="report_text right"><?php
echo text($ODCUP); ?
></td
>
1688 <td
class="middle"><?php
echo xlt('Cup'); ?
></td
>
1689 <td
class="report_text left"><?php
echo text($OSCUP); ?
></td
>
1692 <td
class="report_text right"><?php
echo text($ODMACULA); ?
></td
>
1693 <td
class="middle"><?php
echo xlt('Macula'); ?
></td
>
1694 <td
class="report_text left"><?php
echo text($OSMACULA); ?
></td
>
1697 <td
class="report_text right"><?php
echo text($ODVESSELS); ?
></td
>
1698 <td
class="middle"><?php
echo xlt('Vessels'); ?
></td
>
1699 <td
class="report_text left"><?php
echo text($OSVESSELS); ?
></td
>
1701 <?php
if ($ODPERIPH||
$OSPERIPH) { ?
>
1703 <td
class="report_text right"><?php
echo text($ODPERIPH); ?
></td
>
1704 <td
class="middle"><?php
echo xlt('Periph{{periphery}}'); ?
></td
>
1705 <td
class="report_text left"><?php
echo text($OSPERIPH); ?
></td
>
1707 <?php
} if ($ODCMT||
$OSCMT) { ?
>
1709 <td
class="report_text right"> 
;<?php
echo text($ODCMT); ?
></td
>
1710 <td
class="middle"><?php
echo xlt('Central Macular Thickness'); ?
> </td
>
1711 <td
class="report_text left" > 
;<?php
echo text($OSCMT); ?
></td
>
1714 <?php
if ($RETINA_COMMENTS) { ?
>
1716 <td colspan
="2" class="report_text left">
1718 <b
><?php
echo xlt('Comments'); ?
>:</b
>
1719 <span style
="height:3.0em;">
1720 <?php
echo text($RETINA_COMMENTS); ?
>
1728 <td style
="text-align:center;padding:1px;vertical-align:middle;">
1730 display_draw_image("RETINA", $encounter, $pid);
1738 <!-- end of Retina exam
-->
1741 if ($ACT !='on') { ?
>
1742 <table style
="text-align:center;font-size:0.7em;">
1744 <td colspan
=3 style
="">
1746 <tr style
="text-align:left;height:16px;vertical-align:middle;width:880px;">
1748 <span id
="ACTTRIGGER" name
="ACTTRIGGER" style
="text-decoration:underline;padding-left:2px;">
1749 <?php
echo xlt('Alternate Cover Test'); ?
>:
1755 if ($ACT5SCDIST) { ?
>
1756 <td style
="text-align:center;"> <!-- scDIST
-->
1757 <table cellpadding
="0"
1758 style
="position:relative;text-align:center;font-size:1.2em;margin: 7 5 10 5;">
1760 <td id
="ACT_tab_SCDIST" name
="ACT_tab_SCDIST" class="ACT_deselected"> <?php
echo xlt('sc Distance{{without correction distance}}'); ?
> </td
>
1763 <td colspan
="4" style
="text-align:center;font-size:0.9em;">
1766 <td style
="text-align:center;"><?php
echo xlt('R{{right}}'); ?
></td
>
1767 <td
class="ACT"><?php
echo report_ACT($ACT1SCDIST); ?
></td
>
1768 <td
class="ACT"><?php
echo report_ACT($ACT2SCDIST); ?
></td
>
1769 <td
class="ACT"><?php
echo report_ACT($ACT3SCDIST); ?
></td
>
1770 <td style
="text-align:center;"><?php
echo xlt('L{{left}}'); ?
></td
>
1773 <td style
="text-align:right;"><i
class="fa fa-reply rotate-left"></i
></td
>
1774 <td
class="ACT"><?php
echo report_ACT($ACT4SCDIST); ?
></td
>
1775 <td
class="ACT"><?php
echo report_ACT($ACT5SCDIST); ?
></td
>
1776 <td
class="ACT"><?php
echo report_ACT($ACT6SCDIST); ?
></td
>
1777 <td
><i
class="fa fa-share rotate-right"></i
></td
>
1780 <td
class="ACT"><?php
echo report_ACT($ACT10SCDIST); ?
></td
>
1781 <td
class="ACT"><?php
echo report_ACT($ACT7SCDIST); ?
></td
>
1782 <td
class="ACT"><?php
echo report_ACT($ACT8SCDIST); ?
></td
>
1783 <td
class="ACT"><?php
echo report_ACT($ACT9SCDIST); ?
></td
>
1784 <td
class="ACT"><?php
echo report_ACT($ACT11SCDIST); ?
></td
>
1796 <td style
="text-align:center;"> <!-- ccDIST
-->
1797 <table cellpadding
="0" style
="position:relative;text-align:center;font-size:1.5em;margin: 7 5 10 5;border-collapse: separate;">
1799 <td
class="ACT_deselected"> <?php
echo xlt('cc Distance{{with correction at distance}}'); ?
> </td
>
1802 <td colspan
="4" style
="text-align:center;font-size:0.8em;">
1805 <td style
="text-align:center;"><?php
echo xlt('R{{right}}'); ?
></td
>
1806 <td
class="ACT"><?php
echo report_ACT($ACT1CCDIST); ?
></td
>
1807 <td
class="ACT"><?php
echo report_ACT($ACT2CCDIST); ?
></td
>
1808 <td
class="ACT"><?php
echo report_ACT($ACT3CCDIST); ?
></td
>
1809 <td style
="text-align:center;"><?php
echo xlt('L{{left}}'); ?
></td
>
1812 <td style
="text-align:right;"><i
class="fa fa-reply rotate-left"></i
></td
>
1813 <td
class="ACT"><?php
echo report_ACT($ACT4CCDIST); ?
></td
>
1814 <td
class="ACT"><?php
echo report_ACT($ACT5CCDIST); ?
></td
>
1815 <td
class="ACT"><?php
echo report_ACT($ACT6CCDIST); ?
></td
>
1816 <td
><i
class="fa fa-share rotate-right"></i
></td
>
1819 <td
class="ACT"><?php
echo report_ACT($ACT10CCDIST); ?
></td
>
1820 <td
class="ACT"><?php
echo report_ACT($ACT7CCDIST); ?
></td
>
1821 <td
class="ACT"><?php
echo report_ACT($ACT8CCDIST); ?
></td
>
1822 <td
class="ACT"><?php
echo report_ACT($ACT9CCDIST); ?
></td
>
1823 <td
class="ACT"><?php
echo report_ACT($ACT11CCDIST); ?
>
1839 <td style
="text-align:center;"> <!-- scNEAR
-->
1840 <table cellpadding
="0" style
="position:relative;text-align:center;font-size:1.5em;margin: 7 5 10 5;border-collapse: separate;">
1842 <td
class="ACT_deselected"> <?php
echo xlt('sc Near{{without correction near}}'); ?
> </td
>
1845 <td colspan
="4" style
="text-align:center;font-size:0.8em;">
1848 <td style
="text-align:center;"><?php
echo xlt('R{{right}}'); ?
></td
>
1849 <td
class="ACT"><?php
echo report_ACT($ACT1SCNEAR); ?
></td
>
1850 <td
class="ACT"><?php
echo report_ACT($ACT2SCNEAR); ?
></td
>
1851 <td
class="ACT"><?php
echo report_ACT($ACT3SCNEAR); ?
></td
>
1852 <td style
="text-align:center;"><?php
echo xlt('L{{left}}'); ?
></td
>
1855 <td style
="text-align:right;"><i
class="fa fa-reply rotate-left"></i
></td
>
1856 <td
class="ACT"><?php
echo report_ACT($ACT4SCNEAR); ?
></td
>
1857 <td
class="ACT"><?php
echo report_ACT($ACT5SCNEAR); ?
></td
>
1858 <td
class="ACT"><?php
echo report_ACT($ACT6SCNEAR); ?
></td
>
1859 <td
><i
class="fa fa-share rotate-right"></i
></td
>
1862 <td
class="ACT"><?php
echo report_ACT($ACT10SCNEAR); ?
></td
>
1863 <td
class="ACT"><?php
echo report_ACT($ACT7SCNEAR); ?
></td
>
1864 <td
class="ACT"><?php
echo report_ACT($ACT8SCNEAR); ?
></td
>
1865 <td
class="ACT"><?php
echo report_ACT($ACT9SCNEAR); ?
></td
>
1866 <td
class="ACT"><?php
echo report_ACT($ACT11SCNEAR); ?
>
1880 <td style
="text-align:center;"> <!-- ccNEAR
-->
1881 <table cellpadding
="0" style
="position:relative;text-align:center;font-size:1.5em;margin: 7 5 10 5;border-collapse: separate;">
1883 <td
class="ACT_deselected"> <?php
echo xlt('cc Near{{with correction at Near}}'); ?
> </td
>
1886 <td colspan
="4" style
="text-align:center;font-size:1.0em;">
1889 <td style
="text-align:center;"><?php
echo xlt('R{{right}}'); ?
></td
>
1890 <td
class="ACT"><?php
echo report_ACT($ACT1CCNEAR); ?
></td
>
1891 <td
class="ACT"><?php
echo report_ACT($ACT2CCNEAR); ?
></td
>
1892 <td
class="ACT"><?php
echo report_ACT($ACT3CCNEAR); ?
></td
>
1893 <td style
="text-align:center;"><?php
echo xlt('L{{left}}'); ?
></td
>
1896 <td style
="text-align:right;"><i
class="fa fa-reply rotate-left"></i
></td
>
1897 <td
class="ACT"><?php
echo report_ACT($ACT4CCNEAR); ?
></td
>
1898 <td
class="ACT"><?php
echo report_ACT($ACT5CCNEAR); ?
></td
>
1899 <td
class="ACT"><?php
echo report_ACT($ACT6CCNEAR); ?
></td
>
1900 <td
><i
class="fa fa-share rotate-right"></i
></td
>
1903 <td
class="ACT"><?php
echo report_ACT($ACT10CCNEAR); ?
></td
>
1904 <td
class="ACT"><?php
echo report_ACT($ACT7CCNEAR); ?
></td
>
1905 <td
class="ACT"><?php
echo report_ACT($ACT8CCNEAR); ?
></td
>
1906 <td
class="ACT"><?php
echo report_ACT($ACT9CCNEAR); ?
></td
>
1907 <td
class="ACT"><?php
echo report_ACT($ACT11CCNEAR); ?
></td
>
1919 <?php
if ($NEURO_COMMENTS) { ?
>
1923 <b
><?php
echo xlt('Comments'); ?
>:</b
><br
/>
1924 <span style
="height:3.0em;">
1925 <?php
echo report_ACT($NEURO_COMMENTS); ?
>
1939 //end choice !== 'TEXT' -- include this in summary mouseover report.
1941 <!-- start of IMPPLAN exam
-->
1942 <table
class="report_exam_group">
1944 <td style
="text-align:left;padding:1px;vertical-align:top;width:480px;">
1945 <b
><u
><?php
echo xlt('Impression/Plan'); ?
>:</u
></b
>
1948 <td style
="padding:5px;text-align: left;text-align:justify;width:475px;">
1951 * Retrieve and Display the IMPPLAN_items for the Impression/Plan zone.
1953 $query = "select * from form_".$form_folder."_impplan where form_id=? and pid=? order by IMPPLAN_order ASC";
1954 $result = sqlStatement($query, array($form_id,$pid));
1956 $order = array("\r\n", "\n", "\r","\v","\f","\x85","\u2028","\u2029");
1957 $replace = "<br />";
1959 while ($ip_list = sqlFetchArray($result)) {
1961 'form_id' => $ip_list['form_id'],
1962 'pid' => $ip_list['pid'],
1963 'title' => $ip_list['title'],
1964 'code' => $ip_list['code'],
1965 'codetype' => $ip_list['codetype'],
1966 'codetext' => $ip_list['codetext'],
1967 'plan' => str_replace($order, $replace, $ip_list['plan']),
1968 'IMPPLAN_order' => $ip_list['IMPPLAN_order']
1970 $IMPPLAN_items[$i] =$newdata;
1974 //for ($i=0; $i < count($IMPPLAN_item); $i++) {
1975 foreach ($IMPPLAN_items as $item) {
1976 echo ($item['IMPPLAN_order'] +
1).'. <b>'.text($item['title']).'</b><br />';
1977 echo '<div style="padding-left:15px;">';
1978 $pattern = '/Code/';
1979 if (preg_match($pattern, $item['code'])) {
1983 if ($item['codetext'] > '') {
1984 echo $item['codetext']."<br />";
1986 if ($item['code'] > '') {
1987 if ($item['codetype'] > '') {
1988 $item['code'] = $item['codetype'].": ".$item['code'];
1991 echo $item['code']."<br />";
1995 echo $item['plan']."</div><br />";
1998 if ($PLAN && $PLAN != '0') { ?
>
1999 <b
><?php
echo xlt('Orders')."/".xlt('Next Visit'); ?
>:</b
>
2001 <div style
="padding-left:15px;padding-bottom:10px;width:400px;">
2003 $PLAN_items = explode('|', $PLAN);
2004 foreach ($PLAN_items as $item) {
2005 echo $item."<br />";
2009 echo $PLAN2."<br />";
2020 <td style
="text-align:center;vertical-align:bottom;padding:1px;">
2022 display_draw_image("IMPPLAN", $encounter, $pid);
2025 //display a stored optional electronic sig for this providerID, ie the patient's Doc not the tech
2026 $from_file = $GLOBALS["webserver_root"] ."/interface/forms/".$form_folder."/images/sign_".$providerID.".jpg";
2027 if (file_exists($from_file)) {
2028 echo "<img style='width:50mm;' src='$from_file'><hr style='width:40mm;' />".
2029 text($providerNAME)."<br />
2030 <i style='font-size:9px;'>".xlt('electronically signed on')." ".oeFormatShortDate()."</i>";
2034 <span style
="border-top:1pt solid black;padding-left:50px;"><?php
echo text($providerNAME); ?
></span
>
2037 $signature = $GLOBALS["webserver_root"]."/interface/forms/".$form_folder."/images/sign_".$providerID.".jpg";
2038 if (file_exists($signature)) {
2039 echo "<img src='".$GLOBALS['web_root']."/interface/forms/".$form_folder."/images/sign_".$providerID.".jpg' style='width:30mm; height:6mm;bottom:1px;' height='10' />";
2053 function display_draw_image($zone, $encounter, $pid)
2055 global $form_folder;
2059 $base_name = $pid."_".$encounter."_".$side."_".$zone."_VIEW";
2060 $filename = $base_name.".jpg";
2061 $sql = "SELECT * from documents where documents.url like '%".$filename."'";
2062 $doc = sqlQuery($sql);
2063 $document_id =$doc['id'];
2065 if (($document_id > '1')&&(is_numeric($document_id))) {
2066 $d = new Document($document_id);
2067 $fname = basename($d->get_url());
2069 $couch_docid = $d->get_couch_docid();
2070 $couch_revid = $d->get_couch_revid();
2071 $extension = substr($fname, strrpos($fname, "."));
2072 $notes = $d->get_notes();
2073 if (!empty($notes)) {
2077 foreach ($notes as $note) {
2079 echo '<td>' . xlt('Note') . ' #' . $note->get_id() . '</td>';
2082 echo '<td>' . xlt('Date') . ': ' . oeFormatShortDate($note->get_date()) . '</td>';
2085 echo '<td>'.$note->get_note().'<br /><br /></td>';
2089 if (!empty($notes)) {
2093 $url_file = $d->get_url_filepath();
2094 if ($couch_docid && $couch_revid) {
2095 $url_file = $d->get_couch_url($pid, $encounter);
2098 // Collect filename and path
2099 $from_all = explode("/", $url_file);
2100 $from_filename = array_pop($from_all);
2101 $from_pathname_array = array();
2102 for ($i=0; $i<$d->get_path_depth(); $i++
) {
2103 $from_pathname_array[] = array_pop($from_all);
2106 $from_pathname_array = array_reverse($from_pathname_array);
2107 $from_pathname = implode("/", $from_pathname_array);
2109 if ($couch_docid && $couch_revid) {
2110 $from_file = $GLOBALS['OE_SITE_DIR'] . '/documents/temp/' . $from_filename;
2111 $to_file = substr($from_file, 0, strrpos($from_file, '.')) . '_converted.jpg';
2113 $from_file = $GLOBALS["fileroot"] . "/sites/" . $_SESSION['site_id'] .
2114 '/documents/' . $from_pathname . '/' . $from_filename;
2115 $to_file = substr($from_file, 0, strrpos($from_file, '.')) . '_converted.jpg';
2118 // if ($extension == ".png" || $extension == ".jpg" || $extension == ".jpeg" || $extension == ".gif") {
2120 echo "<img src='". $from_file."' style='width:220px;height:120px;'>";
2122 $filetoshow = $GLOBALS['webroot']."/controller.php?document&retrieve&patient_id=$pid&document_id=".$doc['id']."&as_file=false&blahblah=".rand();
2123 echo "<img src='".$filetoshow."' style='width:220px;height:120px;'>";
2125 } //else show base_image
2127 $filetoshow = "../../forms/".$form_folder."/images/".$side."_".$zone."_BASE.jpg";
2129 $filetoshow = $GLOBALS["webroot"] ."/interface/forms/".$form_folder."/images/".$side."_".$zone."_BASE.jpg";
2132 // uncomment to show base image, no touch up by user.
2133 // echo "<img src='". $filetoshow."' style='width:220px;height:120px;'>";
2139 function report_ACT($term)
2141 $term = nl2br(htmlspecialchars($term, ENT_NOQUOTES
));
2142 return $term." ";