Module fixes and updates (#7429)
[openemr.git] / interface / forms / eye_mag / view.php
blob8e3e1b57b3f8235e626d210115c23739f45213a0
1 <?php
3 /**
4 * forms/eye_mag/view.php
6 * Central view for the eye_mag form. Here is where all new data is entered
7 * New forms are created via new.php and then this script is displayed.
8 * Edit requests come here too...
10 * @package OpenEMR
11 * @link https://www.open-emr.org
12 * @author Ray Magauran <rmagauran@gmail.com>
13 * @copyright Copyright (c) 2016- Raymond Magauran <rmagauran@gmail.com>
14 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
17 require_once(__DIR__ . "/../../globals.php");
18 require_once("$srcdir/FeeSheetHtml.class.php");
19 include_once("../../forms/eye_mag/php/eye_mag_functions.php");
21 use OpenEMR\Core\Header;
23 $form_name = "eye_mag";
24 $form_folder = "eye_mag";
25 $Form_Name = "Eye Exam";
26 $form_id = $_REQUEST['id'];
27 $action = $_REQUEST['action'] ?? null;
28 $finalize = $_REQUEST['finalize'] ?? null;
29 $id = $_REQUEST['id'];
30 $display = $_REQUEST['display'] ?? null;
31 $pid = $_REQUEST['pid'] ?? '';
32 $refresh = $_REQUEST['refresh'] ?? null;
34 if (!empty($_REQUEST['url'])) {
35 header('Location: ' . $_REQUEST['url']);
36 exit;
39 // Get user preferences, for this user
40 $query = "SELECT * FROM form_eye_mag_prefs where PEZONE='PREFS' AND (id=?) ORDER BY id,ZONE_ORDER,ordering";
41 $result = sqlStatement($query, array($_SESSION['authUserID']));
42 while ($prefs = sqlFetchArray($result)) {
43 $LOCATION = $prefs['LOCATION'];
44 $$LOCATION = text($prefs['GOVALUE']);
46 // These settings are sticky user preferences linked to a given page.
47 // Could do ALL preferences this way instead of the modified extract above...
48 // mdsupport - user_settings prefix
49 $uspfx = "EyeFormSettings_";
50 $setting_tabs_left = prevSetting($uspfx, 'setting_tabs_left', 'setting_tabs_left', '0');
51 $setting_HPI = prevSetting($uspfx, 'setting_HPI', 'setting_HPI', '1');
52 $setting_PMH = prevSetting($uspfx, 'setting_PMH', 'setting_PMH', '1');
53 $setting_EXT = prevSetting($uspfx, 'setting_EXT', 'setting_EXT', '1');
54 $setting_ANTSEG = prevSetting($uspfx, 'setting_ANTSEG', 'setting_ANTSEG', '1');
55 $setting_POSTSEG = prevSetting($uspfx, 'setting_POSTSEG', 'setting_POSTSEG', '1');
56 $setting_NEURO = prevSetting($uspfx, 'setting_NEURO', 'setting_NEURO', '1');
57 $setting_IMPPLAN = prevSetting($uspfx, 'setting_IMPPLAN', 'setting_IMPPLAN', '1');
59 $query10 = "select *,form_encounter.date as encounter_date
61 from forms,form_encounter,form_eye_base,
62 form_eye_hpi,form_eye_ros,form_eye_vitals,
63 form_eye_acuity,form_eye_refraction,form_eye_biometrics,
64 form_eye_external, form_eye_antseg,form_eye_postseg,
65 form_eye_neuro,form_eye_locking
66 where
67 forms.deleted != '1' and
68 forms.formdir='eye_mag' and
69 forms.encounter=form_encounter.encounter and
70 forms.form_id=form_eye_base.id and
71 forms.form_id=form_eye_hpi.id and
72 forms.form_id=form_eye_ros.id and
73 forms.form_id=form_eye_vitals.id and
74 forms.form_id=form_eye_acuity.id and
75 forms.form_id=form_eye_refraction.id and
76 forms.form_id=form_eye_biometrics.id and
77 forms.form_id=form_eye_external.id and
78 forms.form_id=form_eye_antseg.id and
79 forms.form_id=form_eye_postseg.id and
80 forms.form_id=form_eye_neuro.id and
81 forms.form_id=form_eye_locking.id and
82 forms.pid=form_eye_base.pid and
83 forms.pid=form_eye_hpi.pid and
84 forms.pid=form_eye_ros.pid and
85 forms.pid=form_eye_vitals.pid and
86 forms.pid=form_eye_acuity.pid and
87 forms.pid=form_eye_refraction.pid and
88 forms.pid=form_eye_biometrics.pid and
89 forms.pid=form_eye_external.pid and
90 forms.pid=form_eye_antseg.pid and
91 forms.pid=form_eye_postseg.pid and
92 forms.pid=form_eye_neuro.pid and
93 forms.pid=form_eye_locking.pid and
94 forms.form_id =? ";
96 $encounter_data = sqlQuery($query10, array($id));
97 @extract($encounter_data);
98 $id = $form_id;
100 list($ODIOPTARGET,$OSIOPTARGET) = getIOPTARGETS($pid, $id, $provider_id);
102 $query = "SELECT * FROM patient_data where pid=?";
103 $pat_data = sqlQuery($query, array($pid));
105 $query = "SELECT * FROM users where id = ?";
106 $prov_data = sqlQuery($query, array($provider_id));
109 $query = "SELECT * FROM users WHERE id=?";
110 $pcp_data = sqlQuery($query, array($pat_data['providerID']));
111 $ref_data = sqlQuery($query, array($pat_data['ref_providerID']));
112 $insurance_info[1] = getInsuranceData($pid, "primary");
113 $insurance_info[2] = getInsuranceData($pid, "secondary");
114 $insurance_info[3] = getInsuranceData($pid, "tertiary");
115 $ins_coA = $insurance_info[1]['provider_name'];
116 $ins_coB = $insurance_info[2]['provider_name'];
117 $ins_coC = $insurance_info[3]['provider_name'];
118 // build $PMSFH array
119 global $priors;
120 global $earlier;
121 $PMSFH = build_PMSFH($pid);
122 $fs = new FeeSheetHtml();
124 Two windows anywhere with the same chart open is not compatible with the autosave feature.
125 Data integrity problems will arise.
126 We use a random number generated for each instance - each time the form is opened - == uniqueID.
127 If: the form is LOCKED
128 and the LOCKEDBY variable != uniqueID
129 and less than one hour has passed since it was locked
130 then: a pop-up signals READ-ONLY mode.
131 This user can take control if they wish. If they confirm yes, take control,
132 LOCKEDBY is changed to their uniqueID,
133 Any other instance of the form cannot save data, and if they try,
134 they will receive a popup saying hey buddy, you lost ownership, entering READ-ONLY mode.
135 "Do you want to take control" is offered, should they wish to regain write privileges
136 If they stay in READ-ONLY mode, the fields are locked and submit_form is not allowed...
137 In READ-ONLY mode, the form is refreshed via ajax every 15 seconds with changed fields' css
138 background-color attribute set to purple.
139 Once the active user with write privileges closes their instance of the form, the form_id is unlocked.
140 READ-ONLY users stay read only if they do nothing.
143 $warning = 'nodisplay';
144 $uniqueID = mt_rand();
145 $warning_text = 'READ-ONLY mode.';
147 if (!$LOCKED || !$LOCKEDBY) { //no one else has write privs.
148 $LOCKEDBY = $uniqueID;
149 $LOCKED = '1';
150 } else {
151 //warning. This form is locked by another user.
152 $warning = ""; //remove nodisplay class
153 $take_ownership = $uniqueID;
157 * Remove TIME component from $encounter_date (which is in DATETIME format) to just get the date,
158 * since OpenEMR assumes input is yyyy-mm-dd.
160 $dated = new DateTime($encounter_data['encounter_date']);
161 $dated = $dated->format('Y-m-d');
162 $visit_date = oeFormatShortDate($dated);
164 if (!$form_id && !$encounter) {
165 echo text($encounter) . "-" . text($form_id) . xlt('No encounter...');
166 exit;
169 if ($refresh and $refresh != 'fullscreen') {
170 if ($refresh == "PMSFH") {
171 echo display_PRIOR_section($refresh, $id, $id, $pid);
172 } elseif ($refresh == "PMSFH_panel") {
173 echo show_PMSFH_panel($PMSFH);
174 } elseif ($refresh == "page") {
175 echo send_json_values($PMSFH);
176 } elseif ($refresh == "GFS") {
177 echo display_GlaucomaFlowSheet($pid);
179 exit;
181 ?><!DOCTYPE html>
182 <html>
183 <head>
184 <title> <?php echo xlt('Chart'); ?>: <?php echo text($pat_data['fname']) . " " . text($pat_data['lname']) . " " . text($visit_date); ?></title>
185 <meta name="description" content="OpenEMR: Eye Exam" />
186 <meta name="author" content="OpenEMR: Ophthalmology" />
189 <?php Header::setupHeader([ 'jquery-ui', 'jquery-ui-redmond','datetime-picker', 'dialog' ,'jscolor', 'chart' ]); ?>
190 <link rel="stylesheet" href="../../forms/<?php echo $form_folder; ?>/css/style.css?v=<?php echo $v_js_includes; ?>" type="text/css">
192 </head>
193 <!--Need a margin-top due to fixed nav, move to style.css to separate view stuff? Long way from that... -->
194 <body class="bgcolor2" background="<?php echo $GLOBALS['backpic']?>" style="margin:5px 0 0 0;">
196 <div id="tabs_left" class="tabs ui-tabs ui-widget ui-widget-content ui-corner-all nodisplay">
197 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-corner-all">
199 <li id="tabs-left-HPI" class="btn-primary">
200 <span><?php echo xlt('HPI'); ?></span>
201 </li>
202 <li id="tabs-left-PMH" class="btn-primary">
203 <span><?php echo xlt('PMH'); ?></span>
204 </li>
205 <li id="tabs-left-EXT" class="btn-primary">
206 <span><?php echo xlt('Ext'); ?></span>
207 </li>
208 <li id="tabs-left-ANTSEG" class="btn-primary">
209 <span><?php echo xlt('Ant'); ?></span>
210 </li>
211 <li id="tabs-left-POSTSEG" class="btn-primary">
212 <span><?php echo xlt('Retina'); ?></span>
213 </li>
214 <li id="tabs-left-NEURO" class="btn-primary">
215 <span><?php echo xlt('Neuro'); ?></span>
216 </li>
217 <li id="tabs-left-IMPPLAN" class="btn-primary">
218 <span><?php echo xlt('Imp'); ?></span>
219 </li>
221 </ul>
222 </div>
224 <?php
225 $input_echo = menu_overhaul_top($pid, $encounter);
226 ?><br /><br />
228 <div id="page-wrapper" data-role="page">
229 <div id="Layer2" name="Layer2" class="nodisplay">
230 </div>
231 <div id="Layer3" name="Layer3" class="container-fluid">
232 <?php
233 $output_priors = priors_select("ALL", $id, $id, $pid);
235 menu_overhaul_left($pid, $encounter);
236 //define if this is a new or est patients for coding auto-suggestions
237 //TODO: develop logic to recognize post-op visits 99024
238 // if a prior encounter within 90 days are procedures with a global period still in effect, then post-op code
240 <script>
241 var Code_new_est ='<?php
242 if ($output_priors == '') {
243 echo xls("New");
244 } else {
245 echo xls("Est");
247 ?>';
248 </script>
249 <!-- start form -->
250 <form method="post" action="<?php echo $rootdir;?>/forms/<?php echo $form_folder; ?>/save.php?mode=update" id="eye_mag" class="eye_mag pure-form" name="eye_mag">
251 <div id="Layer1" name="Layer1" class="display">
252 <div id="warning" name="warning" class="alert alert-warning <?php echo $warning; ?>">
253 <span type="button" class="close" data-dismiss="alert">&times;</span>
254 <h4><?php echo xlt('Warning'); ?>!
255 <?php echo text($warning_text); ?></h4>
256 </div>
258 <!-- start form_container for the main body of the form -->
259 <div class="body_top text-center row" id="form_container" name="form_container">
260 <input type="hidden" name="menustate" id="menustate" value="start">
261 <input type="hidden" name="form_folder" id="form_folder" value="<?php echo attr($form_folder); ?>">
262 <input type="hidden" name="form_id" id="form_id" value="<?php echo attr($form_id); ?>">
263 <input type="hidden" name="pid" id="pid" value="<?php echo attr($pid); ?>">
264 <input type="hidden" name="encounter" id="encounter" value="<?php echo attr($encounter); ?>">
265 <input type="hidden" name="visit_date" id="visit_date" value="<?php echo attr($encounter_date); ?>">
266 <input type="hidden" name="PREFS_VA" id="PREFS_VA" value="<?php echo attr($VA ?? ''); ?>">
267 <input type="hidden" name="PREFS_W" id="PREFS_W" value="<?php echo attr($W ?? ''); ?>">
268 <input type="hidden" name="PREFS_W_width" id="PREFS_W_width" value="<?php echo attr($W_width ?? ''); ?>">
269 <input type="hidden" name="PREFS_MR" id="PREFS_MR" value="<?php echo attr($MR ?? ''); ?>">
270 <input type="hidden" name="PREFS_MR_width" id="PREFS_MR_width" value="<?php echo attr($MR_width ?? ''); ?>">
271 <input type="hidden" name="PREFS_CR" id="PREFS_CR" value="<?php echo attr($CR ?? ''); ?>">
272 <input type="hidden" name="PREFS_CTL" id="PREFS_CTL" value="<?php echo attr($CTL ?? ''); ?>">
273 <input type="hidden" name="PREFS_VAX" id="PREFS_VAX" value="<?php echo attr($VAX ?? ''); ?>">
274 <input type="hidden" name="PREFS_RXHX" id="PREFS_RXHX" value="<?php echo attr($RXHX ?? ''); ?>">
275 <input type="hidden" name="PREFS_ADDITIONAL" id="PREFS_ADDITIONAL" value="<?php echo attr($ADDITIONAL ?? ''); ?>">
276 <input type="hidden" name="PREFS_CLINICAL" id="PREFS_CLINICAL" value="<?php echo attr($CLINICAL ?? ''); ?>">
277 <input type="hidden" name="PREFS_IOP" id="PREFS_IOP" value="<?php echo attr($IOP ?? ''); ?>">
278 <input type="hidden" name="PREFS_EXAM" id="PREFS_EXAM" value="<?php echo attr($EXAM ?? ''); ?>">
279 <input type="hidden" name="PREFS_CYL" id="PREFS_CYL" value="<?php echo attr($CYLINDER ?? ''); ?>">
280 <input type="hidden" name="PREFS_HPI_VIEW" id="PREFS_HPI_VIEW" value="<?php echo attr($HPI_VIEW ?? ''); ?>">
281 <input type="hidden" name="PREFS_EXT_VIEW" id="PREFS_EXT_VIEW" value="<?php echo attr($EXT_VIEW ?? ''); ?>">
282 <input type="hidden" name="PREFS_ANTSEG_VIEW" id="PREFS_ANTSEG_VIEW" value="<?php echo attr($ANTSEG_VIEW ?? ''); ?>">
283 <input type="hidden" name="PREFS_RETINA_VIEW" id="PREFS_RETINA_VIEW" value="<?php echo attr($RETINA_VIEW ?? ''); ?>">
284 <input type="hidden" name="PREFS_NEURO_VIEW" id="PREFS_NEURO_VIEW" value="<?php echo attr($NEURO_VIEW ?? ''); ?>">
285 <input type="hidden" name="PREFS_ACT_VIEW" id="PREFS_ACT_VIEW" value="<?php echo attr($ACT_VIEW ?? ''); ?>">
286 <input type="hidden" name="PREFS_PMH_RIGHT" id="PREFS_PMH_RIGHT" value="<?php echo attr($PMH_RIGHT ?? ''); ?>">
287 <input type="hidden" name="PREFS_HPI_RIGHT" id="PREFS_HPI_RIGHT" value="<?php echo attr($HPI_RIGHT ?? ''); ?>">
288 <input type="hidden" name="PREFS_EXT_RIGHT" id="PREFS_EXT_RIGHT" value="<?php echo attr($EXT_RIGHT ?? ''); ?>">
289 <input type="hidden" name="PREFS_ANTSEG_RIGHT" id="PREFS_ANTSEG_RIGHT" value="<?php echo attr($ANTSEG_RIGHT ?? ''); ?>">
290 <input type="hidden" name="PREFS_RETINA_RIGHT" id="PREFS_RETINA_RIGHT" value="<?php echo attr($RETINA_RIGHT ?? ''); ?>">
291 <input type="hidden" name="PREFS_NEURO_RIGHT" id="PREFS_NEURO_RIGHT" value="<?php echo attr($NEURO_RIGHT ?? ''); ?>">
292 <input type="hidden" name="PREFS_IMPPLAN_RIGHT" id="PREFS_IMPPLAN_RIGHT" value="<?php echo attr($IMPPLAN_RIGHT ?? ''); ?>">
293 <input type="hidden" name="PREFS_PANEL_RIGHT" id="PREFS_PANEL_RIGHT" value="<?php echo attr($PANEL_RIGHT ?? ''); ?>">
294 <input type="hidden" name="PREFS_KB" id="PREFS_KB" value="<?php echo attr($KB_VIEW ?? ''); ?>">
295 <input type="hidden" name="PREFS_TOOLTIPS" id="PREFS_TOOLTIPS" value="<?php echo attr($TOOLTIPS ?? ''); ?>">
296 <input type="hidden" name="ownership" id="ownership" value="<?php echo attr($ownership ?? ''); ?>">
297 <input type="hidden" name="PREFS_ACT_SHOW" id="PREFS_ACT_SHOW" value="<?php echo attr($ACT_SHOW ?? ''); ?>">
298 <input type="hidden" name="COPY_SECTION" id="COPY_SECTION" value="">
299 <input type="hidden" name="UNDO_ID" id="UNDO_ID" value="<?php echo attr($UNDO_ID ?? ''); ?>">
300 <input type="hidden" name="LOCKEDBY" id="LOCKEDBY" value="<?php echo attr($LOCKEDBY ?? ''); ?>">
301 <input type="hidden" name="LOCKEDDATE" id="LOCKEDDATE" value="<?php echo attr($LOCKEDDATE ?? ''); ?>">
302 <input type="hidden" name="LOCKED" id="LOCKED" value="<?php echo attr($LOCKED ?? ''); ?>">
303 <input type="hidden" name="uniqueID" id="uniqueID" value="<?php echo attr($uniqueID ?? ''); ?>">
304 <input type="hidden" name="chart_status" id="chart_status" value="on">
305 <input type="hidden" name="finalize" id="finalize" value="0">
306 <input type='hidden' name='setting_tabs_left' id='setting_tabs_left' value='<?php echo attr($setting_tabs_left); ?>'>
307 <input type='hidden' name='setting_HPI' id='setting_HPI' value='<?php echo attr($setting_HPI); ?>'>
308 <input type='hidden' name='setting_PMH' id='setting_PMH' value='<?php echo attr($setting_PMH); ?>'>
309 <input type='hidden' name='setting_EXT' id='setting_EXT' value='<?php echo attr($setting_EXT); ?>'>
310 <input type='hidden' name='setting_ANTSEG' id='setting_ANTSEG' value='<?php echo attr($setting_ANTSEG); ?>'>
311 <input type='hidden' name='setting_POSTSEG' id='setting_POSTSEG' value='<?php echo attr($setting_POSTSEG); ?>'>
312 <input type='hidden' name='setting_NEURO' id='setting_NEURO' value='<?php echo attr($setting_NEURO); ?>'>
313 <input type='hidden' name='setting_IMPPLAN' id='setting_IMPPLAN' value='<?php echo attr($setting_IMPPLAN); ?>'>
315 <!-- start first div -->
316 <div id="first" name="first" class="text_clinical">
317 <!-- start HPI spinner -->
318 <div class="loading" id="HPI_sections_loading" name="HPI_sections_loading"><i class="fa fa-spinner fa-spin"></i>
319 </div>
320 <!-- end HPI spinner -->
321 <?php (($CLINICAL ?? null) == '1') ? ($display_Add = "size100") : ($display_Add = "size50"); ?>
322 <?php (($CLINICAL ?? null) == '0') ? ($display_Visibility = "display") : ($display_Visibility = "nodisplay"); ?>
323 <!-- start HPI_PMH row -->
324 <div id="HPIPMH_sections" class="nodisplay">
325 <!-- start HPI_section -->
326 <div id="HPI_1" name="HPI_1" class="<?php echo attr($display_Add); ?>">
327 <span class="anchor" id="HPI_anchor"></span>
329 <!-- start HPI Left -->
330 <div id="HPI_left" name="HPI_left" class="exam_section_left borderShadow">
331 <div id="HPI_left_text" class="TEXT_class">
332 <span class="closeButton_2 fa fa-paint-brush" title="<?php echo xla('Open/Close the HPI Canvas'); ?>" id="BUTTON_DRAW_HPI" name="BUTTON_DRAW_HPI"></span>
333 <i class="closeButton_3 fa fa-database" title="<?php echo xla('Open/Close the detailed HPI panel'); ?>" id="BUTTON_QP_HPI" name="BUTTON_QP_HPI"></i>
334 <i class="closeButton_4 fa fa-user-md" name="Shorthand_kb" title="<?php echo xla("Open/Close the Shorthand Window and display Shorthand Codes."); ?>"></i>
335 <i class="closeButton fa fa-minus-circle" title="<?php echo xla('Minimize this panel'); ?>" id="BUTTON_TAB_HPI" name="BUTTON_TAB_HPI"></i>
337 <b><?php echo xlt('HPI'); ?>:</b> <i class="fa fa-help"></i><br />
338 <div id="tabs_wrapper" >
339 <div id="tabs_container">
340 <ul id="tabs">
341 <li id="tab0_CC" class="inactive"></li>
342 <li id="tab1_CC" class="active" ><a class="fa fa-check" href="#tab1"> <?php echo xlt('CC{{Chief Complaint}}'); ?> 1</a></li>
343 <li id="tab2_CC"><a <?php if ($CC2 > '') {
344 echo 'class="fa fa-check"';
345 } ?> href="#tab2"><?php echo xlt('CC{{Chief Complaint}}'); ?> 2</a></li>
346 <li id="tab3_CC"><a <?php if ($CC3 > '') {
347 echo 'class="fa fa-check"';
348 } ?> href="#tab3"><?php echo xlt('CC{{Chief Complaint}}'); ?> 3</a></li>
349 </ul>
350 </div>
351 <div id="tabs_content_container" class="borderShadow">
352 <div id="tab1_CC_text" class="tab_content">
353 <table border="0" width="100%" cellspacing="0" cellpadding="0">
354 <tr>
355 <td class="pad10" colspan="2">
356 <div class="kb kb_left">CC</div><b><span title="<?php echo xla('In the patient\'s words'); ?>"><?php echo xlt('Chief Complaint'); ?> 1:
357 </span> </b>
358 <br />
359 <textarea name="CC1" id="CC1" class="HPI_text" tabindex="10"><?php echo text($CC1); ?></textarea>
360 </td>
361 </tr>
362 <tr>
363 <td class="top pad10">
364 <span id="HPI_HELP" title="<?php echo xla('History of Present Illness: A detailed HPI may be completed by using either four or more HPI elements OR the status of three chronic or inactive problems.'); ?>"><?php echo xlt('HPI'); ?>:
365 </span><div class="kb kb_left">HPI</div>
366 <br />
367 <textarea name="HPI1" id="HPI1" class="HPI_text" tabindex="21"><?php echo text($HPI1); ?></textarea>
368 <br />
369 </td>
370 <td class="top pad10"><span id="CHRONIC_HELP" title="<?php echo xla('Chronic/Inactive Problems') . ":&nbsp\n" . xla('document 3 and their status to reach the detailed HPI level') . "&nbsp\n";
371 echo "PMH items flagged as Chronic with a comment regarding status will automatically appear here.";?>"><?php echo xlt('Chronic Problems') ?>:</span>
372 <span class="kb_off"><br /></span><div class="kb kb_right">CHRONIC1</div>
373 <textarea name="CHRONIC1" id="CHRONIC1" class="HPI_text chronic_HPI" tabindex="22"><?php echo text($CHRONIC1); ?></textarea>
374 <span class="kb_off"><br /></span><div class="kb kb_right">CHRONIC2</div><textarea name="CHRONIC2" id="CHRONIC2" class="HPI_text chronic_HPI" tabindex="23"><?php echo text($CHRONIC2); ?></textarea>
375 <span class="kb_off"><br /></span><div class="kb kb_right">CHRONIC3</div><textarea name="CHRONIC3" id="CHRONIC3" class="HPI_text chronic_HPI" tabindex="24"><?php echo text($CHRONIC3); ?></textarea>
376 </td>
377 </tr>
378 <tr>
379 <td colspan="2" class="center">
380 <i id="CODE_HIGH_0" name="CODE_HIGH" class="CODE_HIGH fa fa-check nodisplay" value="1"></i>
381 <span id="CODE_HIGH_HELP">
382 <span class="detailed_HPI" name=""><?php echo xlt('Detailed HPI') ?>:</span>
383 <span class="detail_4_elements" name=""><?php echo xlt('> 3 HPI elements'); ?></span> <?php echo xlt('OR{{as in AND/OR, ie. not an abbreviation}}'); ?>
384 <span class="chronic_3_elements"><?php echo xlt('the status of three chronic/inactive problems'); ?></span>
385 </span>
386 </td>
387 </tr>
388 </table>
389 </div>
391 <div id="tab2_CC_text" class="tab_content">
392 <table class="CC_table" border="0" width="100%" cellspacing="0" cellpadding="0">
393 <tr>
394 <td class="top pad10" colspan="2">
395 <b><span title="<?php echo xla('In the patient\'s words'); ?>"><?php echo xlt('Chief Complaint'); ?> 2:
396 </span> </b>
397 <br />
398 <textarea name="CC2" id="CC2" class="HPI_text CC_Box" tabindex="10"><?php echo text($CC2); ?></textarea>
399 </td>
400 </tr>
401 <tr>
402 <td class="top pad10">
403 <span class="HPI_TITLE" title="<?php echo xla('History of Present Illness: A detailed HPI may be completed by using either four or more HPI elements OR the status of three chronic or inactive problems.'); ?>"><?php echo xlt('HPI'); ?> 2:
404 </span>
405 <br />
406 <textarea name="HPI2" id="HPI2" class="HPI_text" tabindex="21"><?php echo text($HPI2); ?></textarea>
407 <br />
408 </td>
409 </tr>
410 </table>
411 </div>
412 <div id="tab3_CC_text" class="tab_content">
413 <table class="CC_table" border="0" width="100%" cellspacing="0" cellpadding="0">
414 <tr>
415 <td class="top pad10" colspan="2">
416 <b><span title="<?php echo xla('In the patient\'s words'); ?>"><?php echo xlt('Chief Complaint'); ?> 3:
417 </span> </b>
418 <br />
419 <textarea name="CC3" id="CC3" class="HPI_text CC_Box" tabindex="10"><?php echo text($CC3); ?></textarea>
420 </td>
421 </tr>
422 <tr>
423 <td class="top pad10">
424 <span class="HPI_TITLE" title="<?php echo xla('History of Present Illness: A detailed HPI may be completed by using either four or more HPI elements OR the status of three chronic or inactive problems.'); ?>"><?php echo xlt('HPI'); ?> 3:
425 </span>
426 <br />
427 <textarea name="HPI3" id="HPI3" class="HPI_text" tabindex="21"><?php echo text($HPI3); ?></textarea>
428 <br />
429 </td>
430 </tr>
431 </table>
432 </div>
433 </div>
434 </div>
436 <?php (($HPI_VIEW ?? null) != 2) ? ($display_HPI_view = "wide_textarea") : ($display_HPI_view = "narrow_textarea");?>
437 <?php ($display_HPI_view == "wide_textarea") ? ($marker = "fa-minus-square") : ($marker = "fa-plus-square");?>
438 </div>
439 </div>
440 <!-- end HPI Left -->
442 <!-- start HPI Right -->
443 <div id="HPI_right" name="HPI_right" class="exam_section_right borderShadow">
444 <?php display_draw_section("HPI", $encounter, $pid); ?>
445 <!-- start QP_HPI_Build -->
446 <div id="QP_HPI" name="QP_HPI" class="QP_class left">
447 <div id="HPI_text_list" name="HPI_text_list">
448 <span class="closeButton fa fa-times float-right z100" id="BUTTON_TEXTD_HPI" name="BUTTON_TEXTD_HPI" value="1"></span>
449 <b><?php echo xlt('HPI Elements'); ?>:</b> <br />
450 <div id="tabs_wrapper" >
451 <div id="tabs_container">
452 <ul id="tabs">
453 <li id="tab1_HPI_tab" class="active" ><a type="button" <?php if ($CC1 > '') {
454 echo 'class="fa fa-check" ';
455 } ?> href="#tab1"> <?php echo xlt('HPI'); ?> 1</a></li>
456 <li id="tab2_HPI_tab" ><a <?php if ($CC2 > '') {
457 echo 'class="fa fa-check"';
458 } ?> href="#tab2"><?php echo xlt('HPI'); ?> 2</a></li>
459 <li id="tab3_HPI_tab" ><a <?php if ($CC3 > '') {
460 echo 'class="fa fa-check"';
461 } ?> href="#tab3"><?php echo xlt('HPI'); ?> 3</a></li>
462 </ul>
463 </div>
464 <div id="tabs_content_container" class="borderShadow">
465 <div id="tab1_HPI_text" class="tab_content">
466 <table>
467 <tr>
468 <td class="right"><b><?php echo xlt('Timing'); ?>:</b></td>
469 <td>
470 <textarea name="TIMING1" id="TIMING1" class="count_HPI" tabindex="30"><?php echo text($TIMING1); ?></textarea>
471 </td>
472 <td><i><?php echo xlt('When and how often?'); ?></i><br /></td>
473 </tr>
474 <tr>
475 <td class="right"><b><?php echo xlt('Context'); ?>:</b></td>
476 <td>
477 <textarea name="CONTEXT1" id="CONTEXT1" class="count_HPI" tabindex="31"><?php echo text($CONTEXT1); ?></textarea>
478 </td>
479 <td>
480 <i><?php echo xlt('Does it occur in certain situations?'); ?></i>
481 </td>
482 </tr>
483 <tr>
484 <td class="right"><b><?php echo xlt('Severity'); ?>:</b></td>
485 <td>
486 <textarea name="SEVERITY1" id="SEVERITY1" class="count_HPI" tabindex="32"><?php echo text($SEVERITY1); ?></textarea>
487 </td>
488 <td><i><?php echo xlt('How bad is it? 0-10, mild, mod, severe?'); ?></i></td>
489 </tr>
490 <tr>
491 <td class="right"><b><?php echo xlt('Modifying'); ?>:</b></td>
492 <td>
493 <textarea name="MODIFY1" id="MODIFY1" class="count_HPI" tabindex="33"><?php echo text($MODIFY1); ?></textarea>
494 </td>
495 <td><i ><?php echo xlt('Does anything make it better? Worse?'); ?></i></td>
496 </tr>
497 <tr>
498 <td class="right"><b><?php echo xlt('Associated'); ?>:</b></td>
499 <td>
500 <textarea name="ASSOCIATED1" id="ASSOCIATED1" class="count_HPI" tabindex="34"><?php echo text($ASSOCIATED1); ?></textarea>
501 </td>
502 <td><i><?php echo xlt('Anything else occur at the same time?'); ?></i></td>
503 </tr>
504 <tr>
505 <td class="right"><b><?php echo xlt('Location'); ?>:</b></td>
506 <td>
507 <textarea name="LOCATION1" id="LOCATION1" class="count_HPI" tabindex="35"><?php echo text($LOCATION1); ?></textarea>
508 </td>
509 <td><i><?php echo xlt('Where on your body does it occur?'); ?></i>
510 </td>
511 </tr>
512 <tr>
513 <td class="right"><b><?php echo xlt('Quality'); ?>:</b></td>
514 <td>
515 <textarea name="QUALITY1" id="QUALITY1" class="count_HPI" tabindex="36"><?php echo text($QUALITY1); ?></textarea>
516 </td>
517 <td>
518 <i><?php echo xlt('eg. aching, burning, radiating pain'); ?></i>
519 </td>
520 </tr>
521 <tr>
522 <td class="right"><b><?php echo xlt('Duration'); ?>:</b></td>
523 <td><textarea name="DURATION1" id="DURATION1" class="count_HPI" tabindex="37"><?php echo text($DURATION1); ?></textarea>
524 </td>
525 <td>
526 <i><?php echo xlt('How long does it last?'); ?></i>
527 </td>
528 </tr>
529 </table>
530 <center>
531 <i id="CODE_HIGH_1" name="CODE_HIGH" class="CODE_HIGH fa fa-check nodisplay" value="1"></i>
532 <span id="CODE_HELP_1">
533 <span class="detailed_HPI"><?php echo xlt('Detailed HPI') ?>:</span>
534 <span class="detail_4_elements"><?php echo xlt('> 3 HPI elements'); ?></span> <?php echo xlt('OR{{as in AND/OR, ie. not an abbreviation}}'); ?>
535 <span class="chronic_3_elements"><?php echo xlt('the status of three chronic/inactive problems'); ?></span>
536 </span>
537 </center>
539 </div>
540 <div id="tab2_HPI_text" class="tab_content">
541 <table>
542 <tr>
543 <td class="right"><b><?php echo xlt('Timing'); ?>:</b></td>
544 <td>
545 <textarea name="TIMING2" id="TIMING2" tabindex="30" class="count_HPI"><?php echo text($TIMING2); ?></textarea>
546 </td>
547 </td><td><i><?php echo xlt('When and how often?'); ?></i><br /></td>
548 </tr>
549 <tr>
550 <td class="right"><b><?php echo xlt('Context'); ?>:</b></td>
551 <td>
552 <textarea name="CONTEXT2" id="CONTEXT2" tabindex="31" class="count_HPI"><?php echo text($CONTEXT2); ?></textarea>
553 <br />
554 </td>
555 <td>
556 <i><?php echo xlt('Does it occur in certain situations?'); ?></i><br />
557 </td>
558 </tr>
559 <tr>
560 <td class="right"><b><?php echo xlt('Severity'); ?>:</b></td>
561 <td>
562 <textarea name="SEVERITY2" id="SEVERITY2" tabindex="32"><?php echo text($SEVERITY2); ?></textarea>
563 </td>
564 <td><i><?php echo xlt('How bad is it? 0-10, mild, mod, severe?'); ?></i>
565 </td>
566 </tr>
567 <tr>
568 <td class="right"><b><?php echo xlt('Modifying'); ?>:</b></td>
569 <td>
570 <textarea name="MODIFY2" id="MODIFY2" tabindex="33" class="count_HPI"><?php echo text($MODIFY2); ?></textarea>
571 </td>
572 <td><i ><?php echo xlt('Does anything make it better? Worse?'); ?></i>
573 </td>
574 </tr>
575 <tr>
576 <td class="right"><b><?php echo xlt('Associated'); ?>:</b></td>
577 <td>
578 <textarea name="ASSOCIATED2" id="ASSOCIATED2" tabindex="34" class="count_HPI"><?php echo text($ASSOCIATED2); ?></textarea>
579 </td>
580 <td><i><?php echo xlt('Anything else occur at the same time?'); ?></i>
581 </td>
582 </tr>
583 <tr>
584 <td class="right"><b><?php echo xlt('Location'); ?>:</b></td>
585 <td>
586 <textarea name="LOCATION2" id="LOCATION2" tabindex="35" class="count_HPI"><?php echo text($LOCATION2); ?></textarea>
587 </td>
588 <td><i><?php echo xlt('Where on your body does it occur?'); ?></i>
589 </td>
590 </tr>
591 <tr>
592 <td class="right"><b><?php echo xlt('Quality'); ?>:</b></td>
593 <td>
594 <textarea name="QUALITY2" id="QUALITY2" tabindex="36" class="count_HPI"><?php echo text($QUALITY2); ?></textarea>
596 </td><td>
597 <i><?php echo xlt('eg. aching, burning, radiating pain'); ?></i>
598 </td>
599 </tr>
600 <tr>
601 <td class="right"><b><?php echo xlt('Duration'); ?>:</b></td>
602 <td><textarea name="DURATION2" id="DURATION2" tabindex="37" class="count_HPI"><?php echo text($DURATION2); ?></textarea>
603 </td>
604 <td>
605 <i><?php echo xlt('How long does it last?'); ?></i>
606 </td>
607 </tr>
608 </table>
609 <center>
610 <i id="CODE_HIGH_2" name="CODE_HIGH" class="CODE_HIGH fa fa-check nodisplay" value="1"></i>
611 <span id="CODE_HELP_2">
612 <span class="detailed_HPI"><?php echo xlt('Detailed HPI') ?>:</span>
613 <span class="detail_4_elements"><?php echo xlt('> 3 HPI elements'); ?></span> <?php echo xlt('OR{{as in AND/OR, ie. not an abbreviation}}'); ?>
614 <span class="chronic_3_elements"><?php echo xlt('the status of three chronic/inactive problems'); ?></span>
615 </span>
616 </center>
617 </div>
618 <div id="tab3_HPI_text" class="tab_content">
619 <table>
620 <tr>
621 <td class="right"><b><?php echo xlt('Timing'); ?>:</b></td>
622 <td>
623 <textarea name="TIMING3" id="TIMING3" tabindex="30" class="count_HPI"><?php echo text($TIMING3); ?></textarea>
624 </td>
625 <td><i><?php echo xlt('When and how often?'); ?></i></td>
626 </tr>
627 <tr>
628 <td class="right"><b><?php echo xlt('Context'); ?>:</b></td>
629 <td>
630 <textarea name="CONTEXT3" id="CONTEXT3" tabindex="31" class="count_HPI"><?php echo text($CONTEXT3); ?></textarea>
631 </td>
632 <td><i><?php echo xlt('Does it occur in certain situations?'); ?></i></td>
633 </tr>
634 <tr>
635 <td class="right"><b><?php echo xlt('Severity'); ?>:</b></td>
636 <td>
637 <textarea name="SEVERITY3" id="SEVERITY3" tabindex="32" class="count_HPI"><?php echo text($SEVERITY3); ?></textarea>
638 </td>
639 <td><i><?php echo xlt('How bad is it? 0-10, mild, mod, severe?'); ?></i></td>
640 </tr>
641 <tr>
642 <td class="right"><b><?php echo xlt('Modifying'); ?>:</b></td>
643 <td>
644 <textarea name="MODIFY3" id="MODIFY3" tabindex="33" class="count_HPI"><?php echo text($MODIFY3); ?></textarea>
645 </td>
646 <td><i ><?php echo xlt('Does anything make it better? Worse?'); ?></i></td>
647 </tr>
648 <tr>
649 <td class="right"><b><?php echo xlt('Associated'); ?>:</b></td>
650 <td>
651 <textarea name="ASSOCIATED3" id="ASSOCIATED3" tabindex="34" class="count_HPI"><?php echo text($ASSOCIATED3); ?></textarea>
652 </td>
653 <td><i><?php echo xlt('Anything else occur at the same time?'); ?></i></td>
654 </tr>
655 <tr>
656 <td class="right"><b><?php echo xlt('Location'); ?>:</b></td>
657 <td>
658 <textarea name="LOCATION3" id="LOCATION3" tabindex="35" class="count_HPI"><?php echo text($LOCATION3); ?></textarea>
659 </td>
660 <td><i><?php echo xlt('Where on your body does it occur?'); ?></i>
661 </td>
662 </tr>
663 <tr>
664 <td class="right"><b><?php echo xlt('Quality'); ?>:</b></td>
665 <td>
666 <textarea name="QUALITY3" id="QUALITY3" tabindex="36" class="count_HPI"><?php echo text($QUALITY3); ?></textarea>
667 </td>
668 <td><i><?php echo xlt('eg. aching, burning, radiating pain'); ?></i></td>
669 </tr>
670 <tr>
671 <td class="right"><b><?php echo xlt('Duration'); ?>:</b></td>
672 <td>
673 <textarea name="DURATION3" id="DURATION3" tabindex="37" class="count_HPI"><?php echo text($DURATION3); ?></textarea>
674 </td>
675 <td><i><?php echo xlt('How long does it last?'); ?></i></td>
676 </tr>
677 </table>
678 <center>
679 <i id="CODE_HIGH_3" name="CODE_HIGH" class="CODE_HIGH fa fa-check nodisplay" value="1"></i>
680 <span ID="CODE_HELP_3">
681 <span class="detailed_HPI"><?php echo xlt('Detailed HPI') ?>:</span>
682 <span class="detail_4_elements"><?php echo xlt('> 3 HPI elements'); ?></span> <?php echo xlt('OR{{as in AND/OR, ie. not an abbreviation}}'); ?>
683 <span class="chronic_3_elements"><?php echo xlt('the status of three chronic/inactive problems'); ?></span>
684 </span>
685 </center>
686 </div>
687 </div>
688 </div>
689 </div>
690 </div>
691 <!-- end QP_HPI -->
692 </div>
693 <!-- end HPI Right -->
694 </div>
695 <!-- end HPI_section -->
696 <!-- start PMH_section -->
697 <div id="PMH_1" name="PMH_1" class="<?php echo attr($display_Add); ?> clear_both">
698 <span class="anchor" id="PMH_anchor"></span>
699 <!-- start PMH Left -->
700 <div id="PMH_left" name="PMH_left" class="exam_section_left borderShadow">
701 <div id="PMH_left_text" class="TEXT_class">
702 <b class="left"><?php echo xlt('PMSFH{{Abbreviation for Past medical Surgical Family and Social History}}'); ?>:</b> <i class="fa fa-help"></i><br />
703 <a class="closeButton_2 fa fa-list" title="<?php echo xla('Toggle the right-sided PMSFH panel'); ?>" id="right-panel-link" name="right-panel-link" href="#right-panel"></a>
704 <i class="closeButton_3 fa fa-paint-brush" title="<?php echo xla('Open/Close the PMH draw panel'); ?>" id="BUTTON_DRAW_PMH" name="BUTTON_DRAW_PMH"></i>
705 <i class="closeButton_4 fa fa-database" title="<?php echo xla('Open/Close the PMSFH panel'); ?>" id="BUTTON_QP_PMH" name="BUTTON_QP_PMH"></i>
706 <i class="closeButton_5 fa fa-user-md" name="Shorthand_kb" title="<?php echo xla("Open/Close the Shorthand Window and display Shorthand Codes"); ?>"></i>
707 <i class="closeButton fa fa-minus-circle" title="<?php echo xla('Minimize this panel'); ?>" id="BUTTON_TAB_PMH" name="BUTTON_TAB_PMH"></i>
709 <?php (($PMH_VIEW ?? null) != 2) ? ($display_PMH_view = "wide_textarea") : ($display_PMH_view = "narrow_textarea");?>
710 <?php ($display_PMH_view == "wide_textarea") ? ($marker = "fa-minus-square") : ($marker = "fa-plus-square");?>
711 <div id="PMSFH_sections" name="PMSFH_sections">
712 <div id="Enter_PMH" name="Enter_PMH" class="PMH_class">
713 <iframe id="iframe" name="iframe"
714 src="../../forms/eye_mag/a_issue.php?uniqueID=<?php echo attr_url($uniqueID); ?>&form_type=POH&pid=<?php echo attr_url($pid); ?>&encounter=<?php echo attr_url($encounter); ?>&form_id=<?php echo attr_url($form_id); ?>"
715 width="510" height="363" scrolling= "yes" frameBorder= "0" >
716 </iframe>
717 </div>
718 </div>
719 </div>
720 </div>
721 <!-- end PMH Left -->
722 <!-- start PMH Right -->
723 <div id="PMH_right" name="PMH_right" class="exam_section_right borderShadow">
724 <a class="nodisplay left_PMSFH_tab" id="right-panel-link" href="#right-panel">
725 <img src="<?php echo $GLOBALS['webroot']; ?>/interface/forms/eye_mag/images/PMSFHx.png">
726 </a>
727 <?php display_draw_section("PMH", $encounter, $pid); ?>
728 <div id="QP_PMH" name="QP_PMH" class="QP_class" style="max-height:100%">
729 <?php echo display_PRIOR_section("PMSFH", $id, $id, $pid); ?>
730 </div>
731 </div>
732 <!-- end PMH Right -->
733 </div>
734 <!-- end PMH_section -->
735 </div>
736 <!-- end HPI_PMH row -->
737 </div>
738 <!-- end first div -->
740 <div id="clinical_anchor" name="clinical_anchor" class="clear_both"></div>
741 <br />
743 <!-- start of the CLINICAL BOX -->
744 <?php
745 $display_W_1 = "nodisplay";
746 $display_W_2 = "nodisplay";
747 $display_W_3 = "nodisplay";
748 $display_W_4 = "nodisplay";
749 $RX_count = '1';
751 $query = "select * from form_eye_mag_wearing where PID=? and FORM_ID=? and ENCOUNTER=? ORDER BY RX_NUMBER";
752 $wear = sqlStatement($query, array($pid,$form_id,$encounter));
753 while ($wearing = sqlFetchArray($wear)) {
754 if (!empty($count_rx)) {
755 $count_rx++;
756 } else {
757 $count_rx = 1;
759 ${"display_W_$count_rx"} = '';
760 ${"ODSPH_$count_rx"} = $wearing['ODSPH'];
761 ${"ODCYL_$count_rx"} = $wearing['ODCYL'];
762 ${"ODAXIS_$count_rx"} = $wearing['ODAXIS'];
763 ${"OSSPH_$count_rx"} = $wearing['OSSPH'];
764 ${"OSCYL_$count_rx"} = $wearing['OSCYL'];
765 ${"OSAXIS_$count_rx"} = $wearing['OSAXIS'];
766 ${"ODMIDADD_$count_rx"} = $wearing['ODMIDADD'];
767 ${"OSMIDADD_$count_rx"} = $wearing['OSMIDADD'];
768 ${"ODADD_$count_rx"} = $wearing['ODADD'];
769 ${"OSADD_$count_rx"} = $wearing['OSADD'];
770 ${"ODVA_$count_rx"} = $wearing['ODVA'];
771 ${"OSVA_$count_rx"} = $wearing['OSVA'];
772 ${"ODNEARVA_$count_rx"} = $wearing['ODNEARVA'];
773 ${"OSNEARVA_$count_rx"} = $wearing['OSNEARVA'];
774 ${"ODPRISM_$count_rx"} = $wearing['ODPRISM'] ?? null;
775 ${"OSPRISM_$count_rx"} = $wearing['OSPRISM'] ?? null;
776 ${"W_$count_rx"} = '1';
777 ${"RX_TYPE_$count_rx"} = $wearing['RX_TYPE'];
778 ${"ODHPD_$count_rx"} = $wearing['ODHPD'];
779 ${"ODHBASE_$count_rx"} = $wearing['ODHBASE'];
780 ${"ODVPD_$count_rx"} = $wearing['ODVPD'];
781 ${"ODVBASE_$count_rx"} = $wearing['ODVBASE'];
782 ${"ODSLABOFF_$count_rx"} = $wearing['ODSLABOFF'];
783 ${"ODVERTEXDIST_$count_rx"} = $wearing['ODVERTEXDIST'];
784 ${"OSHPD_$count_rx"} = $wearing['OSHPD'];
785 ${"OSHBASE_$count_rx"} = $wearing['OSHBASE'];
786 ${"OSVPD_$count_rx"} = $wearing['OSVPD'];
787 ${"OSVBASE_$count_rx"} = $wearing['OSVBASE'];
788 ${"OSSLABOFF_$count_rx"} = $wearing['OSSLABOFF'];
789 ${"OSVERTEXDIST_$count_rx"} = $wearing['OSVERTEXDIST'];
790 ${"ODMPDD_$count_rx"} = $wearing['ODMPDD'];
791 ${"ODMPDN_$count_rx"} = $wearing['ODMPDN'];
792 ${"OSMPDD_$count_rx"} = $wearing['OSMPDD'];
793 ${"OSMPDN_$count_rx"} = $wearing['OSMPDN'];
794 ${"BPDD_$count_rx"} = $wearing['BPDD'];
795 ${"BPDN_$count_rx"} = $wearing['BPDN'];
796 ${"LENS_MATERIAL_$count_rx"} = $wearing['LENS_MATERIAL'];
797 ${"LENS_TREATMENTS_$count_rx"} = $wearing['LENS_TREATMENTS'];
798 ${"COMMENTS_$count_rx"} = $wearing['COMMENTS'];
801 <div class="loading" id="LayerTechnical_sections_loading" name="LayerTechnical_sections_loading"><i class="fa fa-spinner fa-spin"></i>
802 </div>
803 <div class="clear_both row" id="LayerTechnical_sections_1" name="LayerTechnical_sections" >
804 <!-- start of the Mood BOX -->
805 <div id="LayerMood" class="vitals">
806 <div id="Lyr2.9" class="top_left">
807 <th class="text_clinical" nowrap><b id="MS_tab"><?php echo xlt('Mental Status'); ?>:</b></th>
808 </div>
809 <br />
810 <input type="checkbox" name="alert" id="alert" <?php if ($alert) {
811 echo "checked='checked'";
812 } ?> value="1">
813 <label for="alert" class="input-helper input-helper--checkbox"><?php echo xlt('Alert{{Mental Status}}'); ?></label><br />
814 <input type="checkbox" name="oriented" id="oriented" <?php if ($oriented) {
815 echo "checked='checked'";
816 } ?> value="1">
817 <label for="oriented" class="input-helper input-helper--checkbox"><?php echo xlt('Oriented TPP{{oriented to person and place}}'); ?></label><br />
818 <input type="checkbox" name="confused" id="confused" <?php if ($confused) {
819 echo "checked='checked'";
820 } ?> value="1">
821 <label for="confused" class="input-helper input-helper--checkbox"><?php echo xlt('Mood/Affect Nml{{Mood and affect normal}}'); ?></label><br />
823 </div>
824 <!-- end of the Mood BOX -->
826 <!-- start of the VISION BOX -->
827 <div id="LayerVision" class="vitals">
828 <div id="Lyr30" class="top_left">
829 <th class="text_clinical"><b id="vision_tab" title="Show/hide the refraction panels"><?php echo xlt('Vision'); ?>:</b></th>
830 </div>
831 <?php
832 //if the prefs show a field, ie visible, the highlight the zone.
833 if (($W ?? null) == '1') {
834 $button_W = "buttonRefraction_selected";
837 if (($MR ?? null) == '1') {
838 $button_MR = "buttonRefraction_selected";
841 if (($CR ?? null) == '1') {
842 $button_AR = "buttonRefraction_selected";
845 if (($CTL ?? null) == '1') {
846 $button_CTL = "buttonRefraction_selected";
849 if (($ADDITIONAL ?? null) == '1') {
850 $button_ADDITIONAL = "buttonRefraction_selected";
853 if (($VAX ?? null) == '1') {
854 $button_VAX = "buttonRefraction_selected";
856 if (($RXHX ?? null) == '1') {
857 $button_RXHX = "buttonRefraction_selected";
860 <div class="top_right">
861 <span id="tabs">
862 <ul>
863 <li id="LayerVision_RXHX_lightswitch" class="<?php echo attr($button_RXHX ?? ''); ?>" value="Prior Refractions" title="<?php echo xla("Show the last three Refractions"); ?>"><?php echo xlt('R{{History of Refraction}}'); ?></li> |
864 <li id="LayerVision_W_lightswitch" class="<?php echo attr($button_W ?? ''); ?>" value="Current" title="<?php echo xla("Display the patient's current glasses"); ?>"><?php echo xlt('W{{Current Rx - wearing}}'); ?></li> |
865 <li id="LayerVision_MR_lightswitch" class="<?php echo attr($button_MR ?? ''); ?>" value="Auto" title="<?php echo xla("Display the Manifest Refraction panel"); ?>"><?php echo xlt('MR{{Manifest Refraction}}'); ?></li> |
866 <li id="LayerVision_CR_lightswitch" class="<?php echo attr($button_AR ?? ''); ?>" value="Cyclo" title="<?php echo xla("Display the Autorefraction Panel"); ?>"><?php echo xlt('AR{{autorefraction}}'); ?></li> |
867 <li id="LayerVision_CTL_lightswitch" class="<?php echo attr($button_CTL ?? ''); ?>" value="Contact Lens" title="<?php echo xla("Display the Contact Lens Panel"); ?>"><?php echo xlt('CTL{{Contact Lens}}'); ?></li> |
868 <li id="LayerVision_ADDITIONAL_lightswitch" class="<?php echo attr($button_ADDITIONAL ?? ''); ?>" value="Additional" title="<?php echo xla("Display Additional measurements (Ks, IOL cals, etc)"); ?>"><?php echo xlt('Add.{{Additional Measurements}}'); ?></li> |
869 <li id="LayerVision_VAX_lightswitch" class="<?php echo attr($button_VAX ?? ''); ?>" value="Visual Acuities" title="<?php echo xla("Summary of Acuities for this patient"); ?>"><?php echo xlt('Va{{Visual Acuities}}'); ?></li>
870 </ul>
871 </span>
872 </div>
874 <div id="Lyr31">
875 <?php echo xlt('V{{One letter abbrevation for Vision}}'); ?>
876 </div>
877 <div id="Visions_A" name="Visions_A">
878 <b>OD</b>
879 <input type="TEXT" tabindex="40" id="SCODVA" name="SCODVA" value="<?php echo attr($SCODVA); ?>">
880 <input type="TEXT" tabindex="42" id="ODVA_1_copy" name="ODVA_1_copy" value="<?php echo attr($ODVA_1 ?? ''); ?>">
881 <input type="TEXT" tabindex="44" id="PHODVA_copy" name="PHODVA_copy" value="<?php echo attr($PHODVA ?? ''); ?>">
882 <br />
883 <b>OS</b>
884 <input type="TEXT" tabindex="41" id="SCOSVA" name="SCOSVA" value="<?php echo attr($SCOSVA ?? ''); ?>">
885 <input type="TEXT" tabindex="43" id="OSVA_1_copy" name="OSVA_1_copy" value="<?php echo attr($OSVA_1 ?? ''); ?>">
886 <input type="TEXT" tabindex="45" id="PHOSVA_copy" name="PHOSVA_copy" value="<?php echo attr($PHOSVA ?? ''); ?>">
887 <br />
888 <span id="more_visions_1" name="more_visions_1"><b><?php echo xlt('Acuity'); ?></b> </span>
889 <span><b><?php echo xlt('SC{{without correction}}'); ?></b></span>
890 <span><b><?php echo xlt('CC{{with correction}}'); ?></b></span>
891 <span><b><?php echo xlt('PH{{pinhole acuity}}'); ?></b></span>
892 </div>
893 <div id="Visions_B" name="Visions_B" class="nodisplay">
894 <b><?php echo xlt('OD'); ?> </b>
895 <input type="TEXT" tabindex="46" id="ARODVA_copy" name="ARODVA_copy" value="<?php echo attr($ARODVA); ?>">
896 <input type="TEXT" tabindex="48" id="MRODVA_copy" name="MRODVA_copy" value="<?php echo attr($MRODVA); ?>">
897 <input type="TEXT" tabindex="50" id="CRODVA_copy" name="CRODVA_copy" value="<?php echo attr($CRODVA); ?>">
898 <br />
899 <b><?php echo xlt('OS'); ?> </b>
900 <input type="TEXT" tabindex="47" id="AROSVA_copy" name="AROSVA_copy" value="<?php echo attr($AROSVA); ?>">
901 <input type="TEXT" tabindex="49" id="MROSVA_copy" name="MROSVA_copy" value="<?php echo attr($MROSVA); ?>">
902 <input type="TEXT" tabindex="51" id="CROSVA_copy" name="CROSVA_copy" value="<?php echo attr($CROSVA); ?>">
903 <br />
904 <span id="more_visions_2" name="more_visions_2"><b><?php echo xlt('Acuity'); ?></b> </span>
905 <span><b><?php echo xlt('AR{{Autorefraction Acuity}}'); ?></b></span>
906 <span><b><?php echo xlt('MR{{Manifest Refraction}}'); ?></b></span>
907 <span><b><?php echo xlt('CR{{Cycloplegic Refraction}}'); ?></b></span>
908 </div>
909 </div>
910 <!-- end of the VISION BOX -->
912 <!-- START OF THE PRESSURE BOX -->
913 <div id="LayerTension" class="vitals">
915 <span title="Display the Glaucoma Flow Sheet" id="LayerVision_IOP_lightswitch" name="LayerVision_IOP_lightswitch" class="closeButton fa fa-chart-line" id="IOP_Graph" name="IOP_Graph"></span>
916 <!-- -->
917 <div id="Lyr40">
918 <span class="top_left">
919 <b id="tension_tab"><?php echo xlt('Tension'); ?>:</b>
920 <div>
921 <?php
922 if (($IOPTIME == '00:00:00') || (!$IOPTIME)) {
923 $IOPTIME = date('G:i A');
926 $show_IOPTIME = date('g:i A', strtotime($IOPTIME));
928 <input type="text" name="IOPTIME" id="IOPTIME" tabindex="-1" value="<?php echo attr($show_IOPTIME); ?>">
930 </div>
931 </span>
932 </div>
933 <div id="Lyr41">
934 <?php echo xlt('T{{one letter abbreviation for Tension/Pressure}}'); ?>
935 </div>
936 <div id="Lyr42">
937 <b><?php echo xlt('OD{{right eye}}'); ?></b>
938 <input type="text" tabindex="52" name="ODIOPAP" id="ODIOPAP" value="<?php echo attr($ODIOPAP); ?>">
939 <input type="text" tabindex="54" name="ODIOPTPN" id="ODIOPTPN" value="<?php echo attr($ODIOPTPN); ?>">
940 <input type="text" name="ODIOPFTN" id="ODIOPFTN" value="<?php echo attr($ODIOPFTN); ?>">
941 <br />
942 <b><?php echo xlt('OS{{left eye}}'); ?> </b>
943 <input type="text" tabindex="53" name="OSIOPAP" id="OSIOPAP" value="<?php echo attr($OSIOPAP); ?>">
944 <input type="text" tabindex="55" name="OSIOPTPN" id="OSIOPTPN" value="<?php echo attr($OSIOPTPN); ?>">
945 <input type="text" name="OSIOPFTN" id="OSIOPFTN" value="<?php echo attr($OSIOPFTN); ?>">
946 <br /><br />
947 <span name="IOP_AP"><b><?php echo xlt('AP{{applanation}}'); ?></b></span>
948 <span name="IOP_TPN"><b><?php echo xlt('TP{{tonopen}}'); ?></b></span>
949 <span name="IOP_FT"><b><?php echo xlt('FT{{finger tension}}'); ?></b></span>
950 </div>
951 </div>
952 <!-- END OF THE PRESSURE BOX -->
954 <!-- start of the Amsler box -->
955 <div id="LayerAmsler" class="vitals">
956 <div id="Lyr50">
957 <span class="top_left">
958 <b><?php echo xlt('Amsler'); ?>:</b>
959 </span>
960 </div>
961 <?php
962 if (!$AMSLEROD) {
963 $AMSLEROD = "0";
966 if (!$AMSLEROS) {
967 $AMSLEROS = "0";
970 if ($AMSLEROD || $AMSLEROS) {
971 $checked = 'value="0"';
972 } else {
973 $checked = 'value="1" checked';
977 <input type="hidden" id="AMSLEROD" name="AMSLEROD" value='<?php echo attr($AMSLEROD); ?>'>
978 <input type="hidden" id="AMSLEROS" name="AMSLEROS" value='<?php echo attr($AMSLEROS); ?>'>
980 <div id="Lyr501">
981 <label for="Amsler-Normal" class="input-helper input-helper--checkbox"><?php echo xlt('Normal'); ?></label>
982 <input id="Amsler-Normal" type="checkbox" <?php echo attr($checked); ?> tabindex="56">
983 </div>
984 <div id="Lyr51">
985 <table cellpadding=0 cellspacing=0>
986 <tr>
987 <td colspan=3 class="center"><b><?php echo xlt('OD{{right eye}}'); ?></b>
988 </td>
989 <td></td>
990 <td colspan=3 class="center"><b><?php echo xlt('OS{{left eye}}'); ?></b>
991 </td>
992 </tr>
994 <tr>
995 <td colspan=3>
996 <img src="../../forms/<?php echo $form_folder; ?>/images/Amsler_<?php echo attr($AMSLEROD); ?>.jpg" id="AmslerOD" /></td>
997 <td></td>
998 <td colspan=3>
999 <img src="../../forms/<?php echo $form_folder; ?>/images/Amsler_<?php echo attr($AMSLEROS); ?>.jpg" id="AmslerOS" />
1000 </td>
1001 </tr>
1002 <tr>
1003 <td colspan=3 class="center">
1004 <div class="AmslerValue">
1005 <span id="AmslerODvalue"><?php echo text($AMSLEROD); ?></span>/5
1006 </div>
1007 </td>
1008 <td></td>
1009 <td colspan=3 style="text-align:center;">
1010 <div class="AmslerValue">
1011 <span id="AmslerOSvalue"><?php echo text($AMSLEROS); ?></span>/5
1012 </div>
1013 </td>
1014 </tr>
1015 </table>
1016 </div>
1017 </div>
1018 <!-- end of the Amsler box -->
1020 <!-- start of the Fields box -->
1021 <div id="LayerFields" class="vitals">
1022 <div>
1023 <span class="top_left"><b id="fields"><?php echo xlt('Fields{{visual fields}}'); ?>:</b></span>
1024 </div>
1025 <?php
1026 // if the VF zone is checked, display it
1027 // if ODVF1 = 1 (true boolean) the value="0" checked="true"
1028 $bad = 0;
1029 for ($z = 1; $z < 5; $z++) {
1030 $ODzone = "ODVF" . $z;
1031 if ($$ODzone == '1') {
1032 $ODVF[$z] = 'checked value=1';
1033 $bad++;
1034 } else {
1035 $ODVF[$z] = 'value=0';
1038 $OSzone = "OSVF" . $z;
1039 if ($$OSzone == "1") {
1040 $OSVF[$z] = 'checked value=1';
1041 $bad++;
1042 } else {
1043 $OSVF[$z] = 'value=0';
1047 if (!$bad) {
1048 $VFFTCF = "checked";
1051 <div id="Lyr60">
1052 <label for="FieldsNormal" class="input-helper input-helper--checkbox"><?php echo xlt('FTCF{{Full to count fingers}}'); ?></label>
1053 <input id="FieldsNormal" type="checkbox" value="1" <?php echo attr($VFFTCF ?? ''); ?>>
1054 </div>
1055 <div id="Lyr511">
1056 <table cellpadding="1" cellspacing="1">
1057 <tr>
1058 <td class="center" colspan="2"><b><?php echo xlt('OD{{right eye}}'); ?></b><br /></td>
1059 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
1060 <td class="center" colspan="2"><b><?php echo xlt('OS{{left eye}}'); ?></b></td>
1061 </tr>
1062 <tr>
1063 <td class="VF_1">
1064 <input name="ODVF1" id="ODVF1" type="checkbox" <?php echo attr($ODVF['1'])?> class="hidden">
1065 <label for="ODVF1" class="input-helper input-helper--checkbox boxed"></label>
1066 </td>
1067 <td class="VF_2">
1068 <input name="ODVF2" id="ODVF2" type="checkbox" <?php echo attr($ODVF['2'])?> class="hidden">
1069 <label for="ODVF2" class="input-helper input-helper--checkbox boxed"></label>
1070 </td>
1071 <td></td>
1072 <td class="VF_1">
1073 <input name="OSVF1" id="OSVF1" type="checkbox" <?php echo attr($OSVF['1']); ?> class="hidden" >
1074 <label for="OSVF1" class="input-helper input-helper--checkbox boxed"></label>
1075 </td>
1076 <td class="VF_2">
1077 <input name="OSVF2" id="OSVF2" type="checkbox" <?php echo attr($OSVF['2']); ?> class="hidden">
1078 <label for="OSVF2" class="input-helper input-helper--checkbox boxed"> </label>
1079 </td>
1080 </tr>
1081 <tr>
1082 <td class="VF_3">
1083 <input name="ODVF3" id="ODVF3" type="checkbox" class="hidden" <?php echo attr($ODVF['3']); ?>>
1084 <label for="ODVF3" class="input-helper input-helper--checkbox boxed"></label>
1085 </td>
1086 <td class="VF_4">
1087 <input name="ODVF4" id="ODVF4" type="checkbox" class="hidden" <?php echo attr($ODVF['4']); ?>>
1088 <label for="ODVF4" class="input-helper input-helper--checkbox boxed"></label>
1089 </td>
1090 <td></td>
1091 <td class="VF_3">
1092 <input name="OSVF3" id="OSVF3" type="checkbox" class="hidden" <?php echo attr($OSVF['3']); ?>>
1093 <label for="OSVF3" class="input-helper input-helper--checkbox boxed"></label>
1094 </td>
1095 <td class="VF_4">
1096 <input name="OSVF4" id="OSVF4" type="checkbox" class="hidden" <?php echo attr($OSVF['4']); ?>>
1097 <label for="OSVF4" class="input-helper input-helper--checkbox boxed"></label>
1098 </td>
1099 </tr>
1100 </table>
1101 </div>
1102 </div>
1103 <!-- end of the Fields box -->
1105 <!-- start of the Pupils box -->
1106 <div id="LayerPupils" class="vitals">
1107 <span class="top_left"><b id="pupils"><?php echo xlt('Pupils'); ?>:</b> </span>
1108 <div id="Lyr701">
1109 <label for="PUPIL_NORMAL" class="input-helper input-helper--checkbox"><?php echo xlt('Normal'); ?></label>
1110 <input id="PUPIL_NORMAL" name="PUPIL_NORMAL" type="checkbox" <?php if ($PUPIL_NORMAL == '1') {
1111 echo 'checked="checked" value="1"';
1112 } ?>>
1113 </div>
1114 <div id="Lyr70">
1115 <table>
1116 <tr>
1117 <th> &nbsp;
1118 </th>
1119 <th><?php echo xlt('size'); ?> (<?php echo xlt('mm{{millimeters}}'); ?>)
1120 </th>
1121 <th><?php echo xlt('react{{reactivity}}'); ?>
1122 </th>
1123 <th><?php echo xlt('APD{{afferent pupillary defect}}'); ?>
1124 </th>
1125 </tr>
1126 <tr>
1127 <td><b><?php echo xlt('OD{{right eye}}'); ?></b>
1128 </td>
1129 <td class="pupil_1">
1130 <input type="text" id="ODPUPILSIZE1" name="ODPUPILSIZE1" value="<?php echo attr($ODPUPILSIZE1); ?>">
1131 <font>&#8594;</font>
1132 <input type="text" id="ODPUPILSIZE2" size="1" name="ODPUPILSIZE2" value="<?php echo attr($ODPUPILSIZE2); ?>">
1133 </td>
1134 <td class="pupil_2">
1135 <input type="text" class="pupil_input_2" name='ODPUPILREACTIVITY' id='ODPUPILREACTIVITY' value='<?php echo attr($ODPUPILREACTIVITY); ?>'>
1136 </td>
1137 <td class="pupil_3">
1138 <input type="text" class="pupil_input_2" name="ODAPD" id='ODAPD' value='<?php echo attr($ODAPD); ?>'>
1139 </td>
1140 </tr>
1141 <tr>
1142 <td><b><?php echo xlt('OS{{left eye}}'); ?></b>
1143 </td>
1144 <td class="pupil_4">
1145 <input type="text" size="1" name="OSPUPILSIZE1" id="OSPUPILSIZE1" class="pupil_input" value="<?php echo attr($OSPUPILSIZE1); ?>">
1146 <font>&#8594;</font>
1147 <input type="text" size="1" name="OSPUPILSIZE2" id="OSPUPILSIZE2" class="pupil_input" value="<?php echo attr($OSPUPILSIZE2); ?>">
1148 </td>
1149 <td class="pupil_5">
1150 <input type="text" class="pupil_input_2" name='OSPUPILREACTIVITY' id='OSPUPILREACTIVITY' value="<?php echo attr($OSPUPILREACTIVITY); ?>">
1151 </td>
1152 <td class="pupil_6">
1153 <input type="text" class="pupil_input_2" name="OSAPD" id="OSAPD" value='<?php echo attr($OSAPD); ?>'>
1154 </td>
1155 </tr>
1156 </table>
1157 </div>
1158 </div>
1159 <!-- end of the Pupils box -->
1161 <br />
1163 <!-- start of slide down pupils_panel -->
1164 <?php (($DIMODPUPILSIZE ?? '') != '') ? ($display_dim_pupils_panel = "display") : ($display_dim_pupils_panel = "nodisplay"); ?>
1165 <div id="dim_pupils_panel" name="dim_pupils_panel" class="vitals <?php echo attr($display_dim_pupils_panel); ?>">
1166 <span class="top_left"><b id="pupils_DIM"><?php echo xlt('Pupils') ?>: <?php echo xlt('Dim'); ?></b> </span>
1167 <div id="Lyr71">
1168 <table>
1169 <tr>
1170 <th></th>
1171 <th><?php echo xlt('size'); ?> (<?php echo xlt('mm{{millimeters}}'); ?>)</th>
1172 </tr>
1173 <tr>
1174 <td><b><?php echo xlt('OD{{right eye}}'); ?></b>
1175 </td>
1176 <td claa="border-bottom">
1177 <input type="text" id ="DIMODPUPILSIZE1" name="DIMODPUPILSIZE1" value='<?php echo attr($DIMODPUPILSIZE1); ?>'>
1178 <font>&#8594;</font>
1179 <input type="text" id ="DIMODPUPILSIZE2"name="DIMODPUPILSIZE2" value='<?php echo attr($DIMODPUPILSIZE2); ?>'>
1180 </td>
1181 </tr>
1182 <tr>
1183 <td ><b><?php echo xlt('OS{{left eye}}'); ?></b>
1184 </td>
1185 <td class="border-top">
1186 <input type="text" name="DIMOSPUPILSIZE1" id="DIMOSPUPILSIZE1" value="<?php echo attr($DIMOSPUPILSIZE1); ?>">
1187 <font>&#8594;</font>
1188 <input type="text" name="DIMOSPUPILSIZE2" id="DIMOSPUPILSIZE2" value="<?php echo attr($DIMOSPUPILSIZE2); ?>">
1189 </td>
1190 </tr>
1191 </table>
1192 </div>
1193 <div class="pupil_dim_comments">
1194 <b><?php echo xlt('Comments'); ?>:</b><br />
1195 <textarea id="PUPIL_COMMENTS" name="PUPIL_COMMENTS"><?php echo text($PUPIL_COMMENTS); ?></textarea>
1196 </div>
1197 </div>
1198 <!-- end of slide down pupils_panel -->
1199 </div>
1200 <!-- end of the CLINICAL BOX -->
1202 <!-- start IOP chart section -->
1203 <?php (($IOP ?? null) == 1) ? ($display_IOP = "") : ($display_IOP = "nodisplay"); ?>
1204 <div id="LayerVision_IOP" class="borderShadow <?php echo $display_IOP; ?>">
1205 <?php echo display_GlaucomaFlowSheet($pid); ?>
1206 </div>
1207 <!-- end IOP chart section -->
1209 <!-- start of the refraction box -->
1210 <span class="anchor" id="REFRACTION_anchor"></span>
1211 <div class="loading" id="EXAM_sections_loading" name="REFRACTION_sections_loading"><i class="fa fa-spinner fa-spin"></i></div>
1212 <div id="REFRACTION_sections" name="REFRACTION_sections" class="row nodisplay clear_both">
1213 <div id="LayerVision2">
1214 <?php (($RXHX ?? null) == 1) ? ($display_Add = "") : ($display_Add = "nodisplay"); ?>
1215 <div id="LayerVision_RXHX" class="refraction borderShadow old_refractions ui-draggable ui-draggable-handle <?php echo $display_Add; ?>">
1216 <span title="<?php echo attr('Close this panel and make this a Preference to stay closed'); ?>" class="closeButton fa fa-times" id="Close_RXHX" name="Close_RXHX"></span>
1217 <table class="GFS_table">
1218 <tr>
1219 <th class="text-center"><?php echo xlt('Prior Refractions'); ?></th>
1220 </tr>
1221 </table>
1224 <div id="PRIORS_REFRACTIONS_left_text" name="PRIORS_REFRACTIONS_left_text">
1225 <?php
1226 $sql = "SELECT id FROM form_eye_acuity WHERE
1227 pid=? AND id < ? AND
1228 ( MRODVA <> '' OR
1229 MROSVA <> '' OR
1230 ARODVA <> '' OR
1231 AROSVA <> '' OR
1232 CRODVA <> '' OR
1233 CROSVA <> '' OR
1234 CTLODVA <> '' OR
1235 CTLOSVA <> ''
1237 ORDER BY id DESC LIMIT 3";
1238 $result = sqlStatement($sql, array($pid, $id));
1239 while ($visit = sqlFetchArray($result)) {
1240 echo display_PRIOR_section('REFRACTIONS', $visit['id'], $visit['id'], $pid);
1242 //display_PRIOR_section('REFRACTIONS', $id, $id, $pid, '1');
1244 </div>
1246 </div>
1247 <?php
1248 (($W ?? null) == 1) ? ($display_W = "") : ($display_W = "nodisplay");
1249 (($W_width ?? null) == '1') ? ($display_W_width = "refraction_wide") : ($display_W_width = "");
1251 <div id="LayerVision_W" class="<?php echo $display_W; ?> ">
1252 <input type="hidden" id="W_1" name="W_1" value="1">
1253 <div id="LayerVision_W_1" name="currentRX" class="refraction current_W borderShadow <?php echo $display_W_width; ?>">
1254 <i class="closeButton fa fa-times" id="Close_W_1" name="Close_W_1"
1255 title="<?php echo xla('Close All Current Rx Panels and make this a Preference to stay closed'); ?>"></i>
1256 <i class="closeButton_2 fas fa-arrows-alt-h" id="W_width_display_1" name="W_width_display"
1257 title="<?php echo xla("Rx Details"); ?>" ></i>
1258 <i onclick="top.restoreSession(); doscript('W','<?php echo attr($pid); ?>','<?php echo attr($encounter); ?>','1'); return false;"
1259 title="<?php echo xla("Dispense this Rx"); ?>" class="closeButton_3 fa fa-print"></i>
1260 <i onclick="top.restoreSession(); dispensed('<?php echo attr($pid); ?>');return false;"
1261 title="<?php echo xla("List of previously dispensed Spectacle and Contact Lens Rxs"); ?>" class="closeButton_4 fa fa-list-ul"></i>
1262 <table id="wearing_1">
1263 <tr>
1264 <th colspan="7"><?php echo xlt('Current Glasses'); ?>: #1
1265 <i id="Add_Glasses" name="Add_Glasses" class="button btn"><?php echo xlt('Additonal Rx{{Additional glasses}}'); ?></i>
1266 </th>
1267 </tr>
1268 <tr>
1269 <td>&nbsp;</td>
1270 <td><i class="fa fa-gamepad" name="reverseme" title="<?php echo xla('Convert between plus and minus cylinder'); ?>" aria-hidden="true" id="revW1" ></i></td>
1271 <td><?php echo xlt('Sph{{Sphere}}'); ?></td>
1272 <td><?php echo xlt('Cyl{{Cylinder}}'); ?></td>
1273 <td><?php echo xlt('Axis{{Axis of a glasses prescription}}'); ?></td>
1274 <td><?php echo xlt('Acuity'); ?></td>
1275 <td name="W_wide"></td>
1276 <td name="W_wide" title="<?php echo xla('Horizontal Prism Power'); ?>"><?php echo xlt('HP{{abbreviation for Horizontal Prism Power}}'); ?></td>
1277 <td name="W_wide" title="<?php echo xla('Horizontal Prism Base'); ?>"><?php echo xlt('HB{{abbreviation for Horizontal Prism Base}}'); ?></td>
1278 <td name="W_wide" title="<?php echo xla('Vertical Prism Power'); ?>"><?php echo xlt('VP{{abbreviation for Vertical Prism Power}}'); ?></td>
1279 <td name="W_wide" title="<?php echo xla('Vertical Prism Base'); ?>"><?php echo xlt('VB{{abbreviation for Vertical Prism Base}}'); ?></td>
1280 <td name="W_wide" title="<?php echo xla('Slab Off'); ?>"><?php echo xlt('Slab Off'); ?></td>
1281 <td name="W_wide" title="<?php echo xla('Vertex Distance'); ?>"><?php echo xlt('VD{{abbreviation for Vertex Distance}}'); ?></td>
1282 <td name="W_wide" title="<?php echo xla('Monocular Pupillary Diameter - Distance'); ?>"><?php echo xlt('MPD-D{{abbreviation for Monocular Pupillary Diameter - Distance}}'); ?></td>
1283 <td name="W_wide" title="<?php echo xla('Monocular Pupillary Diameter - Near'); ?>"><?php echo xlt('MPD-N{{abbreviation for Monocular Pupillary Diameter - Near}}'); ?></td>
1285 <td rowspan="6" class="right">
1286 <span class="underline bold"><?php echo xlt('Rx Type{{Type of glasses prescription}}'); ?></span><br />
1287 <label for="Single_1" class="input-helper input-helper--checkbox"><?php echo xlt('Single'); ?></label>
1288 <input type="radio" value="0" id="Single_1" name="RX_TYPE_1" <?php if (($RX_TYPE_1 ?? null) == '0') {
1289 echo 'checked="checked"';
1290 } ?> /></span><br />
1291 <label for="Bifocal_1" class="input-helper input-helper--checkbox"><?php echo xlt('Bifocal'); ?></label>
1292 <input type="radio" value="1" id="Bifocal_1" name="RX_TYPE_1" <?php if (($RX_TYPE_1 ?? null) == '1') {
1293 echo 'checked="checked"';
1294 } ?> /></span><br />
1295 <label for="Trifocal_1" class="input-helper input-helper--checkbox"><?php echo xlt('Trifocal'); ?></label>
1296 <input type="radio" value="2" id="Trifocal_1" name="RX_TYPE_1" <?php if (($RX_TYPE_1 ?? null) == '2') {
1297 echo 'checked="checked"';
1298 } ?> /></span><br />
1299 <label for="Progressive_1" class="input-helper input-helper--checkbox"><?php echo xlt('Prog.{{Progressive lenses}}'); ?></label>
1300 <input type="radio" value="3" id="Progressive_1" name="RX_TYPE_1" <?php if (($RX_TYPE_1 ?? null) == '3') {
1301 echo 'checked="checked"';
1302 } ?> /></span><br />
1303 </td>
1304 </tr>
1305 <tr>
1306 <td rowspan="2"><?php echo xlt('Dist{{distance}}'); ?></td>
1307 <td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1308 <td><input type="text" class="sphere" id="ODSPH_1" name="ODSPH_1" value="<?php echo attr($ODSPH_1 ?? ''); ?>" tabindex="100"></td>
1309 <td><input type="text" class="cylinder" id="ODCYL_1" name="ODCYL_1" value="<?php echo attr($ODCYL_1 ?? ''); ?>" tabindex="101"></td>
1310 <td><input type="text" class="axis" id="ODAXIS_1" name="ODAXIS_1" value="<?php echo attr($ODAXIS_1 ?? ''); ?>" tabindex="102"></td>
1311 <td><input type="text" class="acuity" id="ODVA_1" name="ODVA_1" value="<?php echo attr($ODVA_1 ?? ''); ?>" tabindex="108"></td>
1313 <td name="W_wide"></td>
1314 <td name="W_wide"><input type="text" class="prism" id="ODHPD_1" name="ODHPD_1" value="<?php echo attr($ODHPD_1 ?? ''); ?>" tabindex="122"></td>
1315 <td name="W_wide"><input type="text" class="prism" id="ODHBASE_1" name="ODHBASE_1" value="<?php echo attr($ODHBASE_1 ?? ''); ?>" tabindex="124"></td>
1316 <td name="W_wide"><input type="text" class="prism" id="ODVPD_1" name="ODVPD_1" value="<?php echo attr($ODVPD_1 ?? ''); ?>" tabindex="126"></td>
1317 <td name="W_wide"><input type="text" class="prism" id="ODVBASE_1" name="ODVBASE_1" value="<?php echo attr($ODVBASE_1 ?? ''); ?>" tabindex="128"></td>
1318 <td name="W_wide"><input type="text" class="prism" id="ODSLABOFF_1" name="ODSLABOFF_1" value="<?php echo attr($ODSLABOFF_1 ?? ''); ?>" tabindex="130"></td>
1319 <td name="W_wide"><input type="text" class="prism" id="ODVERTEXDIST_1" name="ODVERTEXDIST_1" value="<?php echo attr($ODVERTEXDIST_1 ?? ''); ?>" tabindex="132"></td>
1320 <td name="W_wide"><input type="text" class="prism" id="ODMPDD_1" name="ODMPDD_1" value="<?php echo attr($ODMPDD_1 ?? ''); ?>" tabindex="134"></td>
1321 <td name="W_wide"><input type="text" class="prism" id="ODMPDN_1" name="ODMPDN_1" value="<?php echo attr($ODMPDN_1 ?? ''); ?>" tabindex="136"></td>
1322 </tr>
1323 <tr>
1324 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1325 <td><input type="text" class="sphere" id="OSSPH_1" name="OSSPH_1" value="<?php echo attr($OSSPH_1 ?? ''); ?>" tabindex="103"></td>
1326 <td><input type="text" class="cylinder" id="OSCYL_1" name="OSCYL_1" value="<?php echo attr($OSCYL_1 ?? ''); ?>" tabindex="104"></td>
1327 <td><input type="text" class="axis" id="OSAXIS_1" name="OSAXIS_1" value="<?php echo attr($OSAXIS_1 ?? ''); ?>" tabindex="105"></td>
1328 <td><input type="text" class="acuity" id="OSVA_1" name="OSVA_1" value="<?php echo attr($OSVA_1 ?? ''); ?>" tabindex="109"></td>
1330 <td name="W_wide"></td>
1331 <td name="W_wide"><input type="text" class="prism" id="OSHPD_1" name="OSHPD_1" value="<?php echo attr($OSHPD_1 ?? ''); ?>" tabindex="123"></td>
1332 <td name="W_wide"><input type="text" class="prism" id="OSHBASE_1" name="OSHBASE_1" value="<?php echo attr($OSHBASE_1 ?? ''); ?>" tabindex="125"></td>
1333 <td name="W_wide"><input type="text" class="prism" id="OSVPD_1" name="OSVPD_1" value="<?php echo attr($OSVPD_1 ?? ''); ?>" tabindex="127"></td>
1334 <td name="W_wide"><input type="text" class="prism" id="OSVBASE_1" name="OSVBASE_1" value="<?php echo attr($OSVBASE_1 ?? ''); ?>" tabindex="129"></td>
1335 <td name="W_wide"><input type="text" class="prism" id="OSSLABOFF_1" name="OSSLABOFF_1" value="<?php echo attr($OSSLABOFF_1 ?? ''); ?>" tabindex="131"></td>
1336 <td name="W_wide"><input type="text" class="prism" id="OSVERTEXDIST_1" name="OSVERTEXDIST_1" value="<?php echo attr($OSVERTEXDIST_1 ?? ''); ?>" tabindex="133"></td>
1337 <td name="W_wide"><input type="text" class="prism" id="OSMPDD_1" name="OSMPDD_1" value="<?php echo attr($OSMPDD_1 ?? ''); ?>" tabindex="135"></td>
1338 <td name="W_wide"><input type="text" class="prism" id="OSMPDN_1" name="OSMPDN_1" value="<?php echo attr($OSMPDN_1 ?? ''); ?>" tabindex="137"></td>
1339 </tr>
1340 <tr class="WNEAR">
1341 <td rowspan=2><?php echo xlt('Mid{{middle Rx strength}}'); ?>/<br /><?php echo xlt('Near'); ?></td>
1342 <td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1343 <?php echo '<input type="hidden" name="RXStart_1" id="RXStart_1" value="' . ($RX_TYPE_1 ?? '') . '">'; ?>
1344 <td class="WMid"><input type="text" class="presbyopia" id="ODMIDADD_1" name="ODMIDADD_1" value="<?php echo attr($ODMIDADD_1 ?? ''); ?>"></td>
1345 <td class="WAdd2"><input type="text" class="presbyopia" id="ODADD_1" name="ODADD_1" value="<?php echo attr($ODADD_1 ?? ''); ?>" tabindex="106"></td>
1346 <td></td>
1347 <td><input class="jaeger" type="text" id="ODNEARVA_1" name="ODNEARVA_1" value="<?php echo attr($ODNEARVA_1 ?? ''); ?>" tabindex="110"></td>
1349 <td name="W_wide"></td>
1351 <td name="W_wide" title="<?php echo xla('Binocular Pupillary Diameter - Distance'); ?>"><?php echo xlt('PD-D{{abbreviation for Binocular Pupillary Diameter - Distance}}'); ?></td>
1352 <td name="W_wide" title="<?php echo xla('Binocular Pupillary Diameter - Near'); ?>"><?php echo xlt('PD-N{{abbreviation for Binocular Pupillary Diameter - Near}}'); ?></td>
1353 <td name="W_wide" title="<?php echo xla('Lens Material'); ?>" colspan="2">
1354 <a href="<?php echo $GLOBALS['webroot']; ?>/interface/super/edit_list.php?list_id=Eye_Lens_Material" target="RTop"
1355 title="<?php echo xla('Click here to edit list of available Lens Materials'); ?>"
1356 name="Lens_mat"><span class="underline"><?php echo xlt('Lens Material'); ?></span> <i class="fa fa-pencil-alt fa-fw"></i> </a>
1357 </td>
1358 <td name="W_wide2" colspan="4" rowspan="4">
1359 <a href="<?php echo $GLOBALS['webroot']; ?>/interface/super/edit_list.php?list_id=Eye_Lens_Treatments" target="RTop"
1360 title="<?php echo xla('Click here to edit list of available Lens Treatment Options'); ?>"
1361 name="Lens_txs"><span class="underline"><?php echo xlt('Lens Treatments'); ?></span> <i class="fa fa-pencil-alt fa-fw"></i> </a>
1362 <br />
1363 <?php echo generate_lens_treatments('1', ($LENS_TREATMENTS_1 ?? '')); ?>
1364 </td>
1365 </tr>
1366 <tr class="WNEAR">
1367 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1368 <td class="WMid"><input type="text" class="presbyopia" id="OSMIDADD_1" name="OSMIDADD_1" value="<?php echo attr($OSMIDADD_1 ?? ''); ?>"></td>
1369 <td class="WAdd2"><input type="text" class="presbyopia" id="OSADD_1" name="OSADD_1" value="<?php echo attr($OSADD_1 ?? ''); ?>" tabindex="107"></td>
1370 <td></td>
1371 <td><input class="jaeger" type="text" id="OSNEARVA_1" name="OSNEARVA_1" value="<?php echo attr($OSNEARVA_1 ?? ''); ?>" tabindex="110"></td>
1373 <td name="W_wide"></td>
1375 <td name="W_wide"><input type="text" class="prism" id="BPDD_1" name="BPDD_1" value="<?php echo attr($BPDD_1 ?? ''); ?>" tabindex="138"></td>
1376 <td name="W_wide"><input type="text" class="prism" id="BPDN_1" name="BPDN_1" value="<?php echo attr($BPDN_1 ?? ''); ?>" tabindex="140"></td>
1377 <td name="W_wide" title="<?php echo xla('Lens Material Options'); ?>" colspan="2" tabindex="142">
1378 <?php echo generate_select_list("LENS_MATERIAL_1", "Eye_Lens_Material", ($LENS_MATERIAL_1 ?? ''), '', '--Lens Material--', '', 'restoreSession;submit_form();', '', array('style' => 'width:120px')); ?>
1379 </td>
1380 </tr>
1381 <tr>
1382 <td colspan="2"><b><?php echo xlt('Comments'); ?>:</b>
1383 </td>
1384 <td colspan="4" class="up"></td>
1385 </tr>
1386 <tr>
1387 <td colspan="6">
1388 <textarea id="COMMENTS_1" name="COMMENTS_W" tabindex="111"><?php echo text($COMMENTS_1 ?? ''); ?></textarea>
1389 </td>
1390 <td colspan="8">
1391 </td>
1392 </tr>
1393 </table>
1394 </div>
1395 <?php
1396 for ($i = 2; $i < 6; $i++) { //limit to a max of 5 pairs
1397 echo generate_specRx($i);
1400 </div>
1402 <?php (($MR ?? null) == 1) ? ($display_AR = "") : ($display_AR = "nodisplay");?>
1403 <div id="LayerVision_MR" class="refraction manifest borderShadow <?php echo $display_AR; ?>">
1404 <i onclick="top.restoreSession(); dispensed('<?php echo attr($pid); ?>');return false;"
1405 title="<?php echo xla("List of previously dispensed Spectacle and Contact Lens Rxs"); ?>" class="closeButton_3 fa fa-list-ul"></i>
1406 <span class="closeButton_2 fa fa-print" title="<?php echo xla('Dispense this Rx'); ?>" onclick="top.restoreSession();doscript('MR',<?php echo attr($pid); ?>,<?php echo attr($encounter); ?>);return false;"></span>
1407 <span class="closeButton fa fa-times" id="Close_MR" name="Close_MR" title="<?php echo xla('Close this panel and make this a Preference to stay closed'); ?>"></span>
1408 <table id="dry_wet_refraction">
1409 <th colspan="5"><?php echo xlt('Manifest (Dry) Refraction'); ?></th>
1410 <th NOWRAP colspan="2">
1411 <input type="checkbox" name="BALANCED" id="Balanced" value="on" <?php if ($BALANCED == 'on') {
1412 echo "checked='checked'";
1413 } ?> tabindex="10182">
1414 <label for="Balanced" class="input-helper input-helper--checkbox"><?php echo xlt('Balanced'); ?></label>
1415 </th>
1417 <tr>
1418 <td><i class="fa fa-gamepad" name="reverseme" title="<?php echo xla('Convert between plus and minus cylinder'); ?>" aria-hidden="true" id="MR" ></i></td>
1419 <td><?php echo xlt('Sph{{Sphere}}'); ?></td>
1420 <td><?php echo xlt('Cyl{{Cylinder}}'); ?></td>
1421 <td><?php echo xlt('Axis{{Axis of a glasses prescription}}'); ?></td>
1422 <td><?php echo xlt('Acuity'); ?></td>
1423 <td><?php echo xlt('ADD'); ?></td>
1424 <td><?php echo xlt('Jaeger'); ?></td>
1425 <td><?php echo xlt('Prism'); ?></td>
1426 </tr>
1427 <tr>
1428 <td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1429 <td><input type="text" id="MRODSPH" name="MRODSPH" value="<?php echo attr($MRODSPH); ?>" tabindex="10170"></td>
1430 <td><input type="text" id="MRODCYL" name="MRODCYL" value="<?php echo attr($MRODCYL); ?>" tabindex="10171"></td>
1431 <td><input type="text" id="MRODAXIS" name="MRODAXIS" value="<?php echo attr($MRODAXIS); ?>" tabindex="10172"></td>
1432 <td><input type="text" id="MRODVA" name="MRODVA" value="<?php echo attr($MRODVA); ?>" tabindex="10176"></td>
1433 <td><input type="text" id="MRODADD" name="MRODADD" value="<?php echo attr($MRODADD); ?>" tabindex="10178"></td>
1434 <td><input class="jaeger" type="text" id="MRNEARODVA" name="MRNEARODVA" value="<?php echo attr($MRNEARODVA); ?>" tabindex="10180"> </td>
1435 <td><input type="text" id="MRODPRISM" name="MRODPRISM" value="<?php echo attr($MRODPRISM); ?>"></td>
1436 </tr>
1437 <tr>
1438 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1439 <td><input type="text" id="MROSSPH" name="MROSSPH" value="<?php echo attr($MROSSPH); ?>" tabindex="10173"></td>
1440 <td><input type="text" id="MROSCYL" name="MROSCYL" value="<?php echo attr($MROSCYL); ?>" tabindex="10174"></td>
1441 <td><input type="text" id="MROSAXIS" name="MROSAXIS" value="<?php echo attr($MROSAXIS); ?>" tabindex="10175"></td>
1442 <td><input type="text" id="MROSVA" name="MROSVA" value="<?php echo attr($MROSVA); ?>" tabindex="10177"></td>
1443 <td><input type="text" id="MROSADD" name="MROSADD" value="<?php echo attr($MROSADD); ?>" tabindex="10179"></td>
1444 <td><input class="jaeger" type="text" id="MRNEAROSVA" name="MRNEAROSVA" value="<?php echo attr($MRNEAROSVA); ?>" tabindex="10181"></td>
1445 <td><input type="text" id="MROSPRISM" name="MROSPRISM" value="<?php echo attr($MROSPRISM); ?>"></td>
1446 </tr>
1447 </table>
1449 <table>
1450 <th colspan="7"><?php echo xlt('Cycloplegic (Wet) Refraction'); ?></th>
1451 <th><i title="<?php echo xla("Dispense Rx"); ?>" class="fa fa-print" onclick="top.restoreSession();doscript('CR',<?php echo attr($pid); ?>,<?php echo attr($encounter); ?>);return false;"></i></th>
1453 <tr>
1454 <td><i class="fa fa-gamepad" name="reverseme" title="<?php echo xla('Convert between plus and minus cylinder'); ?>" aria-hidden="true" id="CR" ></i></td>
1455 <td><?php echo xlt('Sph{{Sphere}}'); ?></td>
1456 <td><?php echo xlt('Cyl{{Cylinder}}'); ?></td>
1457 <td><?php echo xlt('Axis{{Axis of a glasses prescription}}'); ?></td>
1458 <td><?php echo xlt('Acuity'); ?></td>
1459 <td rowspan="3">
1460 <ul>
1461 <li>
1462 <input type="radio" name="WETTYPE" id="Streak" value="Streak" <?php if ($WETTYPE == "Streak") {
1463 echo "checked='checked'";
1464 } ?>/>
1465 <label for="Streak" class="input-helper input-helper--checkbox"><?php echo xlt('Streak'); ?></label>
1466 </li>
1467 <li>
1468 <input type="radio" name="WETTYPE" id="Auto" value="Auto" <?php if ($WETTYPE == "Auto") {
1469 echo "checked='checked'";
1470 } ?>>
1471 <label for="Auto" class="input-helper input-helper--checkbox"><?php echo xlt('Auto{{autorefraction}}'); ?></label>
1472 </li>
1474 <li>
1475 <input type="radio" name="WETTYPE" id="Manual" value="Manual" <?php if ($WETTYPE == "Manual") {
1476 echo "checked='checked'";
1477 } ?>>
1478 <label for="Manual" class="input-helper input-helper--checkbox"><?php echo xlt('Manual'); ?></label>
1479 </li>
1480 </ul>
1481 </td>
1482 <td id="IOP_dil"><?php echo xlt('IOP Dilated{{Dilated Intraocular Pressure}}'); ?>
1483 <input type="hidden" name="IOPPOSTTIME" id="IOPPOSTTIME" value="">
1484 </td>
1486 </tr>
1487 <tr>
1488 <td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1489 <td><input type="text" id="CRODSPH" name="CRODSPH" value="<?php echo attr($CRODSPH); ?>" tabindex="10183"></td>
1490 <td><input type="text" id="CRODCYL" name="CRODCYL" value="<?php echo attr($CRODCYL); ?>" tabindex="10184"></td>
1491 <td><input type="text" id="CRODAXIS" name="CRODAXIS" value="<?php echo attr($CRODAXIS); ?>" tabindex="10185"></td>
1492 <td><input type="text" id="CRODVA" name="CRODVA" value="<?php echo attr($CRODVA); ?>" tabindex="10189"></td>
1493 <td><input type="text" id="ODIOPPOST" name="ODIOPPOST" value="<?php echo attr($ODIOPPOST); ?>">
1494 </tr>
1495 <tr>
1496 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1497 <td><input type="text" id="CROSSPH" name="CROSSPH" value="<?php echo attr($CROSSPH); ?>" tabindex="10186"></td>
1498 <td><input type="text" id="CROSCYL" name="CROSCYL" value="<?php echo attr($CROSCYL); ?>" tabindex="10187"></td>
1499 <td><input type="text" id="CROSAXIS" name="CROSAXIS" value="<?php echo attr($CROSAXIS); ?>" tabindex="10188"></td>
1500 <td><input type="text" id="CROSVA" name="CROSVA" value="<?php echo attr($CROSVA); ?>" tabindex="10190"></td>
1502 <td><input type="text" id="OSIOPPOST" name="OSIOPPOST" value="<?php echo attr($OSIOPPOST); ?>"></td>
1503 </tr>
1504 </table>
1505 </div>
1507 <?php (($CR ?? null) == 1) ? ($display_Cyclo = "") : ($display_Cyclo = "nodisplay"); ?>
1508 <div id="LayerVision_CR" class="refraction autoref borderShadow <?php echo $display_Cyclo; ?>">
1509 <i title="<?php echo xla('Dispense this Rx'); ?>" class="closeButton_2 fa fa-print" onclick="top.restoreSession();doscript('AR',<?php echo attr($pid); ?>,<?php echo attr($encounter); ?>);return false;"></i>
1510 <span title="<?php echo xla('Close this panel and make this a Preference to stay closed'); ?>" class="closeButton fa fa-times" id="Close_CR" name="Close_CR"></span>
1511 <table id="autorefraction">
1512 <th colspan="9"><?php echo xlt('Auto Refraction'); ?></th>
1513 <tr>
1514 <td><i class="fa fa-gamepad" name="reverseme" title="<?php echo xla('Convert between plus and minus cylinder'); ?>" aria-hidden="true" id="AR" ></i></td>
1515 <td><?php echo xlt('Sph{{Sphere}}'); ?></td>
1516 <td><?php echo xlt('Cyl{{Cylinder}}'); ?></td>
1517 <td><?php echo xlt('Axis{{Axis of a glasses prescription}}'); ?></td>
1518 <td><?php echo xlt('Acuity'); ?></td>
1519 <td><?php echo xlt('ADD'); ?></td>
1520 <td><?php echo xlt('Jaeger{{Near Acuity Type Jaeger}}'); ?></td>
1521 <td><?php echo xlt('Prism'); ?></td>
1522 </tr>
1523 <tr>
1524 <td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1525 <td><input type="text" id="ARODSPH" name="ARODSPH" value="<?php echo attr($ARODSPH); ?>" tabindex="10220"></td>
1526 <td><input type="text" id="ARODCYL" name="ARODCYL" value="<?php echo attr($ARODCYL); ?>" tabindex="10221"></td>
1527 <td><input type="text" id="ARODAXIS" name="ARODAXIS" value="<?php echo attr($ARODAXIS); ?>" tabindex="10222"></td>
1528 <td><input type="text" id="ARODVA" name="ARODVA" value="<?php echo attr($ARODVA); ?>" tabindex="10228"></td>
1529 <td><input type="text" id="ARODADD" name="ARODADD" value="<?php echo attr($ARODADD); ?>" tabindex="10226"></td>
1530 <td><input class="jaeger" type="text" id="ARNEARODVA" name="ARNEARODVA" value="<?php echo attr($ARNEARODVA); ?>"></td>
1531 <td><input type="text" id="ARODPRISM" name="ARODPRISM" value="<?php echo attr($ARODPRISM); ?>"></td>
1532 </tr>
1533 <tr>
1534 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1535 <td><input type="text" id="AROSSPH" name="AROSSPH" value="<?php echo attr($AROSSPH); ?>" tabindex="10223"></td>
1536 <td><input type="text" id="AROSCYL" name="AROSCYL" value="<?php echo attr($AROSCYL); ?>" tabindex="10224"></td>
1537 <td><input type="text" id="AROSAXIS" name="AROSAXIS" value="<?php echo attr($AROSAXIS); ?>" tabindex="10225"></td>
1538 <td><input type="text" id="AROSVA" name="AROSVA" value="<?php echo attr($AROSVA); ?>" tabindex="10229"></td>
1539 <td><input type="text" id="AROSADD" name="AROSADD" value="<?php echo attr($AROSADD); ?>" tabindex="10227"></td>
1540 <td><input class="jaeger" type="text" id="ARNEAROSVA" name="ARNEAROSVA" value="<?php echo attr($ARNEAROSVA); ?>"></td>
1541 <td><input type="text" id="AROSPRISM" name="AROSPRISM" value="<?php echo attr($AROSPRISM); ?>"></td>
1542 </tr>
1543 <tr>
1544 <th colspan="9" class="bold pad10"><br /><?php echo xlt('Refraction Comments'); ?>:</th>
1545 </tr>
1546 <tr>
1547 <td colspan="9"><textarea id="CRCOMMENTS" name="CRCOMMENTS"><?php echo attr($CRCOMMENTS); ?></textarea>
1548 </td>
1549 </tr>
1550 </table>
1551 </div>
1553 <?php (($CTL ?? null) == 1) ? ($display_CTL = "") : ($display_CTL = "nodisplay"); ?>
1554 <div id="LayerVision_CTL" class="refraction CTL borderShadow <?php echo $display_CTL; ?>">
1555 <i onclick="top.restoreSession(); dispensed('<?php echo attr($pid); ?>');return false;"
1556 title="<?php echo xla("List of previously dispensed Spectacle and Contact Lens Rxs"); ?>" class="closeButton_3 fa fa-list-ul"></i>
1557 <i title="<?php echo xla('Dispense this RX'); ?>" class="closeButton_2 fa fa-print" onclick="top.restoreSession();doscript('CTL',<?php echo attr($pid); ?>,<?php echo attr($encounter); ?>);return false;"></i>
1558 <span title="<?php echo xla('Close this panel and make this a Preference to stay closed'); ?>" class="closeButton fa fa-times" id="Close_CTL" name="Close_CTL"></span>
1559 <table id="CTL">
1560 <th colspan="9"><?php echo xlt('Contact Lens Refraction'); ?></th>
1561 <tr>
1562 <td class="center">
1563 <div id="CTL_box">
1564 <table>
1565 <tr>
1566 <td></td>
1567 <td><a href="<?php echo $GLOBALS['webroot']; ?>/interface/super/edit_list.php?list_id=CTLManufacturer" target="RTop"
1568 title="<?php echo xla('Click here to Edit the Manufacter List'); ?>"
1569 name="CTL"><?php echo xlt('Manufacturer'); ?> <i class="fa fa-pencil-alt fa-fw"></i> </a>
1570 </td>
1571 <td><a href="<?php echo $GLOBALS['webroot']; ?>/interface/super/edit_list.php?list_id=CTLSupplier" target="RTop"
1572 title="<?php echo xla('Click here to Edit the Supplier List'); ?>"
1573 name="CTL"><?php echo xlt('Supplier'); ?> <i class="fa fa-pencil-alt fa-fw"></i> </a>
1574 </td>
1575 <td><a href="<?php echo $GLOBALS['webroot']; ?>/interface/super/edit_list.php?list_id=CTLBrand" target="RTop"
1576 title="<?php echo xla('Click here to Edit the Contact Lens Brand List'); ?>"
1577 name="CTL"><?php echo xlt('Brand'); ?> <i class="fa fa-pencil-alt fa-fw"></i> </a>
1578 </td>
1579 </tr>
1580 <tr>
1581 <td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1582 <td>
1583 <!-- Pull from CTL data from list_options which user populates the usual way -->
1584 <?php
1585 //build manufacturer list from list_options::list_id::CTLManufacturer
1586 $query = "select * from list_options where list_id like 'CTLManufacturer' order by seq";
1587 $CTLMANUFACTURER_data = sqlStatement($query);
1588 while ($row = sqlFetchArray($CTLMANUFACTURER_data)) {
1589 if (!empty($CTLMANUFACTURER_list_OD)) {
1590 $CTLMANUFACTURER_list_OD .= '<option value="' . attr($row['option_id']) . '"';
1591 if ($CTLMANUFACTUREROD == $row['option_id']) {
1592 $CTLMANUFACTURER_list_OD .= "selected";
1595 $CTLMANUFACTURER_list_OD .= '>' . text(substr($row['title'], 0, 12)) . '</option>
1597 } else {
1598 $CTLMANUFACTURER_list_OD = '<option value="' . attr($row['option_id']) . '"';
1599 if ($CTLMANUFACTUREROD == $row['option_id']) {
1600 $CTLMANUFACTURER_list_OD = "selected";
1603 $CTLMANUFACTURER_list_OD = '>' . text(substr($row['title'], 0, 12)) . '</option>
1607 if (!empty($CTLMANUFACTURER_list_OS)) {
1608 $CTLMANUFACTURER_list_OS .= '<option value="' . attr($row['option_id']) . '"';
1609 if ($CTLMANUFACTUREROS == $row['option_id']) {
1610 $CTLMANUFACTURER_list_OS .= "selected";
1613 $CTLMANUFACTURER_list_OS .= '>' . text(substr($row['title'], 0, 12)) . '</option>
1615 } else {
1616 $CTLMANUFACTURER_list_OS = '<option value="' . attr($row['option_id']) . '"';
1617 if ($CTLMANUFACTUREROS == $row['option_id']) {
1618 $CTLMANUFACTURER_list_OS = "selected";
1621 $CTLMANUFACTURER_list_OS = '>' . text(substr($row['title'], 0, 12)) . '</option>
1626 //build supplier list from list_options::list_id::CTLSupplier
1627 $query = "select * from list_options where list_id like 'CTLSupplier' order by seq";
1628 $CTLSUPPLIER_data = sqlStatement($query);
1629 while ($row = sqlFetchArray($CTLSUPPLIER_data)) {
1630 if (!empty($CTLSUPPLIER_list_OD)) {
1631 $CTLSUPPLIER_list_OD .= '<option value="' . attr($row['option_id']) . '"';
1632 if ($CTLSUPPLIEROD == $row['option_id']) {
1633 $CTLSUPPLIER_list_OD .= "selected";
1636 $CTLSUPPLIER_list_OD .= '>' . text(substr($row['title'], 0, 10)) . '</option>
1638 } else {
1639 $CTLSUPPLIER_list_OD = '<option value="' . attr($row['option_id']) . '"';
1640 if ($CTLSUPPLIEROD == $row['option_id']) {
1641 $CTLSUPPLIER_list_OD = "selected";
1644 $CTLSUPPLIER_list_OD = '>' . text(substr($row['title'], 0, 10)) . '</option>
1648 if (!empty($CTLSUPPLIER_list_OS)) {
1649 $CTLSUPPLIER_list_OS .= '<option value="' . attr($row['option_id']) . '"';
1650 if ($CTLSUPPLIEROS == $row['option_id']) {
1651 $CTLSUPPLIER_list_OS .= "selected";
1654 $CTLSUPPLIER_list_OS .= '>' . text(substr($row['title'], 0, 10)) . '</option>
1656 } else {
1657 $CTLSUPPLIER_list_OS = '<option value="' . attr($row['option_id']) . '"';
1658 if ($CTLSUPPLIEROS == $row['option_id']) {
1659 $CTLSUPPLIER_list_OS = "selected";
1662 $CTLSUPPLIER_list_OS = '>' . text(substr($row['title'], 0, 10)) . '</option>
1667 //build manufacturer list from list_options::list_id::CTLManufacturer
1668 $query = "select * from list_options where list_id like 'CTLBrand' order by seq";
1669 $CTLBRAND_data = sqlStatement($query);
1670 while ($row = sqlFetchArray($CTLBRAND_data)) {
1671 if (!empty($CTLSBRAND_list_OD)) {
1672 $CTLBRAND_list_OD .= '<option value="' . attr($row['option_id']) . '"';
1673 if ($CTLBRANDOD == $row['option_id']) {
1674 $CTLBRAND_list_OD .= "selected";
1677 $CTLBRAND_list_OD .= '>' . text(substr($row['title'], 0, 15)) . '</option>
1679 } else {
1680 $CTLBRAND_list_OD = '<option value="' . attr($row['option_id']) . '"';
1681 if ($CTLBRANDOD == $row['option_id']) {
1682 $CTLBRAND_list_OD = "selected";
1685 $CTLBRAND_list_OD = '>' . text(substr($row['title'], 0, 15)) . '</option>
1689 if (!empty($CTLSBRAN_list_OS)) {
1690 $CTLBRAND_list_OS .= '<option value="' . attr($row['option_id']) . '"';
1691 if ($CTLBRANDOS == $row['option_id']) {
1692 $CTLBRAND_list_OS .= "selected";
1695 $CTLBRAND_list_OS .= '>' . text(substr($row['title'], 0, 15)) . '</option>
1697 } else {
1698 $CTLBRAND_list_OS = '<option value="' . attr($row['option_id']) . '"';
1699 if ($CTLBRANDOS == $row['option_id']) {
1700 $CTLBRAND_list_OS = "selected";
1703 $CTLBRAND_list_OS = '>' . text(substr($row['title'], 0, 15)) . '</option>
1708 <select id="CTLMANUFACTUREROD" name="CTLMANUFACTUREROD" tabindex="10230">
1709 <option></option>
1710 <?php echo $CTLMANUFACTURER_list_OD ?? ''; ?>
1711 </select>
1712 </td>
1713 <td>
1714 <select id="CTLSUPPLIEROD" name="CTLSUPPLIEROD" tabindex="10231">
1715 <option></option>
1716 <?php echo $CTLSUPPLIER_list_OD ?? ''; ?>
1717 </select>
1718 </td>
1719 <td>
1720 <select id="CTLBRANDOD" name="CTLBRANDOD" tabindex="10232">
1721 <option></option>
1722 <?php echo $CTLBRAND_list_OD ?? ''; ?>
1723 </select>
1724 </td>
1725 </tr>
1726 <tr >
1727 <td><b><?php echo xlt('OS'); ?>:</b></td>
1728 <td>
1729 <select id="CTLMANUFACTUREROS" name="CTLMANUFACTUREROS" tabindex="10233">
1730 <option></option>
1731 <?php echo $CTLMANUFACTURER_list_OS ?? ''; ?>
1732 </select>
1733 </td>
1734 <td>
1735 <select id="CTLSUPPLIEROS" name="CTLSUPPLIEROS" tabindex="10234">
1736 <option></option>
1737 <?php echo $CTLSUPPLIER_list_OS ?? ''; ?>
1738 </select>
1739 </td>
1740 <td>
1741 <select id="CTLBRANDOS" name="CTLBRANDOS" tabindex="10235">
1742 <option></option>
1743 <?php echo $CTLBRAND_list_OS ?? ''; ?>
1744 </select>
1745 </td>
1746 </tr>
1747 </table>
1748 </div>
1749 </td>
1750 </tr>
1751 </table>
1752 <table>
1753 <tr>
1754 <td><i class="fa fa-gamepad" name="reverseme" title="<?php echo xla('Convert between plus and minus cylinder'); ?>" aria-hidden="true" id="CTL" ></i></td>
1755 <td><?php echo xlt('Sph{{Sphere}}'); ?></td>
1756 <td><?php echo xlt('Cyl{{Cylinder}}'); ?></td>
1757 <td><?php echo xlt('Axis{{Axis of a glasses prescription}}'); ?></td>
1758 <td><?php echo xlt('BC{{Base Curve}}'); ?></td>
1759 <td><?php echo xlt('Diam{{Diameter}}'); ?></td>
1760 <td><?php echo xlt('ADD'); ?></td>
1761 <td><?php echo xlt('Acuity'); ?></td>
1762 </tr>
1763 <tr>
1764 <td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1765 <td><input type="text" id="CTLODSPH" name="CTLODSPH" value="<?php echo attr($CTLODSPH); ?>" tabindex="10236"></td>
1766 <td><input type="text" id="CTLODCYL" name="CTLODCYL" value="<?php echo attr($CTLODCYL); ?>" tabindex="10240"></td>
1767 <td><input type="text" id="CTLODAXIS" name="CTLODAXIS" value="<?php echo attr($CTLODAXIS); ?>" tabindex="10241"></td>
1768 <td><input type="text" id="CTLODBC" name="CTLODBC" value="<?php echo attr($CTLODBC); ?>" tabindex="10237"></td>
1769 <td><input type="text" id="CTLODDIAM" name="CTLODDIAM" value="<?php echo attr($CTLODDIAM); ?>" tabindex="10238"></td>
1770 <td><input type="text" id="CTLODADD" name="CTLODADD" value="<?php echo attr($CTLODADD); ?>" tabindex="10242"></td>
1771 <td><input type="text" id="CTLODVA" name="CTLODVA" value="<?php echo attr($CTLODVA); ?>" tabindex="10239"></td>
1772 </tr>
1773 <tr >
1774 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1775 <td><input type="text" id="CTLOSSPH" name="CTLOSSPH" value="<?php echo attr($CTLOSSPH); ?>" tabindex="10243"></td>
1776 <td><input type="text" id="CTLOSCYL" name="CTLOSCYL" value="<?php echo attr($CTLOSCYL); ?>" tabindex="10247"></td>
1777 <td><input type="text" id="CTLOSAXIS" name="CTLOSAXIS" value="<?php echo attr($CTLOSAXIS); ?>" tabindex="10248"></td>
1778 <td><input type="text" id="CTLOSBC" name="CTLOSBC" value="<?php echo attr($CTLOSBC); ?>" tabindex="10244"></td>
1779 <td><input type="text" id="CTLOSDIAM" name="CTLOSDIAM" value="<?php echo attr($CTLOSDIAM); ?>" tabindex="10245"></td>
1780 <td><input type="text" id="CTLOSADD" name="CTLOSADD" value="<?php echo attr($CTLOSADD); ?>" tabindex="10249"></td>
1781 <td><input type="text" id="CTLOSVA" name="CTLOSVA" value="<?php echo attr($CTLOSVA); ?>" tabindex="10246"></td>
1782 </tr>
1783 <tr>
1784 <td colspan="2" class="right bold">
1785 <?php echo xlt('Comments'); ?>:
1786 </td>
1787 <td colspan="6">
1788 <textarea name="CTL_COMMENTS" id="CTL_COMMENTS" tabindex="10250"><?php echo text($CTL_COMMENTS); ?></textarea>
1789 </td>
1790 </tr>
1791 </table>
1792 </div>
1794 <?php (($ADDITIONAL ?? null) == 1) ? ($display_Add = "") : ($display_Add = "nodisplay"); ?>
1795 <div id="LayerVision_ADDITIONAL" class="refraction borderShadow <?php echo $display_Add; ?>">
1796 <span title="<?php echo xla('Close and make this a Preference to stay closed'); ?>" class="closeButton fa fa-times" id="Close_ADDITIONAL" name="Close_ADDITIONAL"></span>
1798 <table id="Additional">
1799 <th colspan=9><?php echo xlt('Additional Data Points'); ?></th>
1800 <tr><td></td>
1801 <td title="<?php echo xla('Pinhole Vision'); ?>"><?php echo xlt('PH{{pinhole acuity}}'); ?></td>
1802 <td title="<?php echo xla('Potential Acuity Meter'); ?>"><?php echo xlt('PAM{{Potential Acuity Meter}}'); ?></td>
1803 <td title="<?php echo xla('Laser Interferometry Acuity'); ?>"><?php echo xlt('LI{{Laser Interferometry Acuity}}'); ?></td>
1804 <td title="<?php echo xla('Brightness Acuity Testing'); ?>"><?php echo xlt('BAT{{Brightness Acuity Testing}}'); ?></td>
1805 <td><?php echo xlt('K1{{Keratometry 1}}'); ?></td>
1806 <td><?php echo xlt('K2{{Keratometry 2}}'); ?></td>
1807 <td><?php echo xlt('Axis{{Axis of a glasses prescription}}'); ?></td>
1808 </tr>
1809 <tr><td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1810 <td><input type="text" id="PHODVA" name="PHODVA" title="<?php echo xla('Pinhole Vision'); ?>" value="<?php echo attr($PHODVA); ?>" tabindex="10251"></td>
1811 <td><input type="text" id="PAMODVA" name="PAMODVA" title="<?php echo xla('Potential Acuity Meter'); ?>" value="<?php echo attr($PAMODVA); ?>" tabindex="10253"></td>
1812 <td><input type="text" id="LIODVA" name="LIODVA" title="<?php echo xla('Laser Interferometry'); ?>" value="<?php echo attr($LIODVA); ?>" tabindex="10255"></td>
1813 <td><input type="text" id="GLAREODVA" name="GLAREODVA" title="<?php echo xla('Brightness Acuity Testing'); ?>" value="<?php echo attr($GLAREODVA); ?>" tabindex="10257"></td>
1814 <td><input type="text" id="ODK1" name="ODK1" value="<?php echo attr($ODK1); ?>" tabindex="10259"></td>
1815 <td><input type="text" id="ODK2" name="ODK2" value="<?php echo attr($ODK2); ?>" tabindex="10260"></td>
1816 <td><input type="text" id="ODK2AXIS" name="ODK2AXIS" value="<?php echo attr($ODK2AXIS); ?>" tabindex="10261"></td>
1817 </tr>
1818 <tr>
1819 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1820 <td><input type="text" id="PHOSVA" name="PHOSVA" title="<?php echo xla('Pinhole Vision'); ?>" value="<?php echo attr($PHOSVA); ?>" tabindex="10252"></td>
1821 <td><input type="text" id="PAMOSVA" name="PAMOSVA" title="<?php echo xla('Potential Acuity Meter'); ?>" value="<?php echo attr($PAMOSVA); ?>" tabindex="10254"></td>
1822 <td><input type="text" id="LIOSVA" name="LIOSVA" title="<?php echo xla('Laser Interferometry'); ?>" value="<?php echo attr($LIOSVA); ?>" tabindex="10256"></td>
1823 <td><input type="text" id="GLAREOSVA" name="GLAREOSVA" title="<?php echo xla('Brightness Acuity Testing'); ?>" value="<?php echo attr($GLAREOSVA); ?>" tabindex="10258"></td>
1824 <td><input type="text" id="OSK1" name="OSK1" value="<?php echo attr($OSK1); ?>" tabindex="10262"></td>
1825 <td><input type="text" id="OSK2" name="OSK2" value="<?php echo attr($OSK2); ?>" tabindex="10263"></td>
1826 <td><input type="text" id="OSK2AXIS" name="OSK2AXIS" value="<?php echo attr($OSK2AXIS); ?>" tabindex="10264"></td>
1827 </tr>
1828 <tr><td>&nbsp;</td></tr>
1829 <tr>
1830 <td></td>
1831 <td title="<?php echo xla('Axial Length'); ?>"><?php echo xlt('AxLength{{axial Length}}'); ?></td>
1832 <td title="<?php echo xla('Anterior Chamber Depth'); ?>"><?php echo xlt('ACD{{anterior chamber depth}}'); ?></td>
1833 <td title="<?php echo xla('Inter-pupillary distance'); ?>"><?php echo xlt('PD{{Inter-pupillary distance}}'); ?></td>
1834 <td title="<?php echo xla('Lens Thickness'); ?>"><?php echo xlt('LT{{lens thickness}}'); ?></td>
1835 <td title="<?php echo xla('White-to-white'); ?>"><?php echo xlt('W2W{{white-to-white}}'); ?></td>
1836 <td title="<?php echo xla('Equivalent contact lens power at the corneal level'); ?>"><?php echo xlt('ECL{{equivalent contact lens power at the corneal level}}'); ?></td>
1837 <td><?php echo xlt('VABiNoc{{Binocular Visual Acuity}}'); ?></td>
1838 </tr>
1839 <tr><td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1840 <td><input type="text" id="ODAXIALLENGTH" name="ODAXIALLENGTH" value="<?php echo attr($ODAXIALLENGTH); ?>" tabindex="10265"></td>
1841 <td><input type="text" id="ODACD" name="ODACD" value="<?php echo attr($ODACD); ?>" tabindex="10267"></td>
1842 <td><input type="text" id="ODPDMeasured" name="ODPDMeasured" value="<?php echo attr($ODPDMeasured); ?>" tabindex="10269"></td>
1843 <td><input type="text" id="ODLT" name="ODLT" value="<?php echo attr($ODLT); ?>" tabindex="10271"></td>
1844 <td><input type="text" id="ODW2W" name="ODW2W" value="<?php echo attr($ODW2W); ?>" tabindex="10273"></td>
1845 <td><input type="text" id="ODECL" name="ODECL" value="<?php echo attr($ODECL ?? ''); ?>" tabindex="10275"></td>
1846 <td rowspan="2"><input type="text" id="BINOCVA" name="BINOCVA" value="<?php echo attr($BINOCVA); ?>"></td>
1847 </tr>
1848 <tr>
1849 <td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1850 <td><input type="text" id="OSAXIALLENGTH" name="OSAXIALLENGTH" value="<?php echo attr($OSAXIALLENGTH); ?>" tabindex="10266"></td>
1851 <td><input type="text" id="OSACD" name="OSACD" value="<?php echo attr($OSACD); ?>" tabindex="10268"></td>
1852 <td><input type="text" id="OSPDMeasured" name="OSPDMeasured" value="<?php echo attr($OSPDMeasured); ?>" tabindex="10270"></td>
1853 <td><input type="text" id="OSLT" name="OSLT" value="<?php echo attr($OSLT); ?>" tabindex="10272"></td>
1854 <td><input type="text" id="OSW2W" name="OSW2W" value="<?php echo attr($OSW2W); ?>" tabindex="10274"></td>
1855 <td><input type="text" id="OSECL" name="OSECL" value="<?php echo attr($OSECL ?? ''); ?>" tabindex="10276"></td>
1856 <!-- <td><input type="text" id="pend" name="pend" value="<?php echo attr($pend ?? ''); ?>"></td> -->
1857 </tr>
1858 </table>
1859 </div>
1861 <?php (($VAX ?? null) == 1) ? ($display_Add = "") : ($display_Add = "nodisplay"); ?>
1862 <div id="LayerVision_VAX" class="refraction borderShadow <?php echo $display_Add; ?>">
1863 <span title="<?php echo attr('Close this panel and make this a Preference to stay closed'); ?>" class="closeButton fa fa-times" id="Close_VAX" name="Close_VAX"></span>
1864 <table id="Additional_VA">
1865 <tr>
1866 <th colspan="9"><?php echo xlt('Visual Acuity'); ?></th>
1867 </tr>
1868 <tr><td></td>
1869 <td title="<?php echo xla('Acuity without correction'); ?>"><?php echo xlt('SC{{Acuity without correction}}'); ?></td>
1870 <td title="<?php echo xla('Acuity with correction'); ?>"><?php echo xlt('W Rx{{Acuity with correction}}'); ?></td>
1871 <td title="<?php echo xla('Acuity with Autorefraction'); ?>"><?php echo xlt('AR{{Autorefraction Acuity}}'); ?></td>
1872 <td title="<?php echo xla('Acuity with Manifest Refraction'); ?>"><?php echo xlt('MR{{Manifest Refraction}}'); ?></td>
1873 <td title="<?php echo xla('Acuity with Cycloplegic Refraction'); ?>"><?php echo xlt('CR{{Cycloplegic Refraction}}'); ?></td>
1874 <td title="<?php echo xla('Acuity with Pinhole'); ?>"><?php echo xlt('PH{{pinhole acuity}}'); ?></td>
1875 <td title="<?php echo xla('Acuity with Contact Lenses'); ?>"><?php echo xlt('CTL{{Contact Lens}}'); ?></td>
1877 </tr>
1878 <tr><td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1879 <td><input type="text" id="SCODVA_copy_brd" name="SCODVA_copy_brd" value="<?php echo attr($SCODVA); ?>" tabindex="10300"></td>
1880 <td><input type="text" id="ODVA_1_copy_brd" name="ODVA_1_copy_brd" value="<?php echo attr($ODVA_1 ?? ''); ?>" tabindex="10302"></td>
1881 <td><input type="text" id="ARODVA_copy_brd" name="ARODVA_copy_brd" value="<?php echo attr($ARODVA); ?>" tabindex="10304"></td>
1882 <td><input type="text" id="MRODVA_copy_brd" name="MRODVA_copy_brd" value="<?php echo attr($MRODVA); ?>" tabindex="10306"></td>
1883 <td><input type="text" id="CRODVA_copy_brd" name="CRODVA_copy_brd" value="<?php echo attr($CRODVA); ?>" tabindex="10308"></td>
1884 <td><input type="text" id="PHODVA_copy_brd" name="PHODVA_copy_brd" value="<?php echo attr($PHODVA); ?>" tabindex="10310"></td>
1885 <td><input type="text" id="CTLODVA_copy_brd" name="CTLODVA_copy_brd" value="<?php echo attr($CTLODVA); ?>" tabindex="10312"></td>
1886 </tr>
1887 <tr><td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1888 <td><input type="text" id="SCOSVA_copy" name="SCOSVA_copy" value="<?php echo attr($SCOSVA); ?>" tabindex="10301"></td>
1889 <td><input type="text" id="OSVA_1_copy_brd" name="OSVA_1_copy_brd" value="<?php echo attr($OSVA_1 ?? ''); ?>" tabindex="10303"></td>
1890 <td><input type="text" id="AROSVA_copy_brd" name="AROSVA_copy_brd" value="<?php echo attr($AROSVA); ?>" tabindex="10305"></td>
1891 <td><input type="text" id="MROSVA_copy_brd" name="MROSVA_copy_brd" value="<?php echo attr($MROSVA); ?>" tabindex="10307"></td>
1892 <td><input type="text" id="CROSVA_copy_brd" name="CROSVA_copy_brd" value="<?php echo attr($CROSVA); ?>" tabindex="10309"></td>
1893 <td><input type="text" id="PHOSVA_copy_brd" name="PHOSVA_copy_brd" value="<?php echo attr($PHOSVA); ?>" tabindex="10311"></td>
1894 <td><input type="text" id="CTLOSVA_copy_brd" name="CTLOSVA_copy_brd" value="<?php echo attr($CTLOSVA); ?>" tabindex="10313"></td>
1895 </tr>
1896 <tr><td>&nbsp;</td></tr>
1897 <tr>
1898 <td></td>
1899 <td title="<?php echo xla('Near Acuity without Correction'); ?>"><?php echo xlt('scNear{{without correction near}}'); ?></td>
1900 <td title="<?php echo xla('Near Acuity with Correction'); ?>"><?php echo xlt('ccNear{{with correction at near}}'); ?></td>
1901 <td title="<?php echo xla('Near Acuity with Autorefraction'); ?>"><?php echo xlt('ARNear{{autorefraction near}}'); ?></td>
1902 <td title="<?php echo xla('Near Acuity with Manifest (Dry) refraction'); ?>"><?php echo xlt('MRNear{{manifest refraction near}}'); ?></td>
1903 <td title="<?php echo xla('Potential Acuity'); ?>"><?php echo xlt('PAM{{Potential Acuity Meter}}'); ?></td>
1904 <td title="<?php echo xla('Brightness Acuity Testing'); ?>"><?php echo xlt('BAT{{Brightness Acuity Testing}}'); ?></td>
1905 <td title="<?php echo xla('Contrast Acuity'); ?>"><?php echo xlt('Contrast{{Constrast Visual Acuity}}'); ?></td>
1906 </tr>
1907 <tr><td><b><?php echo xlt('OD{{right eye}}'); ?>:</b></td>
1908 <td><input class="jaeger" type="text" id="SCNEARODVA" title="<?php echo xla('Near Acuity without Correction'); ?>" name="SCNEARODVA" value="<?php echo attr($SCNEARODVA); ?>" tabindex="10320"></td>
1909 <td><input class="jaeger" type="text" id="ODNEARVA_1_copy_brd" title="<?php echo xla('Near Acuity with Correction'); ?>" name="ODNEARVA_1_copy_brd" value="<?php echo attr($ODNEARVA_1 ?? ''); ?>" tabindex="10322"></td>
1910 <td><input class="jaeger" type="text" id="ARNEARODVA_copy_brd" title="<?php echo xla('Near Acuity AutoRefraction'); ?>" name="ARNEARODVA_copy_brd" value="<?php echo attr($ARNEARODVA); ?>" tabindex="10324"></td>
1911 <td><input class="jaeger" type="text" id="MRNEARODVA_copy_brd" title="<?php echo xla('Near Acuity Manifest Refraction'); ?>" name="MRNEARODVA_copy_brd" value="<?php echo attr($MRNEARODVA); ?>" tabindex="10326"></td>
1912 <td><input type="text" id="PAMODVA_copy_brd" title="<?php echo xla('Potential Acuity Meter'); ?>" name="PAMODVA_copy_brd" value="<?php echo attr($PAMODVA); ?>" tabindex="10328"></td>
1913 <td><input type="text" id="GLAREODVA_copy_brd" title="<?php echo xla('Brightness Acuity Testing'); ?>" name="GLAREODVA_copy_brd" value="<?php echo attr($GLAREODVA); ?>" tabindex="10330"></td>
1914 <td><input type="text" id="CONTRASTODVA_copy_brd" title="<?php echo xla('Contrast Acuity Testing'); ?>" name="CONTRASTODVA_copy_brd" value="<?php echo attr($CONTRASTODVA ?? ''); ?>" tabindex="10332"></td>
1915 </tr>
1916 <tr><td><b><?php echo xlt('OS{{left eye}}'); ?>:</b></td>
1917 <td><input class="jaeger" type="text" id="SCNEAROSVA" title="<?php echo xla('Near Acuity without Correction'); ?>" name="SCNEAROSVA" value="<?php echo attr($SCNEAROSVA); ?>" tabindex="10321"></td>
1918 <td><input class="jaeger" type="text" id="OSNEARVA_1_copy_brd" title="<?php echo xla('Near Acuity with Correction'); ?>" name="OSNEARVA_1_copy_brd" value="<?php echo attr($OSNEARVA_1 ?? ''); ?>" tabindex="10323"></td>
1919 <td><input class="jaeger" type="text" id="ARNEAROSVA_copy" title="<?php echo xla('Near Acuity AutoRefraction'); ?>" name="ARNEAROSVA_copy" value="<?php echo attr($ARNEAROSVA); ?>" tabindex="10325"></td>
1920 <td><input class="jaeger" type="text" id="MRNEAROSVA_copy" title="<?php echo xla('Near Acuity Manifest Refraction'); ?>" name="MRNEAROSVA_copy" value="<?php echo attr($MRNEAROSVA); ?>" tabindex="10327"></td>
1921 <td><input type="text" id="PAMOSVA_copy_brd" title="<?php echo xla('Potential Acuity Meter'); ?>" name="PAMOSVA_copy_brd" value="<?php echo attr($PAMOSVA); ?>" tabindex="10329"></td>
1922 <td><input type="text" id="GLAREOSVA_copy_brd" title="<?php echo xla('Brightness Acuity Testing'); ?>" name="GLAREOSVA_copy_brd" value="<?php echo attr($GLAREOSVA); ?>" tabindex="10331"></td>
1923 <td><input type="text" id="CONTRASTOSVA" title="<?php echo xla('Contrast Acuity Testing'); ?>" name="CONTRASTOSVA" value="<?php echo attr($CONTRASTOSVA ?? ''); ?>" tabindex="10333"></td>
1924 </tr>
1925 </table>
1926 </div>
1927 </div>
1928 </div>
1929 <!-- end of the refraction box -->
1930 <!-- start of the exam selection/middle menu row -->
1931 <div class="sections" name="mid_menu" id="mid_menu">
1932 <span id="EXAM_defaults" name="EXAM_defaults" value="Defaults" class="btn btn-danger"><i class="fas fa-newspaper"></i>&nbsp;<b><?php echo xlt('Defaults'); ?></b></span>
1933 <span id="EXAM_TEXT" name="EXAM_TEXT" value="TEXT" class="btn btn-secondary"><i class="far fa-file-alt"></i>&nbsp;<b><?php echo xlt('Text'); ?></b></span>
1934 <span id="EXAM_DRAW" name="EXAM_DRAW" value="DRAW" class="btn btn-secondary">
1935 <i class="fa fa-paint-brush fa-sm"> </i>&nbsp;<b><?php echo xlt('Draw'); ?></b></span>
1936 <span id="EXAM_QP" name="EXAM_QP" title="<?php echo xla('Open the Quick Pick panels'); ?>" value="QP" class="btn btn-secondary">
1937 <i class="fa fa-database fa-sm"> </i>&nbsp;<b><?php echo xlt('Quick Picks'); ?></b>
1938 </span>
1939 <?php
1940 // output is defined above and if there are old visits, check for orders in eye_mag_functions:
1941 // $output = priors_select("ALL",$id,$id,$pid);
1942 ($output_priors == '') ? ($title = "There are no prior visits documented to display for this patient.") : ($title = "Display old exam findings and copy forward if desired");?>
1943 <span id="PRIORS_ALL_left_text" name="PRIORS_ALL_left_text"
1944 class="btn btn-secondary"><i class="fa fa-paste" title="<?php echo xla($title); ?>"></i>
1945 <?php
1946 if ($output_priors != '') {
1947 echo $output_priors;
1948 } else {
1949 echo "<b>" . xlt("First visit: No Old Records") . "</b>";
1951 ?>&nbsp;
1952 </span>
1953 </div>
1954 <!-- end of the exam selection row -->
1956 <!-- start of the Shorthand Entry Box -->
1957 <div id="EXAM_KB" name="EXAM_KB" class="kb borderShadow nodisplay">
1958 <span class="closeButton fa fa-times" id="CLOSE_kb" name="CLOSE_kb"></span>
1959 <span class="BAR2_kb" title="<?php echo xla('Click to display shorthand field names.'); ?>" class="ke"><b><?php echo xlt('Shorthand'); ?></b>
1960 </span>
1962 <a target="_shorthand" href="<?php echo $GLOBALS['webroot']; ?>/interface/forms/eye_mag/help.php">
1963 <i title="<?php echo xla('Click for Shorthand Help.'); ?>" class="fa fa-info-circle fa-1"></i>
1964 </a><br />
1965 <textarea id="ALL_keyboard_left" name="ALL_keyboard_left" tabindex='1000'></textarea>
1966 </div>
1967 <!-- end of the Shorthand Entry Box -->
1969 <!-- end reporting div -->
1970 <span class="anchor" id="SELECTION_ROW_anchor"></span>
1972 <!-- Start of the exam sections -->
1973 <div class="loading" id="EXAM_sections_loading" name="EXAM_sections_loading">
1974 <hr></hr>
1975 <i class="fa fa-spinner fa-spin"></i>
1976 </div>
1978 <div class="nodisplay" id="DA_EXAM_sections" name="DA_EXAM_sections">
1979 <!-- start External Exam -->
1980 <div id="EXT_1" name="EXT_1" class="clear_both">
1981 <span class="anchor" id="EXT_anchor"></span>
1982 <div id="EXT_left" class="exam_section_left borderShadow" >
1983 <div id="EXT_left_text" class="TEXT_class">
1984 <i class="closeButton_2 fa fa-paint-brush" title="<?php echo xla('External Draw Panel'); ?>" id="BUTTON_DRAW_EXT" name="BUTTON_DRAW_EXT"></i>
1985 <i class="closeButton_3 fa fa-database" title="<?php echo xla('Quick Picks'); ?>" id="BUTTON_QP_EXT" name="BUTTON_QP_EXT"></i>
1986 <i class="closeButton_4 fa fa-user-md" name="Shorthand_kb" title="<?php echo xla("Open/Close the Shorthand Window and Codes"); ?>"></i>
1987 <i class="closeButton fa fa-minus-circle" title="<?php echo xla('Open/Close External Exam panels'); ?>" id="BUTTON_TAB_EXT" name="BUTTON_TAB_EXT"></i>
1988 <b><?php echo xlt('External Exam'); ?>:</b><div class="kb kb_left" title="<?php echo xla("External Exam Default Values"); ?>"><?php echo text('DEXT'); ?>
1990 </div><br />
1991 <div id="EXT_left_1">
1992 <table>
1993 <?php
1994 list($imaging,$episode) = display($pid, $encounter, "EXT");
1995 echo $episode;
1997 </table>
1998 <table>
1999 <tr>
2000 <td></td><td><?php echo xlt('R'); ?></td><td><?php echo xlt('L{{left}}'); ?></td>
2001 </tr>
2002 <tr>
2003 <td class="right" title="<?php echo xla('Levator Function'); ?>">
2004 <div class="kb kb_left"><?php echo xlt('LF{{levator function}}'); ?></div><?php echo xlt('Lev Fn{{levator function}}'); ?></td>
2005 <td><input type="text" name="RLF" id="RLF" class="EXT" value="<?php echo attr($RLF); ?>"></td>
2006 <td><input type="text" name="LLF" id="LLF" class="EXT" value="<?php echo attr($LLF); ?>"></td>
2007 </tr>
2008 <tr>
2009 <td class="right" title="<?php echo xla('Marginal Reflex Distance'); ?>">
2010 <div class="kb kb_left"><?php echo xlt('MRD{{marginal reflex distance}}'); ?></div><?php echo xlt('MRD{{marginal reflex distance}}'); ?></td>
2011 <td><input type="text" size="1" name="RMRD" id="RMRD" class="EXT" value="<?php echo attr($RMRD); ?>"></td>
2012 <td><input type="text" size="1" name="LMRD" id="LMRD" class="EXT" value="<?php echo attr($LMRD); ?>"></td>
2013 </tr>
2014 <tr>
2015 <td class="right" title="<?php echo xla('Vertical Fissure: central height between lid margins'); ?>">
2016 <div class="kb kb_left"><?php echo xlt('VF{{vertical fissure}}'); ?></div><?php echo xlt('Vert Fissure{{vertical fissure}}'); ?></td>
2017 <td><input type="text" size="1" name="RVFISSURE" id="RVFISSURE" class="EXT" value="<?php echo attr($RVFISSURE); ?>"></td>
2018 <td><input type="text" size="1" name="LVFISSURE" id="LVFISSURE" class="EXT" value="<?php echo attr($LVFISSURE); ?>"></td>
2019 </tr>
2020 <tr>
2021 <td class="right" title="<?php echo xla('Any carotid bruits appreciated?'); ?>">
2022 <div class="kb kb_left"><?php echo xlt('CAR{{carotid arteries}}'); ?></div><?php echo xlt('Carotid{{carotid arteries}}'); ?></td>
2023 <td><input type="text" name="RCAROTID" id="RCAROTID" class="EXT" class="EXT" value="<?php echo attr($RCAROTID); ?>"></td>
2024 <td><input type="text" name="LCAROTID" id="LCAROTID" class="EXT" value="<?php echo attr($LCAROTID); ?>"></td>
2025 </tr>
2026 <tr>
2027 <td class="right" title="<?php echo xla('Temporal Arteries'); ?>">
2028 <div class="kb kb_left"><?php echo xlt('TA{{temporal arteries}}'); ?></div>
2029 <?php echo xlt('Temp. Art.{{temporal arteries}}'); ?></td>
2030 <td><input type="text" size="1" name="RTEMPART" id="RTEMPART" class="EXT" value="<?php echo attr($RTEMPART); ?>"></td>
2031 <td><input type="text" size="1" name="LTEMPART" id="LTEMPART" class="EXT" value="<?php echo attr($LTEMPART); ?>"></td>
2032 </tr>
2033 <tr>
2034 <td class="right" title="<?php echo xla('Cranial Nerve 5: Trigeminal Nerve'); ?>">
2035 <div class="kb kb_left"><?php echo xlt('CN5{{cranial nerve five}}'); ?></div><?php echo xlt('CN V{{cranial nerve five}}'); ?></td>
2036 <td><input type="text" size="1" name="RCNV" id="RCNV" class="EXT" value="<?php echo attr($RCNV); ?>"></td>
2037 <td><input type="text" size="1" name="LCNV" id="LCNV" class="EXT" value="<?php echo attr($LCNV); ?>"></td>
2038 </tr>
2039 <tr>
2040 <td class="right" title="<?php echo xla('Cranial Nerve 7: Facial Nerve'); ?>">
2041 <div class="kb kb_left"><?php echo xlt('CN7{{cranial nerve seven}}'); ?></div><?php echo xlt('CN VII{{cranial nerve seven}}'); ?></td>
2042 <td><input type="text" size="1" name="RCNVII" class="EXT" id="RCNVII" value="<?php echo attr($RCNVII); ?>"></td>
2043 <td><input type="text" size="1" name="LCNVII" class="EXT" id="LCNVII" value="<?php echo attr($LCNVII); ?>"></td>
2044 </tr>
2046 <tr><td colspan=3 class="underline"><?php echo xlt('Hertel Exophthalmometry'); ?></td></tr>
2047 <tr class="center">
2048 <td>
2049 <input type="text" size="1" id="ODHERTEL" name="ODHERTEL" class="EXT" value="<?php echo attr($ODHERTEL); ?>">
2050 <i class="fa fa-minus"></i>
2051 </td>
2052 <td>
2053 <input type="text" size=3 id="HERTELBASE" name="HERTELBASE" class="EXT" value="<?php echo attr($HERTELBASE); ?>">
2054 <i class="fa fa-minus"></i>
2055 </td>
2056 <td>
2057 <input type="text" size=1 id="OSHERTEL" name="OSHERTEL" class="EXT" value="<?php echo attr($OSHERTEL); ?>">
2058 </td>
2059 </tr>
2060 <tr>
2061 <td><div class="kb kb_center"><?php echo xlt('RH{{right hertel measurement}}'); ?></div></td>
2062 <td><div class="kb kb_center"><?php echo xlt('HERT{{Hertel exophthalmometry}}'); ?></div></td>
2063 <td><div class="kb kb_center"><?php echo xlt('LH{{left hertel measurement}}'); ?></div></td>
2064 </tr>
2065 </table>
2066 </div>
2068 <?php (($EXT_VIEW ?? null) == 1) ? ($display_EXT_view = "wide_textarea") : ($display_EXT_view = "narrow_textarea");?>
2069 <?php ($display_EXT_view == "wide_textarea") ? ($marker = "fa-minus-square") : ($marker = "fa-plus-square");?>
2070 <div id="EXT_text_list" name="EXT_text_list" class="borderShadow <?php echo attr($display_EXT_view); ?>">
2071 <span class="top_right far <?php echo attr($marker); ?>" name="EXT_text_view" id="EXT_text_view"></span>
2072 <table cellspacing="0" cellpadding="0">
2073 <tr>
2074 <th>
2075 <i class="float-left fas fa-times copier" id="clear_EXT_R" title="<?php echo xla('Clear Right side values'); ?>"></i>
2076 <i class="fas fa-angle-double-down copier" id="EXT_defaults_R" title="<?php echo xla('Enter defaults for Right side');?>"></i>
2077 <?php echo xlt('Right'); ?>
2078 <i class="float-right fas fa-arrow-right copier" id="EXT_R_L" title="<?php echo xla('Copy Right to Left');?>"></i>
2079 </th>
2080 <th></th>
2081 <th>
2082 <i class="float-left fas fa-arrow-left copier" id="EXT_L_R" title="<?php echo xla('Copy Left to Right');?>"></i>
2083 <i class="fas fa-angle-double-down copier" id="EXT_defaults_L" title="<?php echo xla('Enter defaults values for Left side');?>"></i>
2084 <?php echo xlt('Left'); ?>
2085 <i class="delButton_2 fas fa-times copier" id="clear_EXT_L" title="<?php echo xla('Clear Left side values'); ?>"></i>
2086 </th>
2087 </tr>
2088 <tr>
2089 <td><textarea name="RBROW" id="RBROW" class="right EXT"><?php echo text($RBROW); ?></textarea></td>
2090 <td>
2091 <div class="overlay">
2092 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_RBROW_LBROW"></i>
2093 </div>
2094 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_LBROW_RBROW"></i>
2095 </div>
2096 </div>
2097 <div class="ident"><?php echo xlt('Brow'); ?></div>
2098 <div class="kb kb_left"><?php echo xlt('RB{{right brow}}'); ?></div>
2099 <div class="kb kb_right"><?php echo xlt('LB{{left brow}}'); ?></div>
2100 </td>
2101 <td><textarea name="LBROW" id="LBROW" class="left EXT"><?php echo text($LBROW); ?></textarea>
2102 </td>
2103 </tr>
2104 <tr>
2105 <td><textarea name="RUL" id="RUL" class="right EXT"><?php echo text($RUL); ?></textarea></td>
2106 <td><div class="overlay">
2107 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_RUL_LUL"></i>
2108 </div>
2109 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_LUL_RUL"></i>
2110 </div>
2111 </div>
2112 <div class="ident"><?php echo xlt('Upper Lids'); ?></div>
2113 <div class="kb kb_left"><?php echo xlt('RUL{{right upper eyelid}}'); ?></div>
2114 <div class="kb kb_right"><?php echo xlt('LUL{{left upper eyelid}}'); ?></div>
2115 </td>
2116 <td><textarea name="LUL" id="LUL" class="left EXT"><?php echo text($LUL); ?></textarea></td>
2117 </tr>
2118 <tr>
2119 <td><textarea name="RLL" id="RLL" class="right EXT"><?php echo text($RLL); ?></textarea></td>
2120 <td>
2121 <div class="overlay">
2122 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_RLL_LLL"></i>
2123 </div>
2124 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_LLL_RLL"></i>
2125 </div>
2126 </div>
2127 <div class="ident"><?php echo xlt('Lower Lids'); ?></div>
2128 <div class="kb kb_left"><?php echo xlt('RLL{{right lower eyelid}}'); ?></div>
2129 <div class="kb kb_right"><?php echo xlt('LLL{{left lower eyelid}}'); ?></div></td>
2130 <td><textarea name="LLL" id="LLL" class="left EXT"><?php echo text($LLL); ?></textarea></td>
2131 </tr>
2132 <tr>
2133 <td><textarea name="RMCT" id="RMCT" class="right EXT"><?php echo text($RMCT); ?></textarea></td>
2134 <td>
2135 <div class="overlay">
2136 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_RMCT_LMCT"></i>
2137 </div>
2138 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_LMCT_RMCT"></i>
2139 </div>
2140 </div>
2141 <div class="ident"><?php echo xlt('Medial Canthi'); ?></div>
2142 <div class="kb kb_left"><?php echo xlt('RMC{{right medial canthus}}'); ?></div>
2143 <div class="kb kb_right"><?php echo xlt('LMC{{left medial chathus}}'); ?></div></td>
2144 <td><textarea name="LMCT" id="LMCT" class="left EXT"><?php echo text($LMCT); ?></textarea></td>
2145 </tr>
2146 <tr>
2147 <td><textarea name="RADNEXA" id="RADNEXA" class="right EXT"><?php echo text($RADNEXA); ?></textarea></td>
2148 <td>
2149 <div class="overlay">
2150 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_RADNEXA_LADNEXA"></i>
2151 </div>
2152 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_LADNEXA_RADNEXA"></i>
2153 </div>
2154 </div>
2155 <div class="ident"><?php echo xlt('Adnexa'); ?></div>
2156 <div class="kb kb_left"><?php echo xlt('RAD{{right adnexa}}'); ?></div>
2157 <div class="kb kb_right"><?php echo xlt('LAD{{left adnexa}}'); ?></div></td>
2158 <td><textarea name="LADNEXA" id="LADNEXA" class="left EXT"><?php echo text($LADNEXA); ?></textarea></td>
2159 </tr>
2160 </table>
2161 </div> <br />
2162 <div id="EXT_COMMENTS_DIV" class="QP_lengthen" >
2163 <b><?php echo xlt('Comments'); ?>:</b><div class="kb kb_left"><?php echo xlt('ECOM{{external comments abbreviation}}'); ?></div>
2164 <br />
2165 <textarea id="EXT_COMMENTS" name="EXT_COMMENTS" class="EXT"><?php echo text($EXT_COMMENTS); ?></textarea>
2166 </div>
2167 </div>
2168 </div>
2169 <div id="EXT_right" name="EXT_right" class="exam_section_right borderShadow text_clinical">
2170 <?php display_draw_section("EXT", $encounter, $pid); ?>
2171 <div id="PRIORS_EXT_left_text" name="PRIORS_EXT_left_text" class="PRIORS_class PRIORS">
2172 <i class="fa fa-spinner fa-spin"></i>
2173 </div>
2174 <div id="QP_EXT" name="QP_EXT" class="QP_class">
2175 <input type="hidden" id="EXT_prefix" name="EXT_prefix" value="<?php echo attr($EXT_prefix ?? ''); ?>">
2177 <span class="closeButton fa fa-times float-right z100" id="BUTTON_TEXTD_EXT" name="BUTTON_TEXTD_EXT" value="1"></span>
2178 <div class="qp10">
2179 <span class="eye_button eye_button_selected" id="EXT_prefix_off" name="EXT_prefix_off" onclick="$('#EXT_prefix').val('').trigger('change');"><?php echo xlt('Off'); ?></span>
2180 <span class="eye_button" id="EXT_defaults" name="EXT_defaults"><?php echo xlt('Defaults'); ?></span>
2181 <span class="eye_button" id="EXT_prefix_no" name="EXT_prefix_no" onclick="$('#EXT_prefix').val('no').trigger('change');"> <?php echo xlt('no'); ?> </span>
2182 <span class="eye_button" id="EXT_prefix_trace" name="EXT_prefix_trace" onclick="$('#EXT_prefix').val('trace').trigger('change');"> <?php echo xlt('tr'); ?> </span>
2183 <span class="eye_button" id="EXT_prefix_1" name="EXT_prefix_1" onclick="$('#EXT_prefix').val('+1').trigger('change');"> <?php echo xlt('+1'); ?> </span>
2184 <span class="eye_button" id="EXT_prefix_2" name="EXT_prefix_2" onclick="$('#EXT_prefix').val('+2').trigger('change');"> <?php echo xlt('+2'); ?> </span>
2185 <span class="eye_button" id="EXT_prefix_3" name="EXT_prefix_3" onclick="$('#EXT_prefix').val('+3').trigger('change');"> <?php echo xlt('+3'); ?> </span>
2186 <?php echo $selector = priors_select("EXT", $id, $id, $pid); ?>
2187 </div>
2188 <div name="QP_11">
2189 <span class="eye_button" id="EXT_prefix_1mm" name="EXT_prefix_1mm" onclick="$('#EXT_prefix').val('1mm').trigger('change');"> 1<?php echo xlt('mm{{millimeters}}'); ?> </span> <br />
2190 <span class="eye_button" id="EXT_prefix_2mm" name="EXT_prefix_2mm" onclick="$('#EXT_prefix').val('2mm').trigger('change');"> 2<?php echo xlt('mm{{millimeters}}'); ?> </span> <br />
2191 <span class="eye_button" id="EXT_prefix_3mm" name="EXT_prefix_3mm" onclick="$('#EXT_prefix').val('3mm').trigger('change');"> 3<?php echo xlt('mm{{millimeters}}'); ?> </span> <br />
2192 <span class="eye_button" id="EXT_prefix_4mm" name="EXT_prefix_4mm" onclick="$('#EXT_prefix').val('4mm').trigger('change');"> 4<?php echo xlt('mm{{millimeters}}'); ?> </span> <br />
2193 <span class="eye_button" id="EXT_prefix_5mm" name="EXT_prefix_5mm" onclick="$('#EXT_prefix').val('5mm').trigger('change');"> 5<?php echo xlt('mm{{millimeters}}'); ?> </span> <br />
2194 <span class="eye_button" id="EXT_prefix_medial" name="EXT_prefix_medial" onclick="$('#EXT_prefix').val('medial').trigger('change');"><?php echo xlt('med{{medial}}'); ?></span>
2195 <span class="eye_button" id="EXT_prefix_lateral" name="EXT_prefix_lateral" onclick="$('#EXT_prefix').val('lateral').trigger('change');"><?php echo xlt('lat{{lateral}}'); ?></span>
2196 <span class="eye_button" id="EXT_prefix_superior" name="EXT_prefix_superior" onclick="$('#EXT_prefix').val('superior').trigger('change');"><?php echo xlt('sup{{superior}}'); ?></span>
2197 <span class="eye_button" id="EXT_prefix_inferior" name="EXT_prefix_inferior" onclick="$('#EXT_prefix').val('inferior').trigger('change');"><?php echo xlt('inf{{inferior}}'); ?></span>
2198 <span class="eye_button" id="EXT_prefix_anterior" name="EXT_prefix_anterior" onclick="$('#EXT_prefix').val('anterior').trigger('change');"><?php echo xlt('ant{{anterior}}'); ?></span> <br />
2199 <span class="eye_button" id="EXT_prefix_mid" name="EXT_prefix_mid" onclick="$('#EXT_prefix').val('mid').trigger('change');"><?php echo xlt('mid{{middle}}'); ?></span> <br />
2200 <span class="eye_button" id="EXT_prefix_posterior" name="EXT_prefix_posterior" onclick="$('#EXT_prefix').val('posterior').trigger('change');"><?php echo xlt('post{{posterior}}'); ?></span> <br />
2201 <span class="eye_button" id="EXT_prefix_deep" name="EXT_prefix_deep" onclick="$('#EXT_prefix').val('deep').trigger('change');"><?php echo xlt('deep'); ?></span>
2202 <br />
2203 <br />
2204 <span class="eye_button" id="EXT_prefix_clear" name="EXT_prefix_clear"
2205 title="<?php echo xla('This will clear the data from all External Exam fields'); ?>"
2206 onclick="$('#EXT_prefix').val('clear').trigger('change');"><?php echo xlt('clear'); ?></span>
2207 </div>
2209 <div id="EXT_QP_block1" name="EXT_QP_block1" class="QP_block borderShadow text_clinical" >
2211 <?php
2212 echo $QP_ANTSEG = display_QP("EXT", $provider_id); ?>
2213 </div>
2214 </div>
2215 </div>
2216 </div>
2217 <!-- end External Exam -->
2219 <!-- start Anterior Segment -->
2220 <div id="ANTSEG_1" class="clear_both">
2221 <div id="ANTSEG_left" name="ANTSEG_left" class="exam_section_left borderShadow">
2222 <span class="anchor" id="ANTSEG_anchor"></span>
2223 <div class="TEXT_class" id="ANTSEG_left_text">
2224 <span class="closeButton_2 fa fa-paint-brush" title="<?php echo xla('Open/Close the Anterior Segment drawing panel'); ?>" id="BUTTON_DRAW_ANTSEG" name="BUTTON_DRAW_ANTSEG"></span>
2225 <i class="closeButton_3 fa fa-database"title="<?php echo xla('Open/Close the Anterior Segment Exam Quick Picks panel'); ?>" id="BUTTON_QP_ANTSEG" name="BUTTON_QP_ANTSEG"></i>
2226 <i class="closeButton_4 fa fa-user-md" name="Shorthand_kb" title="<?php echo xla("Open/Close the Shorthand Window and display Shorthand Codes"); ?>"></i>
2227 <i class="closeButton fa fa-minus-circle" title="<?php echo xla('Open/Close Ant Seg panels'); ?>" id="BUTTON_TAB_ANTSEG" name="BUTTON_TAB_ANTSEG"></i>
2228 <b><?php echo xlt('Anterior Segment'); ?>:</b><div class="kb kb_left" title="<?php echo xla("Anterior Segment Default Values"); ?>"><?php echo text('DAS'); ?></div><br />
2229 <div id="ANTSEG_left_1" class="text_clinical">
2230 <table>
2231 <?php
2232 list($imaging,$episode) = display($pid, $encounter, "ANTSEG");
2233 echo $episode;
2235 </table>
2236 <table cellspacing="0" cellpadding="0">
2237 <tr>
2238 <td></td><td><?php echo xlt('R{{right}}'); ?></td><td><?php echo xlt('L{{left}}'); ?></td>
2239 </tr>
2240 <tr>
2241 <td class="right" title="<?php echo xla('Gonioscopy'); ?>">
2242 <div class="kb kb_left"><?php echo 'G'; ?></div>
2243 <?php echo xlt('Gonio{{Gonioscopy abbreviation}}'); ?>
2244 </td>
2245 <td><input type="text" name="ODGONIO" id="ODGONIO" value="<?php echo attr($ODGONIO); ?>"></td>
2246 <td><input type="text" name="OSGONIO" id="OSGONIO" value="<?php echo attr($OSGONIO); ?>"></td>
2247 </tr>
2248 <tr>
2249 <td class="right" title="<?php echo xla('Pachymetry: Central Corneal Thickness'); ?>">
2250 <div class="kb kb_left"><?php echo 'PACH'; ?></div>
2251 <?php echo xlt('Pachy{{Pachymetry}}'); ?>
2252 </td>
2253 <td><input type="text" name="ODKTHICKNESS" id="ODKTHICKNESS" value="<?php echo attr($ODKTHICKNESS); ?>">
2254 </td>
2255 <td><input type="text" name="OSKTHICKNESS" id="OSKTHICKNESS" value="<?php echo attr($OSKTHICKNESS); ?>">
2256 </td>
2257 </tr>
2258 <tr>
2259 <td class="right" title="<?php echo xla('Schirmers I (w/o anesthesia)'); ?>">
2260 <div class="kb kb_left"><?php echo 'SCH1'; ?></div>
2261 <?php echo xlt('Schirmers I'); ?> </td>
2262 <td><input type="text" name="ODSCHIRMER1" id="ODSCHIRMER1" value="<?php echo attr($ODSCHIRMER1); ?>">
2263 </td>
2264 <td><input type="text" name="OSSCHIRMER1" id="OSSCHIRMER1" value="<?php echo attr($OSSCHIRMER1); ?>">
2265 </td>
2266 </tr>
2267 <tr>
2268 <td class="right" title="<?php echo xla('Schirmers II (w/ anesthesia)'); ?>">
2269 <div class="kb kb_left"><?php echo 'SCH2'; ?></div>
2270 <?php echo xlt('Schirmers II'); ?> </td>
2271 <td><input type="text" name="ODSCHIRMER2" id="ODSCHIRMER2" value="<?php echo attr($ODSCHIRMER2); ?>">
2272 </td>
2273 <td><input type="text" name="OSSCHIRMER2" id="OSSCHIRMER2" value="<?php echo attr($OSSCHIRMER2); ?>">
2274 </td>
2275 </tr>
2276 <tr>
2277 <td class="right" title="<?php echo xla('Tear Break Up Time'); ?>">
2278 <div class="kb kb_left"><?php echo 'TBUT'; ?></div>
2279 <?php echo xlt('TBUT{{tear breakup time}}'); ?> </td>
2280 <td><input type="text" name="ODTBUT" id="ODTBUT" value="<?php echo attr($ODTBUT); ?>"></td>
2281 <td><input type="text" name="OSTBUT" id="OSTBUT" value="<?php echo attr($OSTBUT); ?>"></td>
2282 </tr>
2283 <tr>
2284 <td colspan="3" rowspan="4" id="dil_box" nowrap="">
2285 <br />
2286 <span id="dil_listbox_title"><?php echo xlt('Dilation'); ?>:</span>
2288 <input type="text" class="float-right" title="<?php echo xla('Dilation Time'); ?>" id="DIL_MEDS" name="DIL_MEDS" value="<?php
2289 if ($DIL_MEDS) {
2290 echo attr($DIL_MEDS); }
2291 ?>" placeholder="Time"/>
2292 <br />
2293 <?php
2294 //TODO: convert to list. How about a jquery multiselect box, stored in DIL_MEDS field with "|" as a delimiter? OK...
2295 //create a list of all our options for dilation Eye_Drug_Dilation
2296 //create the jquery selector. Store results in DB.
2297 //on loading page, and on READ-ONLY, need to convert DIL_MEDS to correct thing here.
2298 //We need times too...
2299 //OK. Second delimiter @ for time, within "|" delimiters
2300 //Do we know what time it is? Yes from IOPTIME code?....
2302 <table id="dil_listbox">
2303 <tr>
2304 <td><input type="checkbox" class="dil_drug" id="CycloMydril" name="CYCLOMYDRIL" value="Cyclomydril" <?php if ($CYCLOMYDRIL == 'Cyclomydril') {
2305 echo "checked='checked'";
2306 } ?> /><label for="CycloMydril" class="input-helper input-helper--checkbox dil_drug_label"><?php echo xlt('CycloMydril'); ?></label>
2307 </td>
2308 <td><input type="checkbox" class="dil_drug" id="Tropicamide" name="TROPICAMIDE" value="Tropicamide 2.5%" <?php if ($TROPICAMIDE == 'Tropicamide 2.5%') {
2309 echo "checked='checked'";
2310 } ?> /><label for="Tropicamide" class="input-helper input-helper--checkbox dil_drug_label"><?php echo xlt('Tropic 2.5%'); ?></label>
2311 </td>
2312 </tr>
2313 <tr>
2314 <td><input type="checkbox" class="dil_drug" id="Neo25" name="NEO25" value="Neosynephrine 2.5%" <?php if ($NEO25 == 'Neosynephrine 2.5%') {
2315 echo "checked='checked'";
2316 } ?> /><label for="Neo25" class="input-helper input-helper--checkbox dil_drug_label"><?php echo xlt('Neo 2.5%'); ?></label>
2317 </td>
2318 <td><input type="checkbox" class="dil_drug" id="Neo10" name="NEO10" value="Neosynephrine 10%" <?php if (($NEO10 ?? null) == 'Neosynephrine 10%') {
2319 echo "checked='checked'";
2320 } ?> /><label for="Neo10" class="input-helper input-helper--checkbox dil_drug_label"><?php echo xlt('Neo 10%'); ?></label>
2321 </td>
2322 </tr>
2323 <tr>
2324 <td><input type="checkbox" class="dil_drug" id="Cyclogyl" name="CYCLOGYL" value="Cyclopentolate 1%" <?php if ($CYCLOGYL == 'Cyclopentolate 1%') {
2325 echo "checked='checked'";
2326 } ?> /><label for="Cyclogyl" class="input-helper input-helper--checkbox dil_drug_label"><?php echo xlt('Cyclo 1%'); ?></label>
2327 </td>
2328 <td><input type="checkbox" class="dil_drug" id="Atropine" name="ATROPINE" value="Atropine 1%" <?php if ($ATROPINE == 'Atropine 1%') {
2329 echo "checked='checked'";
2330 } ?> /><label for="Atropine" class="input-helper input-helper--checkbox dil_drug_label"><?php echo xlt('Atropine 1%'); ?></label>
2331 </td>
2332 </tr>
2333 </table>
2334 </td>
2335 </tr>
2336 </table>
2337 </div>
2339 <?php (($ANTSEG_VIEW ?? null) == '1') ? ($display_ANTSEG_view = "wide_textarea") : ($display_ANTSEG_view = "narrow_textarea");?>
2340 <?php ($display_ANTSEG_view == "wide_textarea") ? ($marker = "fa-minus-square") : ($marker = "fa-plus-square");?>
2341 <div id="ANTSEG_text_list" name="ANTSEG_text_list" class="borderShadow <?php echo attr($display_ANTSEG_view); ?>" >
2342 <span class="top_right far <?php echo attr($marker); ?>" name="ANTSEG_text_view" id="ANTSEG_text_view"></span>
2343 <table cellspacing="0" cellpadding="0">
2344 <tr>
2345 <th>
2346 <i class="float-left fas fa-times copier" id="clear_ANTSEG_OD" title="<?php echo xla('Clear OD{{right eye}} values'); ?>"></i>
2347 <i class="fas fa-angle-double-down copier" id="ANTSEG_defaults_OD" title="<?php echo xla('Enter default values for OD{{right eye}}');?>"></i>
2348 <?php echo xlt('OD{{right eye}}'); ?>
2349 <i class="float-right fas fa-arrow-right copier" id="ANTSEG_OD_OS" title="<?php echo xla('Copy OD{{right eye}} values to') . " " . xla('OS{{left eye}}');?>"></i>
2350 </th>
2351 <th></th>
2352 <th>
2353 <i class="float-left fas fa-arrow-left copier" id="ANTSEG_OS_OD" title="<?php echo xla('Copy OS{{left eye}} values to') . " " . xla('OD{{right eye}}');?>"></i>
2354 <i class="fas fa-angle-double-down copier" id="ANTSEG_defaults_OS" title="<?php echo xla('Enter defaults values for OS{{left eye}}');?>"></i>
2355 <?php echo xlt('OS{{left eye}}'); ?>
2356 <i class="delButton_2 fas fa-times copier" id="clear_ANTSEG_OS" title="<?php echo xla('Delete OS{{left eye}} values'); ?>"></i>
2357 </th>
2358 </tr>
2359 <tr>
2360 <td>
2361 <textarea name="ODCONJ" id="ODCONJ" class="right ANTSEG"><?php echo text($ODCONJ); ?></textarea></td>
2362 <td>
2363 <div class="overlay">
2364 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODCONJ_OSCONJ"></i>
2365 </div>
2366 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSCONJ_ODCONJ"></i>
2367 </div>
2368 </div>
2369 <div class="ident"><?php echo xlt('Conj{{Conjunctiva}}'); ?> / <?php echo xlt('Sclera'); ?></div>
2370 <div class="kb kb_left"><?php echo xlt('RC{{right conjunctiva}}'); ?></div>
2371 <div class="kb kb_right"><?php echo xlt('LC{{left conjunctiva}}'); ?></div></td>
2372 <td><textarea name="OSCONJ" id="OSCONJ" class="left ANTSEG"><?php echo text($OSCONJ); ?></textarea></td>
2373 </tr>
2374 <tr>
2375 <td><textarea name="ODCORNEA" id="ODCORNEA" class="right ANTSEG"><?php echo text($ODCORNEA); ?></textarea></td>
2376 <td>
2377 <div class="overlay">
2378 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODCORNEA_OSCORNEA"></i>
2379 </div>
2380 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSCORNEA_ODCORNEA"></i>
2381 </div>
2382 </div>
2383 <div class="ident"><?php echo xlt('Cornea'); ?></div>
2384 <div class="kb kb_left"><?php echo xlt('RK{{right cornea}}'); ?></div>
2385 <div class="kb kb_right"><?php echo xlt('LK{{left cornea}}'); ?></div>
2386 </td>
2387 <td><textarea name="OSCORNEA" id="OSCORNEA" class="left ANTSEG"><?php echo text($OSCORNEA); ?></textarea></td>
2388 </tr>
2389 <tr>
2390 <td><textarea name="ODAC" id="ODAC" class="right ANTSEG"><?php echo text($ODAC); ?></textarea></td>
2391 <td>
2392 <div class="overlay">
2393 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODAC_OSAC"></i>
2394 </div>
2395 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSAC_ODAC"></i>
2396 </div>
2397 </div><div class="ident"><?php echo xlt('A/C{{anterior chamber}}'); ?></div>
2398 <div class="kb kb_left"><?php echo xlt('RAC{{right anterior chamber}}'); ?></div>
2399 <div class="kb kb_right"><?php echo xlt('LAC{{left anterior chamber}}'); ?></div>
2400 </td>
2401 <td><textarea name="OSAC" id="OSAC" class="left ANTSEG"><?php echo text($OSAC); ?></textarea></td>
2402 </tr>
2403 <tr>
2404 <td><textarea name="ODLENS" id="ODLENS" class="right ANTSEG"><?php echo text($ODLENS); ?></textarea></td>
2405 <td>
2406 <div class="overlay">
2407 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODLENS_OSLENS"></i>
2408 </div>
2409 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSLENS_ODLENS"></i>
2410 </div>
2411 </div>
2412 <div class="ident"><?php echo xlt('Lens'); ?></div>
2413 <div class="kb kb_left"><?php echo xlt('RL{{right lens}}'); ?></div>
2414 <div class="kb kb_right"><?php echo xlt('LL{{left lens}}'); ?></div>
2415 </td>
2416 <td><textarea name="OSLENS" id="OSLENS" class="left ANTSEG"><?php echo text($OSLENS); ?></textarea></td>
2417 </tr>
2418 <tr>
2419 <td><textarea name="ODIRIS" id="ODIRIS" class="right ANTSEG"><?php echo text($ODIRIS); ?></textarea></td>
2420 <td>
2421 <div class="overlay">
2422 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODIRIS_OSIRIS"></i>
2423 </div>
2424 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSIRIS_ODIRIS"></i>
2425 </div>
2426 </div>
2427 <div class="ident"><?php echo xlt('Iris'); ?></div>
2428 <div class="kb kb_left"><?php echo xlt('RI{{right iris}}'); ?></div>
2429 <div class="kb kb_right"><?php echo xlt('LI{{left iris}}'); ?></div>
2430 </td>
2431 <td><textarea name="OSIRIS" id="OSIRIS" class="left ANTSEG"><?php echo text($OSIRIS); ?></textarea></td>
2432 </tr>
2433 </table>
2434 </div> <br />
2435 <div class="QP_lengthen" id="ANTSEG_COMMENTS_DIV">
2436 <b><?php echo xlt('Comments'); ?>:</b><div class="kb kb_left"><?php echo xlt('ACOM{{Anterior Segment}}'); ?> </div><br />
2437 <textarea id="ANTSEG_COMMENTS" name="ANTSEG_COMMENTS"><?php echo text($ANTSEG_COMMENTS); ?></textarea>
2438 </div>
2439 </div>
2440 </div>
2441 <div id="ANTSEG_right" name=="ANTSEG_right" class="exam_section_right borderShadow text_clinical ">
2442 <div id="PRIORS_ANTSEG_left_text" name="PRIORS_ANTSEG_left_text" class="PRIORS_class PRIORS">
2443 <i class="fa fa-spinner fa-spin"></i>
2444 </div>
2445 <?php display_draw_section("ANTSEG", $encounter, $pid); ?>
2446 <div id="QP_ANTSEG" name="QP_ANTSEG" class="QP_class">
2447 <input type="hidden" id="ANTSEG_prefix" name="ANTSEG_prefix" value="">
2448 <div class="qp10">
2449 <span class="eye_button eye_button_selected" id="ANTSEG_prefix_off" name="ANTSEG_prefix_off" onclick="$('#ANTSEG_prefix').val('off').trigger('change');"><?php echo xlt('Off'); ?> </span>
2450 <span class="eye_button" id="ANTSEG_defaults" name="ANTSEG_defaults"><?php echo xlt('Defaults'); ?></span>
2451 <span class="eye_button" id="ANTSEG_prefix_no" name="ANTSEG_prefix_no" onclick="$('#ANTSEG_prefix').val('no').trigger('change');"> <?php echo xlt('no'); ?> </span>
2452 <span class="eye_button" id="ANTSEG_prefix_trace" name="ANTSEG_prefix_trace" onclick="$('#ANTSEG_prefix').val('trace').trigger('change');"> <?php echo xlt('tr'); ?> </span>
2453 <span class="eye_button" id="ANTSEG_prefix_1" name="ANTSEG_prefix_1" onclick="$('#ANTSEG_prefix').val('+1').trigger('change');"> <?php echo xlt('+1'); ?> </span>
2454 <span class="eye_button" id="ANTSEG_prefix_2" name="ANTSEG_prefix_2" onclick="$('#ANTSEG_prefix').val('+2').trigger('change');"> <?php echo xlt('+2'); ?> </span>
2455 <span class="eye_button" id="ANTSEG_prefix_3" name="ANTSEG_prefix_3" onclick="$('#ANTSEG_prefix').val('+3').trigger('change');"> <?php echo xlt('+3'); ?> </span>
2456 <?php echo $selector = priors_select("ANTSEG", $id, $id, $pid); ?>
2457 </div>
2458 <div name="QP_11">
2459 <span class="eye_button" id="ANTSEG_prefix_1mm" name="ANTSEG_prefix_1mm" onclick="$('#ANTSEG_prefix').val('1mm').trigger('change');"> <?php echo xlt('1mm'); ?> </span> <br />
2460 <span class="eye_button" id="ANTSEG_prefix_2mm" name="ANTSEG_prefix_2mm" onclick="$('#ANTSEG_prefix').val('2mm').trigger('change');"> <?php echo xlt('2mm'); ?> </span> <br />
2461 <span class="eye_button" id="ANTSEG_prefix_3mm" name="ANTSEG_prefix_3mm" onclick="$('#ANTSEG_prefix').val('3mm').trigger('change');"> <?php echo xlt('3mm'); ?> </span> <br />
2462 <span class="eye_button" id="ANTSEG_prefix_4mm" name="ANTSEG_prefix_4mm" onclick="$('#ANTSEG_prefix').val('4mm').trigger('change');"> <?php echo xlt('4mm'); ?> </span> <br />
2463 <span class="eye_button" id="ANTSEG_prefix_5mm" name="ANTSEG_prefix_5mm" onclick="$('#ANTSEG_prefix').val('5mm').trigger('change');"> <?php echo xlt('5mm'); ?> </span> <br />
2464 <span class="eye_button" id="ANTSEG_prefix_medial" name="ANTSEG_prefix_medial" onclick="$('#ANTSEG_prefix').val('medial').trigger('change');"><?php echo xlt('med{{medial}}'); ?></span>
2465 <span class="eye_button" id="ANTSEG_prefix_lateral" name="ANTSEG_prefix_lateral" onclick="$('#ANTSEG_prefix').val('lateral').trigger('change');"><?php echo xlt('lat{{lateral}}'); ?></span>
2466 <span class="eye_button" id="ANTSEG_prefix_superior" name="ANTSEG_prefix_superior" onclick="$('#ANTSEG_prefix').val('superior').trigger('change');"><?php echo xlt('sup{{superior}}'); ?></span>
2467 <span class="eye_button" id="ANTSEG_prefix_inferior" name="ANTSEG_prefix_inferior" onclick="$('#ANTSEG_prefix').val('inferior').trigger('change');"><?php echo xlt('inf{{inferior}}'); ?></span>
2468 <span class="eye_button" id="ANTSEG_prefix_anterior" name="ANTSEG_prefix_anterior" onclick="$('#ANTSEG_prefix').val('anterior').trigger('change');"><?php echo xlt('ant{{anterior}}'); ?></span> <br />
2469 <span class="eye_button" id="ANTSEG_prefix_mid" name="ANTSEG_prefix_mid" onclick="$('#ANTSEG_prefix').val('mid').trigger('change');"><?php echo xlt('mid'); ?></span> <br />
2470 <span class="eye_button" id="ANTSEG_prefix_posterior" name="ANTSEG_prefix_posterior" onclick="$('#ANTSEG_prefix').val('posterior').trigger('change');"><?php echo xlt('post{{posterior}}'); ?></span> <br />
2471 <span class="eye_button" id="ANTSEG_prefix_deep" name="ANTSEG_prefix_deep" onclick="$('#ANTSEG_prefix').val('deep').trigger('change');"><?php echo xlt('deep'); ?></span>
2472 <br />
2473 <br />
2474 <span class="eye_button" id="ANTSEG_prefix_clear" name="ANTSEG_prefix_clear" title="<?php echo xla('This will clear the data from all Anterior Segment Exam fields'); ?>" onclick="$('#ANTSEG_prefix').val('clear').trigger('change');"><?php echo xlt('clear'); ?></span>
2476 </div>
2477 <div class="QP_block borderShadow text_clinical " >
2478 <?php echo $QP_ANTSEG = display_QP("ANTSEG", $provider_id); ?>
2479 </div>
2480 <span class="closeButton fa fa-times float-right z100" id="BUTTON_TEXTD_ANTSEG" name="BUTTON_TEXTD_ANTSEG"></span>
2481 </div>
2482 </div>
2483 </div>
2484 <!-- end Ant Seg -->
2486 <!-- start POSTSEG -->
2487 <div id="POSTSEG_1" class="clear_both" >
2488 <div id="RETINA_left" name="RETINA_left" class="exam_section_left borderShadow">
2489 <span class="anchor" id="RETINA_anchor"></span>
2490 <div class="TEXT_class" id="RETINA_left_text" name="RETINA_left_text">
2491 <span class="closeButton_2 fa fa-paint-brush" title="<?php echo xla('Open/Close the Retina drawing panel'); ?>" id="BUTTON_DRAW_RETINA" name="BUTTON_DRAW_RETINA"></span>
2492 <i class="closeButton_3 fa fa-database"title="<?php echo xla('Open/Close the Retinal Exam Quick Picks panel'); ?>" id="BUTTON_QP_RETINA" name="BUTTON_QP_RETINA"></i>
2493 <i class="closeButton_4 fa fa-user-md" name="Shorthand_kb" title="<?php echo xla("Open/Close the Shorthand Window and display Shorthand Codes"); ?>"></i>
2494 <i class="closeButton fa fa-minus-circle" title="<?php echo xla('Open/Close Post Seg panels'); ?>" id="BUTTON_TAB_POSTSEG" name="BUTTON_TAB_POSTSEG"></i>
2495 <b><?php echo xlt('Retina'); ?>:</b><div class="kb kb_left" title="<?php echo xla("Retina Default Values"); ?>"><?php echo text('DRET'); ?></div>
2496 <input type="checkbox" id="DIL_RISKS" name="DIL_RISKS" value="on" <?php if ($DIL_RISKS == 'on') {
2497 echo "checked='checked'";
2498 } ?>>
2499 <label for="DIL_RISKS" class="input-helper input-helper--checkbox"><?php echo xlt('Dilation orders/risks reviewed'); ?></label>
2500 <br />
2501 <div id="RETINA_left_1" class="text_clinical">
2502 <table>
2503 <?php
2504 list($imaging,$episode) = display($pid, $encounter, "POSTSEG");
2505 echo $episode;
2507 </table>
2509 <table>
2510 <tr class="bold">
2511 <td></td>
2512 <td><?php echo xlt('OD{{right eye}}'); ?> </td><td><?php echo xlt('OS{{left eye}}'); ?> </td>
2513 </tr>
2514 <tr>
2516 <td class="bold right">
2517 <div class="kb kb_left"><?php echo 'CUP'; ?></div>
2518 <?php echo xlt('C/D Ratio{{cup to disc ration}}'); ?>:</td>
2519 <td>
2520 <input type="text" class="RETINA" name="ODCUP" size="4" id="ODCUP" value="<?php echo attr($ODCUP); ?>">
2521 </td>
2522 <td>
2523 <input type="text" class="RETINA" name="OSCUP" size="4" id="OSCUP" value="<?php echo attr($OSCUP); ?>">
2524 </td>
2525 </tr>
2527 <tr>
2528 <td class="bold right">
2529 <div class="kb kb_left"><?php echo 'CMT'; ?></div>
2530 <?php echo xlt('CMT{{Central Macular Thickness}}'); ?>:</td>
2531 <td>
2532 <input class="RETINA" type="text" name="ODCMT" size="4" id="ODCMT" value="<?php echo attr($ODCMT); ?>">
2533 </td>
2534 <td>
2535 <input class="RETINA" type="text" name="OSCMT" size="4" id="OSCMT" value="<?php echo attr($OSCMT); ?>">
2536 </td>
2537 </tr>
2538 </table>
2539 <br />
2540 <table>
2541 <?php
2542 list($imaging,$episode) = display($pid, $encounter, "NEURO");
2543 echo $episode;
2545 </table>
2546 </div>
2548 <?php (($RETINA_VIEW ?? null) == 1) ? ($display_RETINA_view = "wide_textarea") : ($display_RETINA_view = "narrow_textarea");?>
2549 <?php ($display_RETINA_view == "wide_textarea") ? ($marker = "fa-minus-square") : ($marker = "fa-plus-square");?>
2550 <div>
2551 <div id="RETINA_text_list" name="RETINA_text_list" class="borderShadow <?php echo attr($display_RETINA_view); ?>">
2552 <span class="top_right far <?php echo attr($marker); ?>" name="RETINA_text_view" id="RETINA_text_view"></span>
2553 <table cellspacing="0" cellpadding="0">
2554 <tr>
2555 <th>
2556 <i class="float-left fas fa-times copier" id="clear_RETINA_OD" title="<?php echo xla('Clear OD{{right eye}} values'); ?>"></i>
2557 <i class="fas fa-angle-double-down copier" id="RETINA_defaults_OD" title="<?php echo xla('Enter default values for OD{{right eye}}');?>"></i>
2558 <?php echo xlt('OD{{right eye}}'); ?>
2559 <i class="float-right fas fa-arrow-right copier" id="RETINA_OD_OS" title="<?php echo xla('Copy OD{{right eye}} values to') . " " . xla('OS{{left eye}}');?>"></i>
2560 </th>
2561 <th></th>
2562 <th>
2563 <i class="float-left fas fa-arrow-left copier" id="RETINA_OS_OD" title="<?php echo xla('Copy OS{{left eye}} values to') . " " . xla('OD{{right eye}}');?>"></i>
2564 <i class="fas fa-angle-double-down copier" id="RETINA_defaults_OS" title="<?php echo xla('Enter defaults values for OS{{left eye}}');?>"></i>
2565 <?php echo xlt('OS{{left eye}}'); ?>
2566 <i class="delButton_2 fas fa-times copier" id="clear_RETINA_OS" title="<?php echo xla('Delete OS{{left eye}} values'); ?>"></i>
2567 </th>
2568 </tr>
2569 <tr>
2570 <td><textarea name="ODDISC" id="ODDISC" class="RETINA right"><?php echo text($ODDISC); ?></textarea></td>
2571 <td>
2572 <div class="overlay">
2573 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODDISC_OSDISC"></i>
2574 </div>
2575 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSDISC_ODDISC"></i>
2576 </div>
2577 </div>
2579 <div class="ident"><?php echo xlt('Disc'); ?></div>
2580 <div class="kb kb_left"><?php echo xlt('RD{{right disc}}'); ?></div>
2581 <div class="kb kb_right"><?php echo xlt('LD{{left disc}}'); ?></div></td>
2582 <td><textarea name="OSDISC" id="OSDISC" class="left RETINA"><?php echo text($OSDISC); ?></textarea></td>
2583 </tr>
2584 <tr>
2585 <td><textarea name="ODMACULA" id="ODMACULA" class="RETINA right"><?php echo text($ODMACULA); ?></textarea></td>
2586 <td>
2587 <div class="overlay">
2588 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODMACULA_OSMACULA"></i>
2589 </div>
2590 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSMACULA_ODMACULA"></i>
2591 </div>
2592 </div>
2593 <div class="ident"><?php echo xlt('Macula'); ?></div>
2594 <div class="kb kb_left"><?php echo xlt('RMAC{{right macula}}'); ?></div>
2595 <div class="kb kb_right"><?php echo xlt('LMAC{{left macula}}'); ?></div>
2596 </td>
2597 <td><textarea name="OSMACULA" id="OSMACULA" class="left RETINA"><?php echo text($OSMACULA); ?></textarea></td>
2598 </tr>
2599 <tr>
2600 <td><textarea name="ODVESSELS" id="ODVESSELS" class="RETINA right"><?php echo text($ODVESSELS); ?></textarea></td>
2601 <td>
2602 <div class="overlay">
2603 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODVESSELS_OSVESSELS"></i>
2604 </div>
2605 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSVESSELS_ODVESSELS"></i>
2606 </div>
2607 </div>
2609 <div class="ident"><?php echo xlt('Vessels'); ?></div>
2610 <div class="kb kb_left"><?php echo xlt('RV{{right vessels}}'); ?></div>
2611 <div class="kb kb_right"><?php echo xlt('LV{{left vessels}}'); ?></div></td>
2612 <td><textarea name="OSVESSELS" id="OSVESSELS" class="left RETINA"><?php echo text($OSVESSELS); ?></textarea></td>
2613 </tr>
2614 <tr>
2615 <td><textarea name="ODVITREOUS" id="ODVITREOUS" class="RETINA right"><?php echo text($ODVITREOUS); ?></textarea></td>
2616 <td>
2617 <div class="overlay">
2618 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODVITREOUS_OSVITREOUS"></i>
2619 </div>
2620 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSVITREOUS_ODVITREOUS"></i>
2621 </div>
2622 </div>
2624 <div class="ident"><?php echo xlt('Vitreous'); ?></div>
2625 <div class="kb kb_left"><?php echo xlt('RVIT{{right vitreous}}'); ?></div>
2626 <div class="kb kb_right"><?php echo xlt('LVIT{{left vitreous}}'); ?></div></td>
2627 <td><textarea name="OSVITREOUS" id="OSVITREOUS" class="left RETINA"><?php echo text($OSVITREOUS); ?></textarea></td>
2628 </tr>
2629 <tr>
2630 <td><textarea name="ODPERIPH" id="ODPERIPH" class="RETINA right"><?php echo text($ODPERIPH); ?></textarea></td>
2631 <td>
2632 <div class="overlay">
2633 <div class="cpf_left copier"><i class="fa fa-arrow-left" id="cpf_ODPERIPH_OSPERIPH"></i>
2634 </div>
2635 <div class="cpf_right copier"><i class="fa fa-arrow-right" id="cpf_OSPERIPH_ODPERIPH"></i>
2636 </div>
2637 </div>
2638 <div class="ident"><?php echo xlt('Periph{{peripheral retina}}'); ?></div>
2639 <div class="kb kb_left"><?php echo xlt('RP{{right peripheral retina}}'); ?></div>
2640 <div class="kb kb_right"><?php echo xlt('LP{{left peripheral retina}}'); ?></div>
2641 </td>
2642 <td><textarea name="OSPERIPH" id="OSPERIPH" class="left RETINA"><?php echo text($OSPERIPH); ?></textarea></td>
2643 </tr>
2644 </table>
2645 </div>
2646 </div>
2647 <div class="QP_lengthen" id="RETINA_COMMENTS_DIV">
2648 <b><?php echo xlt('Comments'); ?>:</b><div class="kb kb_left"><?php echo xlt('RCOM{{right comments}}'); ?></div><br />
2649 <textarea id="RETINA_COMMENTS" class="RETINA" name="RETINA_COMMENTS"><?php echo text($RETINA_COMMENTS); ?></textarea>
2650 </div>
2651 </div>
2652 </div>
2654 <div id="RETINA_right" class="exam_section_right borderShadow text_clinical">
2655 <div id="PRIORS_RETINA_left_text"
2656 name="PRIORS_RETINA_left_text"
2657 class="PRIORS_class PRIORS"><i class="fa fa-spinner fa-spin"></i>
2658 </div>
2659 <?php display_draw_section("RETINA", $encounter, $pid); ?>
2660 <div id="QP_RETINA" name="QP_RETINA" class="QP_class">
2661 <input type="hidden" id="RETINA_prefix" name="RETINA_prefix" value="" />
2662 <div class="qp10">
2663 <span class="eye_button eye_button_selected" id="RETINA_prefix_off" name="RETINA_prefix_off" onclick="$('#RETINA_prefix').val('').trigger('change');"><?php echo xlt('Off'); ?></span>
2664 <span class="eye_button" id="RETINA_defaults" name="RETINA_defaults"><?php echo xlt('Defaults'); ?></span>
2665 <span class="eye_button" id="RETINA_prefix_no" name="RETINA_prefix_no" onclick="$('#RETINA_prefix').val('no').trigger('change');"> <?php echo xlt('no'); ?> </span>
2666 <span class="eye_button" id="RETINA_prefix_trace" name="RETINA_prefix_trace" onclick="$('#RETINA_prefix').val('trace').trigger('change');"> <?php echo xlt('tr'); ?> </span>
2667 <span class="eye_button" id="RETINA_prefix_1" name="RETINA_prefix_1" onclick="$('#RETINA_prefix').val('+1').trigger('change');"> <?php echo xlt('+1'); ?> </span>
2668 <span class="eye_button" id="RETINA_prefix_2" name="RETINA_prefix_2" onclick="$('#RETINA_prefix').val('+2').trigger('change');"> <?php echo xlt('+2'); ?> </span>
2669 <span class="eye_button" id="RETINA_prefix_3" name="RETINA_prefix_3" onclick="$('#RETINA_prefix').val('+3').trigger('change');"> <?php echo xlt('+3'); ?> </span>
2670 <?php echo $selector = priors_select("RETINA", $id, $id, $pid); ?>
2671 </div>
2672 <div name="QP_11">
2673 <span class="eye_button" id="RETINA_prefix_1mm" name="RETINA_prefix_1mm" onclick="$('#RETINA_prefix').val('1mm').trigger('change');"> <?php echo xlt('1mm'); ?> </span> <br />
2674 <span class="eye_button" id="RETINA_prefix_2mm" name="RETINA_prefix_2mm" onclick="$('#RETINA_prefix').val('2mm').trigger('change');"> <?php echo xlt('2mm'); ?> </span> <br />
2675 <span class="eye_button" id="RETINA_prefix_3mm" name="RETINA_prefix_3mm" onclick="$('#RETINA_prefix').val('3mm').trigger('change');"> <?php echo xlt('3mm'); ?> </span> <br />
2676 <span class="eye_button" id="RETINA_prefix_4mm" name="RETINA_prefix_4mm" onclick="$('#RETINA_prefix').val('4mm').trigger('change');"> <?php echo xlt('4mm'); ?> </span> <br />
2677 <span class="eye_button" id="RETINA_prefix_5mm" name="RETINA_prefix_5mm" onclick="$('#RETINA_prefix').val('5mm').trigger('change');"> <?php echo xlt('5mm'); ?> </span> <br />
2678 <span class="eye_button" id="RETINA_prefix_nasal" name="RETINA_prefix_nasal" onclick="$('#RETINA_prefix').val('nasal').trigger('change');"><?php echo xlt('nasal'); ?></span>
2679 <span class="eye_button" id="RETINA_prefix_temp" name="RETINA_prefix_temp" onclick="$('#RETINA_prefix').val('temp').trigger('change');"><?php echo xlt('temp{{temporal}}'); ?></span>
2680 <span class="eye_button" id="RETINA_prefix_superior" name="RETINA_prefix_superior" onclick="$('#RETINA_prefix').val('superior').trigger('change');"><?php echo xlt('sup{{superior}}'); ?></span>
2681 <span class="eye_button" id="RETINA_prefix_inferior" name="RETINA_prefix_inferior" onclick="$('#RETINA_prefix').val('inferior').trigger('change');"><?php echo xlt('inf{{inferior}}'); ?></span>
2682 <span class="eye_button" id="RETINA_prefix_anterior" name="RETINA_prefix_anterior" onclick="$('#RETINA_prefix').val('anterior').trigger('change');"><?php echo xlt('ant{{anterior}}'); ?></span> <br />
2683 <span class="eye_button" id="RETINA_prefix_mid" name="RETINA_prefix_mid" onclick="$('#RETINA_prefix').val('mid').trigger('change');"><?php echo xlt('mid{{middle}}'); ?></span> <br />
2684 <span class="eye_button" id="RETINA_prefix_posterior" name="RETINA_prefix_posterior" onclick="$('#RETINA_prefix').val('posterior').trigger('change');"><?php echo xlt('post{{posterior}}'); ?></span> <br />
2685 <span class="eye_button" id="RETINA_prefix_deep" name="RETINA_prefix_deep" onclick="$('#RETINA_prefix').val('deep').trigger('change');"><?php echo xlt('deep'); ?></span>
2686 <br />
2687 <br />
2688 <span class="eye_button" id="RETINA_prefix_clear" name="RETINA_prefix_clear" title="<?php echo xla('This will clear the data from all Retina Exam fields'); ?>" onclick="$('#RETINA_prefix').val('clear').trigger('change');"><?php echo xlt('clear'); ?></span>
2689 </div>
2690 <div class="QP_block borderShadow text_clinical" >
2691 <?php echo $QP_RETINA = display_QP("RETINA", $provider_id); ?>
2692 </div>
2693 <span class="closeButton fa fa-times float-right z100" id="BUTTON_TEXTD_RETINA" name="BUTTON_TEXTD_RETINA" value="1"></span>
2694 </div>
2695 </div>
2696 </div>
2697 <!-- end Retina -->
2699 <!-- start Neuro -->
2700 <div id="NEURO_1" class="clear_both">
2701 <div id="NEURO_left" class="exam_section_left borderShadow">
2702 <span class="anchor" id="NEURO_anchor"></span>
2703 <div class="TEXT_class" id="NEURO_left_text" name="NEURO_left_text">
2704 <span class="closeButton_2 fa fa-paint-brush" id="BUTTON_DRAW_NEURO" title="<?php echo xla('Open/Close the Neuro drawing panel'); ?>" name="BUTTON_DRAW_NEURO"></span>
2705 <i class="closeButton_3 fa fa-database" title="<?php echo xla('Open/Close the Neuro Exam Quick Picks panel'); ?>" id="BUTTON_QP_NEURO" name="BUTTON_QP_NEURO"></i>
2706 <i class="closeButton_4 fa fa-user-md" name="Shorthand_kb" title="<?php echo xla("Open/Close the Shorthand Window and display Shorthand Codes"); ?>"></i>
2707 <i class="closeButton fa fa-minus-circle" title="<?php echo xla('Open/Close Neuro panels'); ?>" id="BUTTON_TAB_NEURO" name="BUTTON_TAB_NEURO"></i>
2708 <b><?php echo xlt('Neuro'); ?>:</b><div class="kb kb_left" title="<?php echo xla("Neuro/Phys Exam Default Values") . " " . xlt('including CVF{{Confrontational Visual Fields}} and Pupils'); ?>"><?php echo text('DNEURO'); ?></div><br />
2709 <div id="NEURO_left_1" class="text_clinical">
2710 <div id="NEURO_color" class="borderShadow">
2711 <table>
2712 <tr>
2713 <td></td><td style="text-align:center;"><?php echo xlt('OD{{right eye}}'); ?></td>
2714 <td style="text-align:center;"><?php echo xlt('OS{{left eye}}'); ?></td>
2715 </tr>
2716 <tr>
2717 <td class="right"><?php echo xlt('Color'); ?>: </td>
2718 <td><input type="text" name="ODCOLOR" id="ODCOLOR" value="<?php if ($ODCOLOR) {
2719 echo text($ODCOLOR);
2720 } else {
2721 echo "";
2722 } ?>"/></td>
2723 <td><input type="text" name="OSCOLOR" id="OSCOLOR" value="<?php if ($OSCOLOR) {
2724 echo text($OSCOLOR);
2725 } else {
2726 echo "";
2727 } ?>"/></td>
2728 <td><!-- //Normals may be 11/11 or 15/15. Need to make a preference here for the user.
2729 //or just take the normal they use and incorporate that ongoing? -->
2730 &nbsp;<span title="<?php echo xlt('Insert normals'); ?> - 11/11" class="fa fa-reply" id="NEURO_COLOR" name="NEURO_COLOR" ></span>
2731 </td>
2732 </tr>
2733 <tr>
2734 <td class="right">
2735 <span title="Variation in red color discrimination between the eyes (eg. OD=100, OS=75)"><?php echo xlt('Red Desat{{red desaturation}}'); ?>:</span>
2736 </td>
2737 <td>
2738 <input type="text" name="ODREDDESAT" id="ODREDDESAT" value="<?php echo attr($ODREDDESAT); ?>"/>
2739 </td>
2740 <td>
2741 <input type="text" name="OSREDDESAT" id="OSREDDESAT" value="<?php echo attr($OSREDDESAT); ?>"/>
2742 </td>
2743 <td>
2744 &nbsp; <span title="<?php echo xlt('Insert normals - 100/100'); ?>" class="fa fa-reply" id="NEURO_REDDESAT" name="NEURO_REDDESAT"></span>
2745 </td>
2746 </tr>
2747 <tr>
2748 <td class="right" style="white-space: nowrap;">
2749 <span title="<?php echo xlt('Variation in white (muscle) light brightness discrimination between the eyes (eg. OD=$1.00, OS=$0.75)'); ?>"><?php echo xlt('Coins'); ?>:</span>
2750 </td>
2751 <td>
2752 <input type="text" name="ODCOINS" id="ODCOINS" value="<?php echo attr($ODCOINS); ?>"/>
2753 </td>
2754 <td>
2755 <input type="text" name="OSCOINS" id="OSCOINS" value="<?php echo attr($OSCOINS); ?>"/>
2756 </td>
2757 <td>
2758 &nbsp;<span title="<?php echo xla('Insert normals'); ?> - 100/100" class="fa fa-reply" id="NEURO_COINS" name="NEURO_COINS"></span>
2759 </td>
2760 </tr>
2761 </table>
2762 </div>
2763 <div class="borderShadow" id="NEURO_11">
2764 <i class="fa fa-th fa-fw closeButton_2" id="Close_ACTMAIN" name="Close_ACTMAIN"></i>
2765 <table class="ACT_top">
2766 <tr>
2767 <td >
2768 <span id="ACTTRIGGER" name="ACTTRIGGER"><?php echo xlt('Alternate Cover Test'); ?>:</span>
2769 </td>
2770 <td>
2771 <span id="ACTNORMAL_CHECK" name="ACTNORMAL_CHECK">
2772 <label for="ACT" class="input-helper input-helper--checkbox"><?php echo xlt('Ortho{{orthophoric}}'); ?></label>
2773 <input type="checkbox" name="ACT" id="ACT" <?php if ($ACT == 'on' or $ACT == '1') {
2774 echo "checked='checked'";
2775 } ?> /></span>
2776 </td>
2777 </tr>
2778 <tr>
2779 <td colspan="2"> <br />
2780 <div id="ACTMAIN" name="ACTMAIN" class="nodisplay ACT_TEXT">
2781 <table id="ACTTABLE">
2782 <tr>
2783 <td id="ACT_tab_SCDIST" name="ACT_tab_SCDIST" class="ACT_selected"> <?php echo xlt('scDist{{without correction distance}}'); ?> </td>
2784 <td id="ACT_tab_CCDIST" name="ACT_tab_CCDIST" class="ACT_deselected"> <?php echo xlt('ccDist{{with correction distance}}'); ?> </td>
2785 <td id="ACT_tab_SCNEAR" name="ACT_tab_SCNEAR" class="ACT_deselected"> <?php echo xlt('scNear{{without correction near}}'); ?> </td>
2786 <td id="ACT_tab_CCNEAR" name="ACT_tab_CCNEAR" class="ACT_deselected"> <?php echo xlt('ccNear{{with correction at near}}'); ?> </td>
2787 </tr>
2788 <tr>
2789 <td colspan="4"><div id="ACT_SCDIST" name="ACT_SCDIST" class="ACT_box">
2790 <br />
2791 <table>
2792 <tr>
2793 <td><?php echo xlt('R{{right}}'); ?></td>
2794 <td style="border-right:1pt solid black;border-bottom:1pt solid black;">
2795 <textarea id="ACT1SCDIST" name="ACT1SCDIST" class="ACT"><?php echo text($ACT1SCDIST); ?></textarea></td>
2796 <td style="border:1pt solid black;border-top:0pt;">
2797 <textarea id="ACT2SCDIST" name="ACT2SCDIST"class="ACT"><?php echo text($ACT2SCDIST); ?></textarea></td>
2798 <td style="border-left:1pt solid black;border-bottom:1pt solid black;">
2799 <textarea id="ACT3SCDIST" name="ACT3SCDIST" class="ACT"><?php echo text($ACT3SCDIST); ?></textarea></td>
2800 <td><?php echo xlt('L{{left}}'); ?></td>
2801 </tr>
2802 <tr>
2803 <td style="text-align:middle;"><i class="fa fa-reply rotate-left"></i></td>
2804 <td style="border:1pt solid black;border-left:0pt;">
2805 <textarea id="ACT4SCDIST" name="ACT4SCDIST" class="ACT"><?php echo text($ACT4SCDIST); ?></textarea></td>
2806 <td style="border:1pt solid black;">
2807 <textarea id="ACT5SCDIST" class="neurosens2 ACT" name="ACT5SCDIST"><?php echo text($ACT5SCDIST); ?></textarea></td>
2808 <td style="border:1pt solid black;border-right:0pt;">
2809 <textarea id="ACT6SCDIST" name="ACT6SCDIST" class="ACT"><?php echo text($ACT6SCDIST); ?></textarea></td>
2810 <td><i class="fa fa-reply flip-left"></i></td>
2811 </tr>
2812 <tr>
2813 <td style="border:0; border-top:2pt solid black;border-right:2pt solid black;text-align:right;">
2814 <textarea id="ACT10SCDIST" name="ACT10SCDIST" class="ACT"><?php echo text($ACT10SCDIST); ?></textarea></td>
2815 <td style="border-right:1pt solid black;border-top:1pt solid black;text-align:right;">
2816 <textarea id="ACT7SCDIST" name="ACT7SCDIST" class="ACT"><?php echo text($ACT7SCDIST); ?></textarea></td>
2817 <td style="border:1pt solid black;border-bottom:0pt;text-align:center;">
2818 <textarea id="ACT8SCDIST" name="ACT8SCDIST" class="ACT"><?php echo text($ACT8SCDIST); ?></textarea></td>
2819 <td style="border-left:1pt solid black;border-top:1pt solid black;text-align:left;">
2820 <textarea id="ACT9SCDIST" name="ACT9SCDIST" class="ACT"><?php echo text($ACT9SCDIST); ?></textarea></td>
2821 <td style="border:0; border-top:2pt solid black;border-left:2pt solid black;text-align:left;vertical-align:middle;">
2822 <textarea id="ACT11SCDIST" name="ACT11SCDIST" class="ACT"><?php echo text($ACT11SCDIST); ?></textarea>
2823 </td>
2824 </tr>
2825 </table>
2826 <br />
2827 </div>
2828 <div id="ACT_CCDIST" name="ACT_CCDIST" class="nodisplay ACT_box">
2829 <br />
2830 <table>
2831 <tr>
2832 <td style="text-align:center;"><?php echo xlt('R{{right}}'); ?></td>
2833 <td style="border-right:1pt solid black;border-bottom:1pt solid black;text-align:right;">
2834 <textarea id="ACT1CCDIST" name="ACT1CCDIST" class="ACT"><?php echo text($ACT1CCDIST); ?></textarea></td>
2835 <td style="border:1pt solid black;border-top:0pt;text-align:center;">
2836 <textarea id="ACT2CCDIST" name="ACT2CCDIST"class="ACT"><?php echo text($ACT2CCDIST); ?></textarea></td>
2837 <td style="border-left:1pt solid black;border-bottom:1pt solid black;text-align:left;">
2838 <textarea id="ACT3CCDIST" name="ACT3CCDIST" class="ACT"><?php echo text($ACT3CCDIST); ?></textarea></td>
2839 <td style="text-align:center;"><?php echo xlt('L{{left}}'); ?></td>
2840 </tr>
2841 <tr>
2842 <td style="text-align:middle;"><i class="fa fa-reply rotate-left"></i></td>
2843 <td style="border:1pt solid black;border-left:0pt;text-align:right;">
2844 <textarea id="ACT4CCDIST" name="ACT4CCDIST" class="ACT"><?php echo text($ACT4CCDIST); ?></textarea></td>
2845 <td style="border:1pt solid black;text-align:center;">
2846 <textarea id="ACT5CCDIST" name="ACT5CCDIST" class="neurosens2 ACT"><?php echo text($ACT5CCDIST); ?></textarea></td>
2847 <td style="border:1pt solid black;border-right:0pt;text-align:left;">
2848 <textarea id="ACT6CCDIST" name="ACT6CCDIST" class="ACT"><?php echo text($ACT6CCDIST); ?></textarea></td>
2849 <td><i class="fa fa-reply flip-left"></i></td>
2850 </tr>
2851 <tr>
2852 <td style="border:0; border-top:2pt solid black;border-right:2pt solid black;text-align:right;">
2853 <textarea id="ACT10CCDIST" name="ACT10CCDIST" class="ACT"><?php echo text($ACT10CCDIST); ?></textarea></td>
2854 <td style="border-right:1pt solid black;border-top:1pt solid black;text-align:right;">
2855 <textarea id="ACT7CCDIST" name="ACT7CCDIST" class="ACT"><?php echo text($ACT7CCDIST); ?></textarea></td>
2856 <td style="border:1pt solid black;border-bottom:0pt;text-align:center;">
2857 <textarea id="ACT8CCDIST" name="ACT8CCDIST" class="ACT"><?php echo text($ACT8CCDIST); ?></textarea></td>
2858 <td style="border-left:1pt solid black;border-top:1pt solid black;text-align:left;">
2859 <textarea id="ACT9CCDIST" name="ACT9CCDIST" class="ACT"><?php echo text($ACT9CCDIST); ?></textarea></td>
2860 <td style="border:0; border-top:2pt solid black;border-left:2pt solid black;text-align:left;vertical-align:middle;">
2861 <textarea id="ACT11CCDIST" name="ACT11CCDIST" class="ACT"><?php echo text($ACT11CCDIST); ?></textarea>
2862 </td>
2863 </tr>
2864 </table>
2865 <br />
2866 </div>
2867 <div id="ACT_SCNEAR" name="ACT_SCNEAR" class="nodisplay ACT_box">
2868 <br />
2869 <table>
2870 <tr>
2871 <td style="text-align:center;"><?php echo xlt('R{{right}}'); ?></td>
2872 <td style="border-right:1pt solid black;border-bottom:1pt solid black;text-align:right;">
2873 <textarea id="ACT1SCNEAR" name="ACT1SCNEAR" class="ACT"><?php echo text($ACT1SCNEAR); ?></textarea></td>
2874 <td style="border:1pt solid black;border-top:0pt;text-align:center;">
2875 <textarea id="ACT2SCNEAR" name="ACT2SCNEAR"class="ACT"><?php echo text($ACT2SCNEAR); ?></textarea></td>
2876 <td style="border-left:1pt solid black;border-bottom:1pt solid black;text-align:left;">
2877 <textarea id="ACT3SCNEAR" name="ACT3SCNEAR" class="ACT"><?php echo text($ACT3SCNEAR); ?></textarea></td>
2878 <td style="text-align:center;"><?php echo xlt('L{{left}}'); ?></td>
2879 </tr>
2880 <tr>
2881 <td style="text-align:middle;"><i class="fa fa-reply rotate-left"></i></td>
2882 <td style="border:1pt solid black;border-left:0pt;text-align:right;">
2883 <textarea id="ACT4SCNEAR" name="ACT4SCNEAR" class="ACT"><?php echo text($ACT4SCNEAR); ?></textarea></td>
2884 <td style="border:1pt solid black;text-align:center;">
2885 <textarea id="ACT5SCNEAR" name="ACT5SCNEAR" class="neurosens2 ACT"><?php echo text($ACT5SCNEAR); ?></textarea></td>
2886 <td style="border:1pt solid black;border-right:0pt;text-align:left;">
2887 <textarea id="ACT6SCNEAR" name="ACT6SCNEAR" class="ACT"><?php echo text($ACT6SCNEAR); ?></textarea></td>
2888 <td><i class="fa fa-reply flip-left"></i></td>
2889 </tr>
2890 <tr>
2891 <td style="border:0; border-top:2pt solid black;border-right:2pt solid black;text-align:right;">
2892 <textarea id="ACT10SCNEAR" name="ACT10SCNEAR" class="ACT"><?php echo text($ACT10SCNEAR); ?></textarea></td>
2893 <td style="border-right:1pt solid black;border-top:1pt solid black;text-align:right;">
2894 <textarea id="ACT7SCNEAR" name="ACT7SCNEAR" class="ACT"><?php echo text($ACT7SCNEAR); ?></textarea></td>
2895 <td style="border:1pt solid black;border-bottom:0pt;text-align:center;">
2896 <textarea id="ACT8SCNEAR" name="ACT8SCNEAR" class="ACT"><?php echo text($ACT8SCNEAR); ?></textarea></td>
2897 <td style="border-left:1pt solid black;border-top:1pt solid black;text-align:left;">
2898 <textarea id="ACT9SCNEAR" name="ACT9SCNEAR" class="ACT"><?php echo text($ACT9SCNEAR); ?></textarea></td>
2899 <td style="border:0; border-top:2pt solid black;border-left:2pt solid black;text-align:left;vertical-align:middle;">
2900 <textarea id="ACT11SCNEAR" name="ACT11SCNEAR" class="ACT"><?php echo text($ACT11SCNEAR); ?></textarea>
2901 </td>
2902 </tr>
2903 </table>
2904 <br />
2905 </div>
2906 <div id="ACT_CCNEAR" name="ACT_CCNEAR" class="nodisplay ACT_box">
2907 <br />
2908 <table>
2909 <tr>
2910 <td style="text-align:center;"><?php echo xlt('R{{right}}'); ?></td>
2911 <td style="border-right:1pt solid black;border-bottom:1pt solid black;text-align:right;">
2912 <textarea id="ACT1CCNEAR" name="ACT1CCNEAR" class="ACT"><?php echo text($ACT1CCNEAR); ?></textarea></td>
2913 <td style="border:1pt solid black;border-top:0pt;text-align:center;">
2914 <textarea id="ACT2CCNEAR" name="ACT2CCNEAR"class="ACT"><?php echo text($ACT2CCNEAR); ?></textarea></td>
2915 <td style="border-left:1pt solid black;border-bottom:1pt solid black;text-align:left;">
2916 <textarea id="ACT3CCNEAR" name="ACT3CCNEAR" class="ACT"><?php echo text($ACT3CCNEAR); ?></textarea></td>
2917 <td style="text-align:center;"><?php echo xlt('L{{left}}'); ?></td>
2918 </tr>
2919 <tr>
2920 <td style="text-align:middle;"><i class="fa fa-reply rotate-left"></i></td>
2921 <td style="border:1pt solid black;border-left:0pt;text-align:right;">
2922 <textarea id="ACT4CCNEAR" name="ACT4CCNEAR" class="ACT"><?php echo text($ACT4CCNEAR); ?></textarea></td>
2923 <td style="border:1pt solid black;text-align:center;">
2924 <textarea id="ACT5CCNEAR" name="ACT5CCNEAR" class="neurosens2 ACT"><?php echo text($ACT5CCNEAR); ?></textarea></td>
2925 <td style="border:1pt solid black;border-right:0pt;text-align:left;">
2926 <textarea id="ACT6CCNEAR" name="ACT6CCNEAR" class="ACT"><?php echo text($ACT6CCNEAR); ?></textarea></td>
2927 <td><i class="fa fa-reply flip-left"></i></td>
2928 </tr>
2929 <tr>
2930 <td style="border:0; border-top:2pt solid black;border-right:2pt solid black;text-align:right;">
2931 <textarea id="ACT10CCNEAR" name="ACT10CCNEAR" class="ACT"><?php echo text($ACT10CCNEAR); ?></textarea></td>
2932 <td style="border-right:1pt solid black;border-top:1pt solid black;text-align:right;">
2933 <textarea id="ACT7CCNEAR" name="ACT7CCNEAR" class="ACT"><?php echo text($ACT7CCNEAR); ?></textarea></td>
2934 <td style="border:1pt solid black;border-bottom:0pt;text-align:center;">
2935 <textarea id="ACT8CCNEAR" name="ACT8CCNEAR" class="ACT"><?php echo text($ACT8CCNEAR); ?></textarea></td>
2936 <td style="border-left:1pt solid black;border-top:1pt solid black;text-align:left;">
2937 <textarea id="ACT9CCNEAR" name="ACT9CCNEAR" class="ACT"><?php echo text($ACT9CCNEAR); ?></textarea></td>
2938 <td style="border:0; border-top:2pt solid black;border-left:2pt solid black;text-align:left;vertical-align:middle;">
2939 <textarea id="ACT11CCNEAR" name="ACT11CCNEAR" class="ACT"><?php echo text($ACT11CCNEAR); ?></textarea>
2940 </td>
2941 </tr>
2942 </table>
2943 <br />
2944 </div>
2945 </td>
2946 </tr>
2947 </table>
2948 <br />
2949 </div>
2950 </td>
2951 </tr>
2952 </table>
2953 <div id="NPCNPA" name="NPCNPA">
2954 <table style="position:relative;float:left;text-align:center;margin: 4 2;width:100%;font-size:1.0em;padding:4px;">
2955 <tr style="font-weight:bold;"><td style="width:50%;"></td><td><?php echo xlt('OD{{right eye}}'); ?></td><td><?php echo xlt('OS{{left eye}}'); ?></td></tr>
2956 <tr>
2957 <td class="right"><span title="<?php xla('Near Point of Accomodation'); ?>"><?php echo xlt('NPA{{near point of accomodation}}'); ?>:</span></td>
2958 <td><input type="text" id="ODNPA" style="width:70%;" class="neurosens2" name="ODNPA" value="<?php echo attr($ODNPA); ?>"></td>
2959 <td><input type="text" id="OSNPA" style="width:70%;" class="neurosens2" name="OSNPA" value="<?php echo attr($OSNPA); ?>"></td>
2960 </tr>
2961 <tr>
2962 <td class="right"><span title="<?php xla('Near Point of Convergence'); ?>"><?php echo xlt('NPC{{near point of convergence}}'); ?>:</span></td>
2963 <td colspan="2" ><input type="text" style="width:85%;" class="neurosens2" id="NPC" name="NPC" value="<?php echo attr($NPC); ?>">
2964 </td>
2965 </tr>
2966 <tr>
2967 <td class="right">
2968 <?php echo xlt('Stereopsis'); ?>:
2969 </td>
2970 <td colspan="2">
2971 <input type="text" style="width:85%;" class="neurosens" name="STEREOPSIS" id="STEREOPSIS" value="<?php echo attr($STEREOPSIS); ?>">
2972 </td>
2973 </tr>
2974 <tr><td colspan="3">&nbsp;
2975 </td></tr>
2976 <tr><td class="bold underline"><?php echo xlt('Amplitudes'); ?>:</td><td ><?php echo xlt('Distance'); ?></td><td><?php echo xlt('Near'); ?></td></tr>
2977 <tr>
2978 <td style="text-align:right;"><?php echo xlt('Divergence'); ?>: </td>
2979 <td><input type="text" id="DACCDIST" class="neurosens2" name="DACCDIST" value="<?php echo attr($DACCDIST); ?>"></td>
2980 <td><input type="text" id="DACCNEAR" class="neurosens2" name="DACCNEAR" value="<?php echo attr($DACCNEAR); ?>"></td></tr>
2981 <tr>
2982 <td style="text-align:right;"><?php echo xlt('Convergence'); ?>: </td>
2983 <td><input type="text" id="CACCDIST" class="neurosens2" name="CACCDIST" value="<?php echo attr($CACCDIST); ?>"></td>
2984 <td><input type="text" id="CACCNEAR" class="neurosens2" name="CACCNEAR" value="<?php echo attr($CACCNEAR); ?>"></td></tr>
2985 </tr>
2986 <tr>
2987 <td class="right">
2988 <?php echo xlt('Vertical Fusional'); ?>:
2989 </td>
2990 <td colspan="2">
2991 <input type="text" style="width:90%;" class="neurosens2" name="VERTFUSAMPS" id="VERTFUSAMPS" value="<?php echo attr($VERTFUSAMPS); ?>">
2992 <br />
2993 </td>
2994 </tr>
2995 </table>
2996 </div>
2997 </div>
2998 <div id="NEURO_MOTILITY" class="text_clinical borderShadow">
2999 <table>
3000 <tr>
3001 <td class="left"><?php echo xlt('Motility'); ?>:</td>
3002 <td class="right">
3003 <label for="MOTILITYNORMAL" class="input-helper input-helper--checkbox"><?php echo xlt('Normal'); ?></label>
3004 <input id="MOTILITYNORMAL" name="MOTILITYNORMAL" type="checkbox" <?php if ($MOTILITYNORMAL == 'on') {
3005 echo "checked='checked'";
3006 } ?>>
3007 </td>
3008 </tr>
3009 <tr>
3010 <td class="left">OD</td><td>OS</td>
3011 </tr>
3012 <tr>
3013 <td colspan="2">
3014 <input type="hidden" name="MOTILITY_RS" id="MOTILITY_RS" value="<?php echo attr($MOTILITY_RS); ?>">
3015 <input type="hidden" name="MOTILITY_RI" id="MOTILITY_RI" value="<?php echo attr($MOTILITY_RI); ?>">
3016 <input type="hidden" name="MOTILITY_RR" id="MOTILITY_RR" value="<?php echo attr($MOTILITY_RR); ?>">
3017 <input type="hidden" name="MOTILITY_RL" id="MOTILITY_RL" value="<?php echo attr($MOTILITY_RL); ?>">
3018 <input type="hidden" name="MOTILITY_LS" id="MOTILITY_LS" value="<?php echo attr($MOTILITY_LS); ?>">
3019 <input type="hidden" name="MOTILITY_LI" id="MOTILITY_LI" value="<?php echo attr($MOTILITY_LI); ?>">
3020 <input type="hidden" name="MOTILITY_LR" id="MOTILITY_LR" value="<?php echo attr($MOTILITY_LR); ?>">
3021 <input type="hidden" name="MOTILITY_LL" id="MOTILITY_LL" value="<?php echo attr($MOTILITY_LL); ?>">
3023 <input type="hidden" name="MOTILITY_RRSO" id="MOTILITY_RRSO" value="<?php echo attr($MOTILITY_RRSO); ?>">
3024 <input type="hidden" name="MOTILITY_RRIO" id="MOTILITY_RRIO" value="<?php echo attr($MOTILITY_RLIO); ?>">
3025 <input type="hidden" name="MOTILITY_RLSO" id="MOTILITY_RLSO" value="<?php echo attr($MOTILITY_RLSO); ?>">
3026 <input type="hidden" name="MOTILITY_RLIO" id="MOTILITY_RLIO" value="<?php echo attr($MOTILITY_RLIO); ?>">
3028 <input type="hidden" name="MOTILITY_LRSO" id="MOTILITY_LRSO" value="<?php echo attr($MOTILITY_LRSO); ?>">
3029 <input type="hidden" name="MOTILITY_LRIO" id="MOTILITY_LRIO" value="<?php echo attr($MOTILITY_LLIO); ?>">
3030 <input type="hidden" name="MOTILITY_LLSO" id="MOTILITY_LLSO" value="<?php echo attr($MOTILITY_LLSO); ?>">
3031 <input type="hidden" name="MOTILITY_LLIO" id="MOTILITY_LLIO" value="<?php echo attr($MOTILITY_LLIO); ?>">
3033 <div class="divTable">
3034 <div class="divRow">
3035 <div class="divCell">&nbsp;</div>
3036 </div>
3037 <div class="divRow">
3038 <div class="divCell" name="MOTILITY_RRSO_4" id="MOTILITY_RRSO_4">&nbsp;</div>
3039 <div class="divCell" name="MOTILITY_RRSO_4_2" id="MOTILITY_RRSO_4_2">&nbsp;</div>
3040 <div class="divCell" name="MOTILITY_RRSO_3_2" id="MOTILITY_RRSO_3_2">&nbsp;</div>
3041 <div class="divCell">&nbsp;</div>
3042 <div class="divCell" name="MOTILITY_RS_4_3" id="MOTILITY_RS_4_3">&nbsp;</div>
3043 <div class="divCell" name="MOTILITY_RS_4_1" id="MOTILITY_RS_4_1">&nbsp;</div>
3044 <div class="divCell" name="MOTILITY_RS_4" id="MOTILITY_RS_4" value="<?php echo attr($MOTILITY_RS); ?>">&nbsp;</div>
3045 <div class="divCell" name="MOTILITY_RS_4_2" id="MOTILITY_RS_4_2">&nbsp;</div>
3046 <div class="divCell" name="MOTILITY_RS_4_4" id="MOTILITY_RS_4_4">&nbsp;</div>
3047 <div class="divCell">&nbsp;</div>
3048 <div class="divCell" name="MOTILITY_RLSO_3_1" id="MOTILITY_RLSO_3_1">&nbsp;</div>
3049 <div class="divCell" name="MOTILITY_RLSO_4_1" id="MOTILITY_RLSO_4_1">&nbsp;</div>
3050 <div class="divCell" name="MOTILITY_RLSO_4" id="MOTILITY_RLSO_4">&nbsp;</div>
3051 </div>
3052 <div class="divRow">
3053 <div class="divCell" name="MOTILITY_RRSO_4_1" id="MOTILITY_RRSO_4_1">&nbsp;</div>
3054 <div class="divCell" name="MOTILITY_RRSO_3" id="MOTILITY_RRSO_3">&nbsp;</div>
3055 <div class="divCell" name="MOTILITY_RRSO_2_2" id="MOTILITY_RRSO_2_2">&nbsp;</div>
3056 <div class="divCell">&nbsp;</div>
3057 <div class="divCell">&nbsp;</div>
3058 <div class="divCell" name="MOTILITY_RS_3_1" id="MOTILITY_RS_3_1">&nbsp;</div>
3059 <div class="divCell" name="MOTILITY_RS_3" id="MOTILITY_RS_3">&nbsp;</div>
3060 <div class="divCell" name="MOTILITY_RS_3_2" id="MOTILITY_RS_3_2">&nbsp;</div>
3061 <div class="divCell">&nbsp;</div>
3062 <div class="divCell">&nbsp;</div>
3063 <div class="divCell" name="MOTILITY_RLSO_2_1" id="MOTILITY_RLSO_2_1">&nbsp;</div>
3064 <div class="divCell" name="MOTILITY_RLSO_3" id="MOTILITY_RLSO_3">&nbsp;</div>
3065 <div class="divCell" name="MOTILITY_RLSO_4_2" id="MOTILITY_RLSO_4_2">&nbsp;</div>
3066 </div>
3067 <div class="divRow">
3068 <div class="divCell" name="MOTILITY_RRSO_3_1" id="MOTILITY_RRSO_3_1">&nbsp;</div>
3069 <div class="divCell" name="MOTILITY_RRSO_2_1" id="MOTILITY_RRSO_2_1">&nbsp;</div>
3070 <div class="divCell" name="MOTILITY_RRSO_2" id="MOTILITY_RRSO_2">&nbsp;</div>
3071 <div class="divCell">&nbsp;</div>
3072 <div class="divCell">&nbsp;</div>
3073 <div class="divCell" name="MOTILITY_RS_2_1" id="MOTILITY_RS_2_1">&nbsp;</div>
3074 <div class="divCell" name="MOTILITY_RS_2" id="MOTILITY_RS_2">&nbsp;</div>
3075 <div class="divCell" name="MOTILITY_RS_2_2" id="MOTILITY_RS_2_2">&nbsp;</div>
3076 <div class="divCell">&nbsp;</div>
3077 <div class="divCell">&nbsp;</div>
3078 <div class="divCell" name="MOTILITY_RLSO_2" id="MOTILITY_RLSO_2">&nbsp;</div>
3079 <div class="divCell" name="MOTILITY_RLSO_2_2" id="MOTILITY_RLSO_2_2">&nbsp;</div>
3080 <div class="divCell" name="MOTILITY_RLSO_232" id="MOTILITY_RLSO_3_2">&nbsp;</div>
3081 </div>
3082 <div class="divRow">
3083 <div class="divCell">&nbsp;</div>
3084 <div class="divCell">&nbsp;</div>
3085 <div class="divCell">&nbsp;</div>
3086 <div class="divCell" name="MOTILITY_RRSO_1" id="MOTILITY_RRSO_1">&nbsp;</div>
3087 <div class="divCell">&nbsp;</div>
3088 <div class="divCell" name="MOTILITY_RS_1_1" id="MOTILITY_RS_1_1">&nbsp;</div>
3089 <div class="divCell" name="MOTILITY_RS_1" id="MOTILITY_RS_1">&nbsp;</div>
3090 <div class="divCell" name="MOTILITY_RS_1_2" id="MOTILITY_RS_1_2">&nbsp;</div>
3091 <div class="divCell">&nbsp;</div>
3092 <div class="divCell" name="MOTILITY_RLSO_1" id="MOTILITY_RLSO_1">&nbsp;</div>
3093 <div class="divCell">&nbsp;</div>
3094 <div class="divCell">&nbsp;</div>
3095 <div class="divCell">&nbsp;</div>
3096 </div>
3097 <div class="divRow">
3098 <div class="divCell" name="MOTILITY_RR_4_3" id="MOTILITY_RR_4_3">&nbsp;</div>
3099 <div class="divCell" name="MOTILITY_RR_4_1" id="MOTILITY_RR_4_1">&nbsp;</div>
3100 <div class="divCell" name="MOTILITY_RR_3_1" id="MOTILITY_RR_3_1">&nbsp;</div>
3101 <div class="divCell">&nbsp;</div>
3102 <div class="divCell">&nbsp;</div>
3103 <div class="divCell" name="MOTILITY_RS_0_1" id="MOTILITY_RS_0_1">&nbsp;</div>
3104 <div class="divCell" name="MOTILITY_RS_0" id="MOTILITY_RS_0">&nbsp;</div>
3105 <div class="divCell" name="MOTILITY_RS_0_2" id="MOTILITY_RS_0_2">&nbsp;</div>
3106 <div class="divCell">&nbsp;</div>
3107 <div class="divCell">&nbsp;</div>
3108 <div class="divCell" name="MOTILITY_RL_3_1" id="MOTILITY_RL_3_1">&nbsp;</div>
3109 <div class="divCell" name="MOTILITY_RL_4_1" id="MOTILITY_RL_4_1">&nbsp;</div>
3110 <div class="divCell" name="MOTILITY_RL_4_3" id="MOTILITY_RL_4_3">&nbsp;</div>
3111 </div>
3112 <div class="divMiddleRow">
3113 <div class="divCell" name="MOTILITY_RR_4_4" id="MOTILITY_RR_4_4">&nbsp;</div>
3114 <div class="divCell" name="MOTILITY_RR_4" id="MOTILITY_RR_4" value="<?php echo attr($MOTILITY_RR); ?>">&nbsp;</div>
3115 <div class="divCell" name="MOTILITY_RR_3" id="MOTILITY_RR_3">&nbsp;</div>
3116 <div class="divCell" name="MOTILITY_RR_2" id="MOTILITY_RR_2">&nbsp;</div>
3117 <div class="divCell" name="MOTILITY_RR_1" id="MOTILITY_RR_1">&nbsp;</div>
3118 <div class="divCell" name="MOTILITY_RR_0" id="MOTILITY_RR_0">&nbsp;</div>
3119 <div class="divCell" name="MOTILITY_R0" id="MOTILITY_R0">&nbsp;</div>
3120 <div class="divCell" name="MOTILITY_RL_0" id="MOTILITY_RL_0">&nbsp;</div>
3121 <div class="divCell" name="MOTILITY_RL_1" id="MOTILITY_RL_1">&nbsp;</div>
3122 <div class="divCell" name="MOTILITY_RL_2" id="MOTILITY_RL_2">&nbsp;</div>
3123 <div class="divCell" name="MOTILITY_RL_3" id="MOTILITY_RL_3">&nbsp;</div>
3124 <div class="divCell" name="MOTILITY_RL_4" id="MOTILITY_RL_4" value="<?php echo attr($MOTILITY_RL); ?>">&nbsp;</div>
3125 <div class="divCell" name="MOTILITY_RL_4_4" id="MOTILITY_RL_4_4">&nbsp;</div>
3126 </div>
3127 <div class="divRow">
3128 <div class="divCell" name="MOTILITY_RR_4_5" id="MOTILITY_RR_4_5">&nbsp;</div>
3129 <div class="divCell" name="MOTILITY_RR_4_2" id="MOTILITY_RR_4_2">&nbsp;</div>
3130 <div class="divCell" name="MOTILITY_RR_3_2" id="MOTILITY_RR_3_2">&nbsp;</div>
3131 <div class="divCell">&nbsp;</div>
3132 <div class="divCell">&nbsp;</div>
3133 <div class="divCell" name="MOTILITY_RI_0_1" id="MOTILITY_RI_0_1">&nbsp;</div>
3134 <div class="divCell" id="MOTILITY_RI_0" name="MOTILITY_RI_0">&nbsp;</div>
3135 <div class="divCell" name="MOTILITY_RI_0_2" id="MOTILITY_RI_0_2">&nbsp;</div>
3136 <div class="divCell">&nbsp;</div>
3137 <div class="divCell">&nbsp;</div>
3138 <div class="divCell" name="MOTILITY_RL_3_2" id="MOTILITY_RL_3_2">&nbsp;</div>
3139 <div class="divCell" name="MOTILITY_RL_4_2" id="MOTILITY_RL_4_2">&nbsp;</div>
3140 <div class="divCell" name="MOTILITY_RL_4_5" id="MOTILITY_RL_4_5">&nbsp;</div>
3141 </div>
3142 <div class="divRow">
3143 <div class="divCell">&nbsp;</div>
3144 <div class="divCell">&nbsp;</div>
3145 <div class="divCell">&nbsp;</div>
3146 <div class="divCell" name="MOTILITY_RRIO_1" id="MOTILITY_RRIO_1">&nbsp;</div>
3147 <div class="divCell">&nbsp;</div>
3148 <div class="divCell" name="MOTILITY_RI_1_1" id="MOTILITY_RI_1_1">&nbsp;</div>
3149 <div class="divCell" id="MOTILITY_RI_1" name="MOTILITY_RI_1">&nbsp;</div>
3150 <div class="divCell" name="MOTILITY_RI_1_2" id="MOTILITY_RI_1_2">&nbsp;</div>
3151 <div class="divCell">&nbsp;</div>
3152 <div class="divCell" name="MOTILITY_RLIO_1" id="MOTILITY_RLIO_1">&nbsp;</div>
3153 <div class="divCell">&nbsp;</div>
3154 <div class="divCell">&nbsp;</div>
3155 <div class="divCell">&nbsp;</div>
3156 </div>
3157 <div class="divRow">
3158 <div class="divCell" name="MOTILITY_RRIO_3_1" id="MOTILITY_RRIO_3_1">&nbsp;</div>
3159 <div class="divCell" name="MOTILITY_RRIO_2_1" id="MOTILITY_RRIO_2_1">&nbsp;</div>
3160 <div class="divCell" name="MOTILITY_RRIO_2" id="MOTILITY_RRIO_2">&nbsp;</div>
3161 <div class="divCell">&nbsp;</div>
3162 <div class="divCell">&nbsp;</div>
3163 <div class="divCell" name="MOTILITY_RI_2_1" id="MOTILITY_RI_2_1">&nbsp;</div>
3164 <div class="divCell" id="MOTILITY_RI_2" name="MOTILITY_RI_2">&nbsp;</div>
3165 <div class="divCell" name="MOTILITY_RI_2_2" id="MOTILITY_RI_2_2">&nbsp;</div>
3166 <div class="divCell">&nbsp;</div>
3167 <div class="divCell">&nbsp;</div>
3168 <div class="divCell" name="MOTILITY_RLIO_2" id="MOTILITY_RLIO_2">&nbsp;</div>
3169 <div class="divCell" name="MOTILITY_RLIO_2_1" id="MOTILITY_RLIO_2_1">&nbsp;</div>
3170 <div class="divCell" name="MOTILITY_RLIO_3_1" id="MOTILITY_RLIO_3_1">&nbsp;</div>
3171 </div>
3172 <div class="divRow">
3173 <div class="divCell" name="MOTILITY_RRIO_4_1" id="MOTILITY_RRIO_4_1">&nbsp;</div>
3174 <div class="divCell" name="MOTILITY_RRIO_3" id="MOTILITY_RRIO_3">&nbsp;</div>
3175 <div class="divCell" name="MOTILITY_RRIO_2_2" id="MOTILITY_RRIO_2_2">&nbsp;</div>
3176 <div class="divCell">&nbsp;</div>
3177 <div class="divCell">&nbsp;</div>
3178 <div class="divCell" name="MOTILITY_RI_3_1" id="MOTILITY_RI_3_1">&nbsp;</div>
3179 <div class="divCell" id="MOTILITY_RI_3" name="MOTILITY_RI_3">&nbsp;</div>
3180 <div class="divCell" name="MOTILITY_RI_3_2" id="MOTILITY_RI_3_2">&nbsp;</div>
3181 <div class="divCell">&nbsp;</div>
3182 <div class="divCell">&nbsp;</div>
3183 <div class="divCell" name="MOTILITY_RLIO_2_2" id="MOTILITY_RLIO_2_2">&nbsp;</div>
3184 <div class="divCell" name="MOTILITY_RLI0_3" id="MOTILITY_RLIO_3">&nbsp;</div>
3185 <div class="divCell" name="MOTILITY_RLIO_4_1" id="MOTILITY_RLIO_4_1">&nbsp;</div>
3186 </div>
3187 <div class="divRow">
3188 <div class="divCell" name="MOTILITY_RRIO_4" id="MOTILITY_RRIO_4" value="<?php echo attr($MOTILITY_RRIO); ?>">&nbsp;</div>
3189 <div class="divCell" name="MOTILITY_RRIO_4_2" id="MOTILITY_RRIO_4_2">&nbsp;</div>
3190 <div class="divCell" name="MOTILITY_RRIO_3_2" id="MOTILITY_RRIO_3_2">&nbsp;</div>
3191 <div class="divCell">&nbsp;</div>
3192 <div class="divCell" name="MOTILITY_RI_4_3" id="MOTILITY_RI_4_3">&nbsp;</div>
3193 <div class="divCell" name="MOTILITY_RI_4_1" id="MOTILITY_RI_4_1">&nbsp;</div>
3194 <div class="divCell" id="MOTILITY_RI_4" name="MOTILITY_RI_4" value="<?php echo attr($MOTILITY_RI); ?>">&nbsp;</div>
3195 <div class="divCell" name="MOTILITY_RI_4_2" id="MOTILITY_RI_4_2">&nbsp;</div>
3196 <div class="divCell" name="MOTILITY_RI_4_4" id="MOTILITY_RI_4_4">&nbsp;</div>
3197 <div class="divCell">&nbsp;</div>
3198 <div class="divCell" name="MOTILITY_RLIO_3_2" id="MOTILITY_RLIO_3_2">&nbsp;</div>
3199 <div class="divCell" name="MOTILITY_RLIO_4_2" id="MOTILITY_RLIO_4_2">&nbsp;</div>
3200 <div class="divCell" name="MOTILITY_RLIO_4" id="MOTILITY_RLIO_4" value="<?php echo attr($MOTILITY_RLIO); ?>">&nbsp;</div>
3201 </div>
3202 <div class="divRow">
3203 <div class="divCell">&nbsp;</div>
3204 </div>
3205 <div class="divRow">
3206 <div class="divCell">&nbsp;</div>
3207 </div>
3208 </div>
3209 <div class="divTable">
3210 <div class="divRow">
3211 <div class="divCell">&nbsp;</div>
3212 </div>
3213 <div class="divRow">
3214 <div class="divCell" name="MOTILITY_LRSO_4" id="MOTILITY_LRSO_4" value="<?php echo attr($MOTILITY_LRSO); ?>">&nbsp;</div>
3215 <div class="divCell" name="MOTILITY_LRSO_4_2" id="MOTILITY_LRSO_4_2">&nbsp;</div>
3216 <div class="divCell" name="MOTILITY_LRSO_3_3" id="MOTILITY_LRSO_3_2">&nbsp;</div>
3217 <div class="divCell">&nbsp;</div>
3218 <div class="divCell" name="MOTILITY_LS_4_3" id="MOTILITY_LS_4_3">&nbsp;</div>
3219 <div class="divCell" name="MOTILITY_LS_4_1" id="MOTILITY_LS_4_1">&nbsp;</div>
3220 <div class="divCell" name="MOTILITY_LS_4" id="MOTILITY_LS_4" value="<?php echo attr($MOTILITY_LS); ?>">&nbsp;</div>
3221 <div class="divCell" name="MOTILITY_LS_4_2" id="MOTILITY_LS_4_2">&nbsp;</div>
3222 <div class="divCell" name="MOTILITY_LS_4_4" id="MOTILITY_LS_4_4">&nbsp;</div>
3223 <div class="divCell">&nbsp;</div>
3224 <div class="divCell" name="MOTILITY_LLSO_3_1" id="MOTILITY_LLSO_3_1">&nbsp;</div>
3225 <div class="divCell" name="MOTILITY_LLSO_4_1" id="MOTILITY_LLSO_4_1">&nbsp;</div>
3226 <div class="divCell" name="MOTILITY_LLSO_4" id="MOTILITY_LLSO_4" value="<?php echo attr($MOTILITY_LLSO); ?>">&nbsp;</div>
3227 </div>
3228 <div class="divRow">
3229 <div class="divCell" name="MOTILITY_LRSO_4_1" id="MOTILITY_LRSO_4_1">&nbsp;</div>
3230 <div class="divCell" name="MOTILITY_LRSO_3" id="MOTILITY_LRSO_3">&nbsp;</div>
3231 <div class="divCell" name="MOTILITY_LRSO_2_2" id="MOTILITY_LRSO_2_2">&nbsp;</div>
3232 <div class="divCell">&nbsp;</div>
3233 <div class="divCell">&nbsp;</div>
3234 <div class="divCell" name="MOTILITY_LS_3_1" id="MOTILITY_LS_3_1">&nbsp;</div>
3235 <div class="divCell" name="MOTILITY_LS_3" id="MOTILITY_LS_3">&nbsp;</div>
3236 <div class="divCell" name="MOTILITY_LS_3_2" id="MOTILITY_LS_3_2">&nbsp;</div>
3237 <div class="divCell">&nbsp;</div>
3238 <div class="divCell">&nbsp;</div>
3239 <div class="divCell" name="MOTILITY_LLSO_2_1" id="MOTILITY_LLSO_2_1">&nbsp;</div>
3240 <div class="divCell" name="MOTILITY_LLSO_3" id="MOTILITY_LLSO_3">&nbsp;</div>
3241 <div class="divCell" name="MOTILITY_LLSO_4_2" id="MOTILITY_LLSO_4_2">&nbsp;</div>
3242 </div>
3243 <div class="divRow">
3244 <div class="divCell" name="MOTILITY_LRSO_3_1" id="MOTILITY_LRSO_3_1">&nbsp;</div>
3245 <div class="divCell" name="MOTILITY_LRSO_2_1" id="MOTILITY_LRSO_2_1">&nbsp;</div>
3246 <div class="divCell" name="MOTILITY_LRSO_2" id="MOTILITY_LRSO_2">&nbsp;</div>
3247 <div class="divCell">&nbsp;</div>
3248 <div class="divCell">&nbsp;</div>
3249 <div class="divCell" name="MOTILITY_LS_2_1" id="MOTILITY_LS_2_1">&nbsp;</div>
3250 <div class="divCell" name="MOTILITY_LS_2" id="MOTILITY_LS_2">&nbsp;</div>
3251 <div class="divCell" name="MOTILITY_LS_2_2" id="MOTILITY_LS_2_2">&nbsp;</div>
3252 <div class="divCell">&nbsp;</div>
3253 <div class="divCell">&nbsp;</div>
3254 <div class="divCell" name="MOTILITY_LLSO_2" id="MOTILITY_LLSO_2">&nbsp;</div>
3255 <div class="divCell" name="MOTILITY_LLSO_2_2" id="MOTILITY_LLSO_2_2">&nbsp;</div>
3256 <div class="divCell" name="MOTILITY_LLSO_3_2" id="MOTILITY_LLSO_3_2">&nbsp;</div>
3257 </div>
3258 <div class="divRow">
3259 <div class="divCell">&nbsp;</div>
3260 <div class="divCell">&nbsp;</div>
3261 <div class="divCell">&nbsp;</div>
3262 <div class="divCell" name="MOTILITY_LRSO_1" id="MOTILITY_LRSO_1">&nbsp;</div>
3263 <div class="divCell">&nbsp;</div>
3264 <div class="divCell" name="MOTILITY_LS_1_1" id="MOTILITY_LS_1_1">&nbsp;</div>
3265 <div class="divCell" name="MOTILITY_LS_1" id="MOTILITY_LS_1">&nbsp;</div>
3266 <div class="divCell" name="MOTILITY_LS_1_2" id="MOTILITY_LS_1_2">&nbsp;</div>
3267 <div class="divCell">&nbsp;</div>
3268 <div class="divCell" name="MOTILITY_LLSO_1" id="MOTILITY_LLSO_1">&nbsp;</div>
3269 <div class="divCell">&nbsp;</div>
3270 <div class="divCell">&nbsp;</div>
3271 <div class="divCell">&nbsp;</div>
3272 </div>
3273 <div class="divRow">
3274 <div class="divCell" name="MOTILITY_LR_4_3" id="MOTILITY_LR_4_3">&nbsp;</div>
3275 <div class="divCell" name="MOTILITY_LR_4_1" id="MOTILITY_LR_4_1">&nbsp;</div>
3276 <div class="divCell" name="MOTILITY_LR_3_1" id="MOTILITY_LR_3_1">&nbsp;</div>
3277 <div class="divCell">&nbsp;</div>
3278 <div class="divCell">&nbsp;</div>
3279 <div class="divCell" name="MOTILITY_LS_0_1" id="MOTILITY_LS_0_1">&nbsp;</div>
3280 <div class="divCell" name="MOTILITY_LS_0" id="MOTILITY_LS_0">&nbsp;</div>
3281 <div class="divCell" name="MOTILITY_LS_0_1" id="MOTILITY_LS_0_1">&nbsp;</div>
3282 <div class="divCell">&nbsp;</div>
3283 <div class="divCell">&nbsp;</div>
3284 <div class="divCell" name="MOTILITY_LL_3_1" id="MOTILITY_LL_3_1">&nbsp;</div>
3285 <div class="divCell" name="MOTILITY_LL_4_1" id="MOTILITY_LL_4_1">&nbsp;</div>
3286 <div class="divCell" name="MOTILITY_LL_4_3" id="MOTILITY_LL_4_3">&nbsp;</div>
3287 </div>
3288 <div class="divMiddleRow">
3289 <div class="divCell" name="MOTILITY_LR_4_4" id="MOTILITY_LR_4_4">&nbsp;</div>
3290 <div class="divCell" name="MOTILITY_LR_4" id="MOTILITY_LR_4" value="<?php echo attr($MOTILITY_LR); ?>">&nbsp;</div>
3291 <div class="divCell" name="MOTILITY_LR_3" id="MOTILITY_LR_3">&nbsp;</div>
3292 <div class="divCell" name="MOTILITY_LR_2" id="MOTILITY_LR_2">&nbsp;</div>
3293 <div class="divCell" name="MOTILITY_LR_1" id="MOTILITY_LR_1">&nbsp;</div>
3294 <div class="divCell" name="MOTILITY_LR_0" id="MOTILITY_LR_0">&nbsp;</div>
3295 <div class="divCell" name="MOTILITY_L0" id="MOTILITY_L0">&nbsp;</div>
3296 <div class="divCell" name="MOTILITY_LL_0" id="MOTILITY_LL_0">&nbsp;</div>
3297 <div class="divCell" name="MOTILITY_LL_1" id="MOTILITY_LL_1">&nbsp;</div>
3298 <div class="divCell" name="MOTILITY_LL_2" id="MOTILITY_LL_2">&nbsp;</div>
3299 <div class="divCell" name="MOTILITY_LL_3" id="MOTILITY_LL_3">&nbsp;</div>
3300 <div class="divCell" name="MOTILITY_LL_4" id="MOTILITY_LL_4" value="<?php echo attr($MOTILITY_LL); ?>">&nbsp;</div>
3301 <div class="divCell" name="MOTILITY_LL_4_4" id="MOTILITY_LL_4_4">&nbsp;</div>
3302 </div>
3303 <div class="divRow">
3304 <div class="divCell" name="MOTILITY_LR_4_5" id="MOTILITY_LR_4_5">&nbsp;</div>
3305 <div class="divCell" name="MOTILITY_LR_4_2" id="MOTILITY_LR_4_2">&nbsp;</div>
3306 <div class="divCell" name="MOTILITY_LR_3_3" id="MOTILITY_LR_3_2">&nbsp;</div>
3307 <div class="divCell">&nbsp;</div>
3308 <div class="divCell">&nbsp;</div>
3309 <div class="divCell" name="MOTILITY_LI_0_1" id="MOTILITY_LI_0_1">&nbsp;</div>
3310 <div class="divCell" id="MOTILITY_LI_0" name="MOTILITY_LI_0">&nbsp;</div>
3311 <div class="divCell" name="MOTILITY_LI_0_2" id="MOTILITY_LI_0_2">&nbsp;</div>
3312 <div class="divCell">&nbsp;</div>
3313 <div class="divCell">&nbsp;</div>
3314 <div class="divCell" name="MOTILITY_LL_3_2" id="MOTILITY_LL_3_2">&nbsp;</div>
3315 <div class="divCell" name="MOTILITY_LL_4_2" id="MOTILITY_LL_4_2">&nbsp;</div>
3316 <div class="divCell" name="MOTILITY_LL_5_2" id="MOTILITY_LL_5_2">&nbsp;</div>
3317 </div>
3318 <div class="divRow">
3319 <div class="divCell">&nbsp;</div>
3320 <div class="divCell">&nbsp;</div>
3321 <div class="divCell">&nbsp;</div>
3322 <div class="divCell" name="MOTILITY_LRIO_1" id="MOTILITY_LRIO_1">&nbsp;</div>
3323 <div class="divCell">&nbsp;</div>
3324 <div class="divCell" name="MOTILITY_LI_1_1" id="MOTILITY_LI_1_1">&nbsp;</div>
3325 <div class="divCell" id="MOTILITY_LI_1" name="MOTILITY_LI_1">&nbsp;</div>
3326 <div class="divCell" name="MOTILITY_LI_1_2" id="MOTILITY_LI_1_2">&nbsp;</div>
3327 <div class="divCell">&nbsp;</div>
3328 <div class="divCell" name="MOTILITY_LLIO_1" id="MOTILITY_LLIO_1">&nbsp;</div>
3329 <div class="divCell">&nbsp;</div>
3330 <div class="divCell">&nbsp;</div>
3331 <div class="divCell">&nbsp;</div>
3332 </div>
3333 <div class="divRow">
3334 <div class="divCell" name="MOTILITY_LRIO_3_1" id="MOTILITY_LRIO_3_1">&nbsp;</div>
3335 <div class="divCell" name="MOTILITY_LRIO_2_1" id="MOTILITY_LRIO_2_1">&nbsp;</div>
3336 <div class="divCell" name="MOTILITY_LRIO_2" id="MOTILITY_LRIO_2">&nbsp;</div>
3337 <div class="divCell">&nbsp;</div>
3338 <div class="divCell">&nbsp;</div>
3339 <div class="divCell" name="MOTILITY_LI_2_1" id="MOTILITY_LI_2_1">&nbsp;</div>
3340 <div class="divCell" name="MOTILITY_LI_2" id="MOTILITY_LI_2">&nbsp;</div>
3341 <div class="divCell" name="MOTILITY_LI_2_2" id="MOTILITY_LI_2_2">&nbsp;</div>
3342 <div class="divCell">&nbsp;</div>
3343 <div class="divCell">&nbsp;</div>
3344 <div class="divCell" name="MOTILITY_LLIO_2" id="MOTILITY_LLIO_2">&nbsp;</div>
3345 <div class="divCell" name="MOTILITY_LLIO_2_1" id="MOTILITY_LLIO_2_1">&nbsp;</div>
3346 <div class="divCell" name="MOTILITY_LLIO_3_1" id="MOTILITY_LLIO_3_1">&nbsp;</div>
3347 </div>
3348 <div class="divRow">
3349 <div class="divCell" name="MOTILITY_LRIO_4_1" id="MOTILITY_LRIO_4_1">&nbsp;</div>
3350 <div class="divCell" name="MOTILITY_LRIO_3" id="MOTILITY_LRIO_3">&nbsp;</div>
3351 <div class="divCell" name="MOTILITY_LRIO_2_2" id="MOTILITY_LRIO_2_2">&nbsp;</div>
3352 <div class="divCell">&nbsp;</div>
3353 <div class="divCell">&nbsp;</div>
3354 <div class="divCell" name="MOTILITY_LI_3_1" id="MOTILITY_LI_3_1">&nbsp;</div>
3355 <div class="divCell" name="MOTILITY_LI_3" id="MOTILITY_LI_3">&nbsp;</div>
3356 <div class="divCell" name="MOTILITY_LI_3_2" id="MOTILITY_LI_3_2">&nbsp;</div>
3357 <div class="divCell">&nbsp;</div>
3358 <div class="divCell">&nbsp;</div>
3359 <div class="divCell" name="MOTILITY_LLIO_2_2" id="MOTILITY_LLIO_2_2">&nbsp;</div>
3360 <div class="divCell" name="MOTILITY_LLIO_3" id="MOTILITY_LLIO_3">&nbsp;</div>
3361 <div class="divCell" name="MOTILITY_LLIO_4_1" id="MOTILITY_LLIO_4_1">&nbsp;</div>
3362 </div>
3363 <div class="divRow">
3364 <div class="divCell" name="MOTILITY_LRIO_4" id="MOTILITY_LRIO_4" value="<?php echo attr($MOTILITY_LRIO); ?>">&nbsp;</div>
3365 <div class="divCell" name="MOTILITY_LRIO_4_2" id="MOTILITY_LRIO_4_2">&nbsp;</div>
3366 <div class="divCell" name="MOTILITY_LRIO_3_2" id="MOTILITY_LRIO_3_2">&nbsp;</div>
3367 <div class="divCell">&nbsp;</div>
3368 <div class="divCell">&nbsp;</div>
3369 <div class="divCell" name="MOTILITY_LI_4_1" id="MOTILITY_LI_4_1">&nbsp;</div>
3370 <div class="divCell" name="MOTILITY_LI_4" id="MOTILITY_LI_4" value="<?php echo attr($MOTILITY_LI); ?>">&nbsp;</div>
3371 <div class="divCell" name="MOTILITY_LI_4_2" id="MOTILITY_LI_4_2">&nbsp;</div>
3372 <div class="divCell">&nbsp;</div>
3373 <div class="divCell">&nbsp;</div>
3374 <div class="divCell" name="MOTILITY_LLIO_3_2" id="MOTILITY_LLIO_3_2">&nbsp;</div>
3375 <div class="divCell" name="MOTILITY_LLIO_4_2" id="MOTILITY_LLIO_4_2">&nbsp;</div>
3376 <div class="divCell" name="MOTILITY_LLIO_4" id="MOTILITY_LLIO_4" value="<?php echo attr($MOTILITY_LLIO); ?>">&nbsp;</div>
3377 </div>
3378 <div class="divRow">
3379 <div class="divCell">&nbsp;</div>
3380 </div><div class="divRow">
3381 <div class="divCell">&nbsp;</div>
3382 </div>
3383 </div>
3384 </td>
3385 </tr>
3386 </table>
3387 </div>
3388 </div>
3389 <br />
3390 <div class="QP_lengthen" id="NEURO_COMMENTS_DIV">
3391 <b><?php echo xlt('Comments'); ?>:</b><div class="kb kb_left"><?php echo xlt('NCOM{{Neuro comments}}'); ?></div><br />
3392 <textarea id="NEURO_COMMENTS" name="NEURO_COMMENTS"><?php echo text($NEURO_COMMENTS); ?></textarea>
3393 </div>
3394 </div>
3395 </div>
3396 <div id="NEURO_right" class="exam_section_right borderShadow text_clinical">
3397 <div id="PRIORS_NEURO_left_text" name="PRIORS_NEURO_left_text" class="PRIORS_class PRIORS"><i class="fa fa-spinner fa-spin"></i>
3398 </div>
3399 <?php display_draw_section("NEURO", $encounter, $pid); ?>
3400 <div id="QP_NEURO" name="QP_NEURO" class="QP_class">
3401 <input type="hidden" id="NEURO_ACT_zone" name="NEURO_ACT_zone" value="<?php echo $ACT_SHOW ?? ''; ?>">
3402 <input type="hidden" id="NEURO_ACT_strab" name="NEURO_ACT_strab" value="">
3403 <input type="hidden" id="NEURO_field" name="NEURO_field" value="5">
3404 <input type="hidden" id="NEURO_value" name="NEURO_value" value="ortho">
3405 <input type="hidden" id="NEURO_side" name="NEURO_side" value="">
3407 <div id="NEURO_P_1">
3408 <?php echo $selector = priors_select("NEURO", $id, $id, $pid); ?>
3409 </div>
3410 <div id="NEURO_P_2"><br />
3411 <div class="borderShadow" class="NEURO_P_21"><span class="underline"><?php echo xlt('Laterality'); ?></span><br />
3412 <span class="eye_button" id="NEURO_side_R" name="NEURO_side" style="padding-left:0.06in;padding-right:0.06in;" onclick="$('#NEURO_side').val('R').trigger('change');"><?php echo xlt('Right'); ?></span>
3413 <span class="eye_button" id="NEURO_side_L" name="NEURO_side" style="padding-left:0.06in;padding-right:0.06in;" onclick="$('#NEURO_side').val('L').trigger('change');"><?php echo xlt('Left'); ?></span>
3414 <span class="eye_button eye_button_selected" id="NEURO_side_None" name="NEURO_side" onclick="$('#NEURO_side').val('').trigger('change');"><?php echo xlt('None{{Side}}'); ?></span> <br />
3415 </div>
3416 <div class="borderShadow" class="NEURO_P_21"><span class="underline"><?php echo xlt('Deviation'); ?></span><br />
3417 <span class="eye_button" id="NEURO_ACT_strab_E" name="NEURO_ACT_strab" title="<?php echo xla('Esophoria'); ?>" onclick="$('#NEURO_ACT_strab').val('E').trigger('change');"><?php echo xlt('E{{esophoria}}'); ?></span>
3418 <span class="eye_button" id="NEURO_ACT_strab_ET_int" name="NEURO_ACT_strab" title="<?php echo xla('Intermittent Esotropia'); ?>" onclick="$('#NEURO_ACT_strab').val('E\(T\)').trigger('change');"><?php echo xlt('E(T){{intermittent esotropia}}'); ?></span>
3419 <span class="eye_button" id="NEURO_ACT_strab_ET" name="NEURO_ACT_strab" title="<?php echo xla('Esotropia'); ?>" onclick="$('#NEURO_ACT_strab').val('ET').trigger('change');"><?php echo xlt('ET{{esotropia}}'); ?></span>
3420 <br />
3421 <span class="eye_button" id="NEURO_ACT_strab_X" name="NEURO_ACT_strab" title="<?php echo xla('Exophoria'); ?>" onclick="$('#NEURO_ACT_strab').val('X').trigger('change');"><?php echo xlt('X{{exophoria}}'); ?></span>
3422 <span class="eye_button" id="NEURO_ACT_strab_XT_int" name="NEURO_ACT_strab" title="<?php echo xla('Intermittent Exotropia'); ?>" onclick="$('#NEURO_ACT_strab').val('X\(T\)').trigger('change');"><?php echo xlt('X(T){{intermittent exophoria}}'); ?></span>
3423 <span class="eye_button" id="NEURO_ACT_strab_XT" name="NEURO_ACT_strab" title="<?php echo xla('Exotropia'); ?>" onclick="$('#NEURO_ACT_strab').val('XT').trigger('change');"><?php echo xlt('XT{{exotropia}}'); ?></span>
3425 <br />
3426 <span class="eye_button" id="NEURO_ACT_strab_H" name="NEURO_ACT_strab" title="<?php echo xla('Hyperphoria'); ?>" onclick="$('#NEURO_ACT_strab').val('HT').trigger('change');"><?php echo xlt('HT{{hyperphoria}}'); ?></span>
3427 <span class="eye_button" id="NEURO_ACT_strab_HT_int" name="NEURO_ACT_strab" title="<?php echo xla('intermittent hyperphoria'); ?>" onclick="$('#NEURO_ACT_strab').val('H\(T\)').trigger('change');"><?php echo xlt('H(T){{intermittent hypertropia}}'); ?></span>
3428 <span class="eye_button" id="NEURO_ACT_strab_hypoT" name="NEURO_ACT_strab" title="<?php echo xla('Hypotropia'); ?>" onclick="$('#NEURO_ACT_strab').val('hypoT').trigger('change');"><?php echo xlt('hypoT{{hypotropia}}'); ?></span>
3429 <span class="eye_button" id="NEURO_ACT_strab_hypoT_int" name="NEURO_ACT_strab" title="<?php echo xla('Intermittent hypotropia'); ?>" onclick="$('#NEURO_ACT_strab').val('hypo\(T\)').trigger('change');"><?php echo xlt('hypo(T){{intermittent hypotropia}}'); ?></span>
3430 <br />
3431 </div> <br /><br />
3432 <div>
3433 <button id="NEURO_RECORD" name="NEURO_RECORD"> <?php echo xlt('RECORD'); ?> </button>
3434 </div>
3435 </div>
3436 <div id="NEURO_P_3">
3437 &nbsp;
3438 <div class="borderShadow ACT_boxed"><span class="underline"><?php echo xlt('Rx/Distance'); ?></span><br />
3439 <span class="eye_button <?php if (($ACT_SHOW ?? null) == 'SCDIST') {
3440 echo "eye_button_selected";
3441 } ?>" id="NEURO_ACT_zone_SCDIST" name="NEURO_ACT_zone" onclick="$('#NEURO_ACT_zone').val('SCDIST').trigger('change');"> <?php echo xlt('scDist{{without correction distance}}'); ?> </span>
3442 <span class="eye_button <?php if (($ACT_SHOW ?? null) == 'CCDIST') {
3443 echo "eye_button_selected";
3444 } ?>" id="NEURO_ACT_zone_CCDIST" name="NEURO_ACT_zone" onclick="$('#NEURO_ACT_zone').val('CCDIST').trigger('change');"> <?php echo xlt('ccDist{{with correction distance}}'); ?> </span>
3445 <span class="eye_button <?php if (($ACT_SHOW ?? null) == 'SCNEAR') {
3446 echo "eye_button_selected";
3447 } ?>" id="NEURO_ACT_zone_SCNEAR" name="NEURO_ACT_zone" onclick="$('#NEURO_ACT_zone').val('SCNEAR').trigger('change');"> <?php echo xlt('scNear{{without correction near}}'); ?> </span>
3448 <span class="eye_button <?php if (($ACT_SHOW ?? null) == 'CCNEAR') {
3449 echo "eye_button_selected";
3450 } ?>" id="NEURO_ACT_zone_CCNEAR" name="NEURO_ACT_zone" onclick="$('#NEURO_ACT_zone').val('CCNEAR').trigger('change');"> <?php echo xlt('ccNear{{with correction at near}}'); ?> </span>
3451 </div>
3452 <div class="borderShadow ACT_boxed"><span class="underline"><?php echo xlt('Position of Gaze'); ?></span><br />
3453 <span class="eye_button_blank"> <?php echo xlt('R{{right}}'); ?> </span>
3454 <span class="eye_button" id="NEURO_field_1" name="NEURO_field" onclick="$('#NEURO_field').val('1').trigger('change');"> 1 </span>
3455 <span class="eye_button" id="NEURO_field_2" name="NEURO_field" onclick="$('#NEURO_field').val('2').trigger('change');"> 2 </span>
3456 <span class="eye_button" id="NEURO_field_3" name="NEURO_field" onclick="$('#NEURO_field').val('3').trigger('change');"> 3 </span>
3457 <span class="eye_button_blank"> <?php echo xlt('L{{left}}'); ?> </span>
3459 <span class="eye_button_blank"><i class="fa fa-1 fa-reply rotate-left"></i></span>
3460 <span class="eye_button" id="NEURO_field_4" name="NEURO_field" onclick="$('#NEURO_field').val('4').trigger('change');"> 4 </span>
3461 <span class="eye_button eye_button_selected" id="NEURO_field_5" name="NEURO_field" onclick="$('#NEURO_field').val('5').trigger('change');"> 5 </span>
3462 <span class="eye_button" id="NEURO_field_6" name="NEURO_field" onclick="$('#NEURO_field').val('6').trigger('change');">6</span>
3463 <span class="eye_button_blank"><i class="fa fa-1 fa-reply flip-left"></i></span>
3465 <span class="eye_button" id="NEURO_field_10" name="NEURO_field" onclick="$('#NEURO_field').val('10').trigger('change');">10</span>
3466 <span class="eye_button" id="NEURO_field_7" name="NEURO_field" onclick="$('#NEURO_field').val('7').trigger('change');">7</span>
3467 <span class="eye_button" id="NEURO_field_8" name="NEURO_field" onclick="$('#NEURO_field').val('8').trigger('change');">8</span>
3468 <span class="eye_button" id="NEURO_field_9" name="NEURO_field" onclick="$('#NEURO_field').val('9').trigger('change');">9</span>
3469 <span class="eye_button" id="NEURO_field_11" name="NEURO_field" onclick="$('#NEURO_field').val('11').trigger('change');">11</span>
3470 </div>
3472 <div class="borderShadow ACT_boxed"><span class="underline"><?php echo xlt('Prism Diopters'); ?></span><br />
3473 <span class="eye_button" id="NEURO_value_ortho" name="NEURO_value" onclick="$('#NEURO_value').val('ortho').trigger('change');"><?php echo xlt('Ortho{{orthophoric}}'); ?></span>
3474 <span class="eye_button" id="NEURO_value_1" name="NEURO_value" onclick="$('#NEURO_value').val('1').trigger('change');">1</span>
3475 <span class="eye_button" id="NEURO_value_2" name="NEURO_value" onclick="$('#NEURO_value').val('2').trigger('change');">2</span>
3476 <span class="eye_button" id="NEURO_value_3" name="NEURO_value" onclick="$('#NEURO_value').val('3').trigger('change');">3</span>
3477 <span class="eye_button" id="NEURO_value_4" name="NEURO_value" onclick="$('#NEURO_value').val('4').trigger('change');">4</span>
3478 <span class="eye_button" id="NEURO_value_5" name="NEURO_value" onclick="$('#NEURO_value').val('5').trigger('change');">5</span>
3479 <span class="eye_button" id="NEURO_value_6" name="NEURO_value" onclick="$('#NEURO_value').val('6').trigger('change');">6</span>
3480 <span class="eye_button" id="NEURO_value_8" name="NEURO_value" onclick="$('#NEURO_value').val('8').trigger('change');">8</span>
3481 <span class="eye_button" id="NEURO_value_10" name="NEURO_value" onclick="$('#NEURO_value').val('10').trigger('change');">10</span>
3482 <span class="eye_button" id="NEURO_value_12" name="NEURO_value" onclick="$('#NEURO_value').val('12').trigger('change');">12</span>
3483 <span class="eye_button" id="NEURO_value_14" name="NEURO_value" onclick="$('#NEURO_value').val('14').trigger('change');">14</span>
3484 <span class="eye_button" id="NEURO_value_16" name="NEURO_value" onclick="$('#NEURO_value').val('16').trigger('change');">16</span>
3485 <span class="eye_button" id="NEURO_value_18" name="NEURO_value" onclick="$('#NEURO_value').val('18').trigger('change');">18</span>
3486 <span class="eye_button" id="NEURO_value_20" name="NEURO_value" onclick="$('#NEURO_value').val('20').trigger('change');">20</span>
3487 <span class="eye_button" id="NEURO_value_25" name="NEURO_value" onclick="$('#NEURO_value').val('25').trigger('change');">25</span>
3488 <span class="eye_button" id="NEURO_value_30" name="NEURO_value" onclick="$('#NEURO_value').val('30').trigger('change');">30</span>
3489 <span class="eye_button" id="NEURO_value_35" name="NEURO_value" onclick="$('#NEURO_value').val('35').trigger('change');">35</span>
3490 <span class="eye_button" id="NEURO_value_40" name="NEURO_value" onclick="$('#NEURO_value').val('40').trigger('change');">40</span>
3491 </div>
3492 </div>
3493 <span class="closeButton fa fa-times float-right z100" id="BUTTON_TEXTD_NEURO" name="BUTTON_TEXTD_NEURO" value="1"></span>
3494 </div>
3495 </div>
3496 </div>
3497 <!-- end Neuro -->
3498 <br />
3499 <!-- start IMP/PLAN -->
3500 <div class="size50 clear_both" id="IMPPLAN_1">
3501 <div id="IMPPLAN_left" name="IMPPLAN_left" class="clear_both exam_section_left borderShadow">
3502 <span class="anchor" id="IMPPLAN_anchor"></span>
3503 <a class="closeButton_5 far fa-file-pdf"
3504 title="<?php echo xla('Once completed, view and store this encounter as a PDF file'); ?>"
3505 onclick="openNewForm('<?php echo $GLOBALS['webroot']; ?>/interface/patient_file/report/custom_report.php?printable=1&pdf=1&<?php echo attr_url($form_folder) . "_" . attr_url($form_id) . "=" . attr_url($encounter); ?>&', 'Eye Report');"
3506 href="JavaScript:void(0);">
3508 </a>
3509 <span class="closeButton_2 fa fa-paint-brush" id="BUTTON_DRAW_IMPPLAN" title="<?php echo xla('Open/Close the Imp/Plan drawing panel'); ?>" name="BUTTON_DRAW_IMPPLAN"></span>
3510 <i class="closeButton_3 fa fa-database" title="<?php echo xla('Show the Impression/Plan Builder panel'); ?>" id="BUTTON_QP_IMPPLAN" name="BUTTON_QP_IMPPLAN"></i>
3511 <i class="closeButton_4 fa fa-user-md" name="Shorthand_kb" title="<?php echo xla("Open/Close the Shorthand Window and display Shorthand Codes"); ?>"></i>
3512 <i class="closeButton fa fa-minus-circle" title="<?php echo xla('Open/Close Imp/Plan panels'); ?>" id="BUTTON_TAB_IMPPLAN" name="BUTTON_TAB_IMPPLAN"></i>
3513 <div id="IMPPLAN_left_text" name="IMPPLAN_left_text">
3514 <b><?php echo xlt('Impression/Plan'); ?>:</b><div class="kb kb_left"><?php echo xlt('IMP{{impression}}'); ?></div>
3515 <div id="IMPPLAN_blank" name="IMPPLAN_blank" class="HPI_text">
3516 <br />
3517 <table class="IMPPLAN">
3518 <tr>
3519 <td class="right bold" style="width:75px;padding-right:10px;vertical-align:top;"><?php echo xlt('New Dx{{new diagnosis}}'); ?>: </td>
3520 <td><textarea name="IMP" id="IMP"><?php echo text($IMP); ?></textarea></td>
3521 </tr>
3522 </table>
3523 </div>
3524 <div id="IMPPLAN_text" name="IMPPLAN_text">
3525 <?php
3526 echo '<br /><br /><span class="bold">';
3527 echo xlt('How-to Build the Impression/Plan') . ':';
3528 echo '</span><ol>';
3529 echo '<li>' . xlt('Manually type into the New DX box above.') . '<br />' . xlt('The *Tab* key creates each entry.') . '</li>';
3530 echo '<span class"bold" style="margin-left:-5px;">' . xlt('or utilize the Impression/Plan Builder') . '</span>';
3531 echo '<li>' . xlt('Drag a DX over by its handle') . ':&nbsp;<i class="fas fa-arrows-alt"></i></li>';
3532 echo '<li>' . xlt('Double click on a DX\'s handle') . ':&nbsp;<i class="fas fa-arrows-alt"></i></li>';
3533 echo '<li>' . xlt('Multi-select desired DX(s) and click the') . ' <i class="fa fa-reply"></i> ' . xlt('icon') . '</li>';
3534 echo '</ol>';
3536 </div>
3537 <div id="IMPPLAN_zone" name="IMPPLAN_zone" class="nodisplay">
3538 </div>
3540 <input type="hidden" name="IMPPLAN_count" id="IMPPLAN_count" value="<?php echo $IMPPLAN_count ?? ''; ?>">
3541 </div>
3542 </div>
3544 <?php
3545 /* There are at least 4 ways to build IMP/PLAN
3546 * 1. Freehand - textarea
3547 * 2. Copy Forward (prior_select)
3548 * 3. Build automatically through workflows. (build_PMSFH)
3549 * 4. Draw it in (display_draw_section)
3552 <div class="size50">
3553 <div id="IMPPLAN_right" class="exam_section_right borderShadow text_clinical clear_both ">
3554 <?php display_draw_section("IMPPLAN", $encounter, $pid); ?>
3556 <div id="PRIORS_IMPPLAN_left_text" name="PRIORS_IMPPLAN_left_text" class="PRIORS_class PRIORS"><i class="fa fa-spinner fa-spin"></i>
3557 </div>
3558 <div id="QP_IMPPLAN" name="QP_IMPPLAN" class="QP_class2">
3559 <span id="iPLAN_BUILD" name="iPLAN_BUILD" class="bold"><?php echo xlt('Impression/Plan'); ?></span>
3560 <div id="IP_P_1">
3561 <?php echo $selector = priors_select("IMPPLAN", $id, $id, $pid); ?>
3562 </div>
3563 <span class="closeButton fa fa-times float-right z100" id="BUTTON_TEXTD_IMPPLAN" name="BUTTON_TEXTD_IMPPLAN" value="1"></span>
3564 <br />
3565 <?php
3567 * Let's discuss 3. Build automatically through workflows - The Impression/Plan Builder
3568 * Since POH is our area of concern, use $PMSFH[0]['POH'] & $PMSFH[0]['POS'] first then
3569 * $PMSFH[0]['medical_problem'] then
3570 * system to extrapolate DXs from user-entered clinical findings (PE)
3571 * to build the IMP/PLAN options list
3572 * a. Diagnoses are sortable via dragging, to build an order.
3573 * b. Diagnoses are selectable and deselectable
3574 * then click the BUILD icon to append the selected DXs to the bottom of the IMP/Plan list.
3575 * c. Drag a DX across onto the IMP.textarea appends this data to the current IMP.textarea data
3576 * d. Drag a DX across onto the IMP/Plan area appends this DX to the bottom of the IMP/Plan list
3577 * e. DoubleClick a DX appends this DX to the bottom of the IMP/Plan list
3580 if (!$PMSFH) {
3581 $PMSFH = build_PMSFH($pid);
3584 $total_DX = '0';
3585 if ((($PMSFH[0]['POH'][0] ?? null) > '') && ($PMSFH[0]['PMH'][0] > '')) {
3586 $total_DX = '1';
3592 <br />
3593 <dl class="building_blocks" id="building_blocks" name="building_blocks">
3594 <dt class="borderShadow"><i title="<?php echo xla('Drag the arrow for each diagnosis to sort the list.');
3595 echo "\n";
3596 echo xla('Select the diagnoses to include in the Impression/Plan.') . "\n";
3597 echo xla('Press this icon to build your Impression/Plan.'); ?>" class="fa fa-reply" id="make_new_IMP" name="make_new_IMP"></i>
3598 <span id="IMP_start" name="IMP_start"><?php echo xlt('Impression/Plan Builder'); ?></span>
3599 <div id="IMP_start2">
3600 <input type="checkbox" id="inc_PE" name="inc_PE" checked="checked"><label for='inc_PE' class='input-helper input-helper--checkbox'><?php echo xlt('Exam{{Physical Exam}}'); ?></label>&nbsp;
3601 <input type="checkbox" id="inc_POH" name="inc_POH" checked="checked"><label for='inc_POH' class='input-helper input-helper--checkbox'><?php echo xlt('POH{{Past Ocular History}}'); ?></label>&nbsp;
3602 <input type="checkbox" id="inc_PMH" name="inc_PMH"><label for='inc_PMH' class='input-helper input-helper--checkbox'><?php echo xlt('PMH{{Past Medical History}}') ?></label>&nbsp;
3603 </div>
3604 </dt>
3605 <dd id="IMP_start_acc" name="IMP_start_acc">
3606 <ol id="build_DX_list" name="build_DX_list">
3607 <?php
3608 $i = 0;
3609 if ($total_DX == '1') {
3610 foreach ($PMSFH[0]['POH'] as $k => $v) {
3611 $insert_code = '';
3612 if ($v['diagnosis'] > '') {
3613 $insert_code = "<code class='float-right diagnosis'>" . $v['diagnosis'] . "</code>";
3616 $k = xla($k);
3617 $v['title'] = xlt($v['title']);
3618 $insert_code = text($insert_code);
3619 echo "<li class='ui-widget-content'> <span id='DX_POH_" . $k . "' name='DX_POH_" . $k . "'>" . $v['title'] . "</span> " . $insert_code . "</li>";
3622 foreach ($PMSFH[0]['POS'] as $k => $v) {
3623 $insert_code = '';
3624 if ($v['diagnosis'] > '') {
3625 $insert_code = "<code class='float-right diagnosis'>" . $v['diagnosis'] . "</code>";
3628 $k = xla($k);
3629 $v['title'] = xlt($v['title']);
3630 $insert_code = text($insert_code);
3631 echo "<li class='ui-widget-content'> <span id='DX_POS_" . $k . "' name='DX_POS_" . $k . "'>" . $v['title'] . "</span> " . $insert_code . "</li>";
3634 if (!empty($PMSFH[0]['medical_problem'])) {
3635 foreach ($PMSFH[0]['medical_problem'] as $k => $v) {
3636 $insert_code = '';
3637 if ($v['diagnosis'] > '') {
3638 $insert_code = "<code class='float-right diagnosis'>" . $v['diagnosis'] . "</code>";
3641 $k = xla($k);
3642 $v['title'] = xlt($v['title']);
3643 $insert_code = text($insert_code);
3644 echo "<li class='ui-widget-content'> <span id='DX_PMH_" . $k . "' name='DX_PMH_" . $k . "'>" . $v['title'] . "</span> " . $insert_code . "</li>";
3647 } else {
3648 echo "<br /><span class='bold'>";
3649 echo xlt("The Past Ocular History (POH) and Past Medical History (PMH) are negative.");
3650 echo xlt('and') . ' ' . xlt('no diagnosis was auto-generated from the clinical findings.');
3651 echo "</span><br /><br />";
3652 echo xlt("Update the chart to activate the Builder.") . "<br />";
3655 </ol>
3656 </dd>
3658 <?php
3660 * The goal here is to auto-code the encounter and link it directly to the billing module.
3661 * Select Visit Type from dropdown (CPT4) built from practice's fee_sheet_options table.
3662 * Active coding system = $GLOBALS['default_search_code_type'];
3663 * We present the active coding system codes found in the Imp/Plan.
3664 * Perhaps a minor procedure/test was performed?
3665 * Select options drawn from Eye_todo_done_".$provider_id list with a CODE
3666 * TODO: Finally we have the "Prior Visit" functionality of the form.
3667 * We should be able to look past codes and perhaps carry this forward?
3670 <script>
3671 var default_search_type = '<?php echo text($GLOBALS['default_search_code_type']); ?>';
3672 </script>
3674 <dt class="borderShadow"><span><?php echo xlt('Coding Engine'); ?></span></dt>
3675 <dd>
3676 <div style="padding:5px 10px 5px 10px;">
3677 <table style="width:100%;">
3678 <tr>
3679 <td colspan="3"><b><u><?php echo xlt('Diagnostic') . " " . xlt('Codes'); ?>:</u></b>
3680 </td>
3681 </tr>
3682 <tr>
3683 <td colspan="3" style="padding-top:5px;padding-left:15px;"><span id="Coding_DX_Codes"><br /></span>
3684 </td>
3685 </tr>
3686 <tr>
3687 <td style="padding-top:10px;width:60%;"><b><u><?php echo xlt('Visit');
3688 echo " " . xlt('Codes'); ?>:</u></b>
3689 </td>
3690 </tr>
3691 <tr>
3692 <td class="indent20">
3693 <span class="CODE_LOW indent20" title="<?php echo xla('Documentation for a Detailed HPI requires') . ":\n " . xla('> 3 HPI elements') . "\n " .
3694 xla('OR{{as in AND/OR, ie. not an abbreviation}}') . "\n " .
3695 xla('the status of three chronic/inactive problems'); ?>">
3696 <i class="fa fa-check"></i> <?php
3697 echo xlt('Limited HPI');
3698 ?> </span><span class="CODE_HIGH nodisplay"><i class="fa fa-check"></i> <?php
3699 echo xlt('Detailed HPI'); ?></span><span class="EXAM_LOW">, <?php echo xlt('Limited Exam'); ?></span>
3700 <span class="DIL_RISKS nodisplay"><i class="fa fa-check"></i> <?php echo xlt('Detailed exam'); ?></span>
3701 </td>
3702 <td class="text-center">
3703 <span style="text-decoration:underline;"><?php echo xlt('Modifiers'); ?></span>
3704 </td>
3705 <td class="text-center">
3706 <span id="Coding_Visit_Codes" style="text-decoration:underline;"><?php echo xlt('Justify'); ?></span>
3707 <span style="font-size:1.2em;">&#x21b4;</span>
3708 </td>
3709 </tr>
3710 <tr class="ui-widget-content">
3711 <td>
3712 <div >
3713 <select id="visit_codes">
3714 <?php
3715 $i = 0;
3716 $last_category = '';
3718 // Create drop-lists based on the fee_sheet_options table.
3719 $res = sqlStatement("SELECT * FROM fee_sheet_options " .
3720 "ORDER BY fs_category, fs_option");
3721 while ($row = sqlFetchArray($res)) {
3722 $fs_category = $row['fs_category'];
3723 $fs_option = $row['fs_option'];
3724 $fs_codes = $row['fs_codes'];
3725 list($code_type_here,$code) = explode("|", $fs_codes);
3726 if ($fs_category !== $last_category) {
3727 $last_category = $fs_category;
3728 echo " <option value=''> " . text(substr($fs_category, 1)) . "</option>\n";
3730 $code_text = (strlen(substr($fs_option, 1)) > 26) ? substr(substr($fs_option, 1), 0, 24) . '...' : substr($fs_option, 1);
3731 echo " <option value='" . attr($fs_codes) . "'>" . text($code) . " " . text(substr($fs_category, 1)) . ": " . text($code_text) . "</option>\n";
3734 // Create drop-lists based on categories defined within the codes.
3735 $pres = sqlStatement("SELECT option_id, title FROM list_options " .
3736 "WHERE list_id = 'superbill' ORDER BY seq");
3737 while ($prow = sqlFetchArray($pres)) {
3738 global $code_types;
3739 echo " <option value=''> " . text($prow['title']) . "\n";
3740 $res = sqlStatement("SELECT code_type, code, code_text,modifier FROM codes " .
3741 "WHERE superbill = ? AND active = 1 " .
3742 "ORDER BY code_text", array($prow['option_id']));
3743 while ($row = sqlFetchArray($res)) {
3744 $ctkey = $fs->alphaCodeType($row['code_type']);
3745 if ($code_types[$ctkey]['nofs']) {
3746 continue;
3749 $code_text = (strlen($row['code_text']) > 15) ? substr($row['code_text'], 0, 13) . '...' : $row['code_text'];
3750 echo " <option value='" . attr($ctkey) . "|" .
3751 attr($row['code']) . ':' . attr($row['modifier']) . "|'>" . text($code_text) . "</option>\n";
3755 </select>
3756 </div>
3757 </td>
3758 <td class="text-center">
3759 <span class="modifier" name="visit_modifier" id="visit_mod_22" value="22" title="<?php echo xla('Modifier 22: Increased Procedural Services: When the work required to provide a service is substantially greater than typically required, it may be identified by adding modifier 22 to the usual procedure code.') ?>">22</span>
3760 <span class="modifier" name="visit_modifier" id="visit_mod_24" value="24" title="<?php echo xla('Modifier 24: Unrelated Evaluation and Management Service by the Same Physician During a Postoperative Period') ?>">24</span>
3761 <span class="modifier" name="visit_modifier" id="visit_mod_25" value="25" title="<?php echo xla('Modifier 25: Significant, separately identifiable evaluation and management (E/M) service by the same physician on the day of a procedure or other service') ?>">25</span>
3762 <span class="modifier" name="visit_modifier" id="visit_mod_57" value="57" title="<?php echo xla('Modifier 57: Indicates an Evaluation and Management (E/M) service resulted in the initial decision to perform surgery either the day before a major surgery (90 day global) or the day of a major surgery.'); ?>">57</span>
3763 </td>
3764 <td>
3765 <span id="visit_justification" class="float-right text-center" style="padding:7px 2px;"></span>
3766 </td>
3767 </tr>
3769 <tr id="neurosens_code" name="neurosens_code" class="nodisplay">
3770 <td colspan="3" style="padding-top:5px;padding-left:15px;"><input type="hidden" id="neurosens" style="width:50px;" value="92060" class="">
3771 <i class="fa fa-check"></i> 92060 Sensorimotor Exam - no modifier required.
3772 </td>
3773 </tr>
3775 <tr>
3776 <td style="padding-top:10px;" colspan="3">
3777 <b><u><?php echo xlt('Tests Performed'); ?>:</u></b>&nbsp;
3778 <a href="<?php echo $GLOBALS['webroot']; ?>/interface/super/edit_list.php?list_id=Eye_todo_done_<?php echo attr($provider_id); ?>" target="RTop"
3779 title="<?php echo xla('Click here to Edit this Doctor\'s Plan options') . ". \n" . xlt('Only entries with a Code are billable') . ". "; ?>"
3780 name="provider_testing_codes" style="color:black;font-weight:600;"><i class="fa fa-pencil-alt fa-fw"></i> </a>
3781 </td>
3782 </tr>
3783 <tr>
3784 <td colspan="3">
3785 <table style="width:100%;">
3786 <tr>
3787 <?php
3789 $counter = '0';
3790 $count = '0';
3791 $arrTESTS = explode("|", $Resource ?? ''); //form_eye_mag:Resource = billable things (not visit code) performed today
3792 $query = "select * from list_options where list_id=? and activity='1' order by seq";
3793 $TODO_data = sqlStatement($query, array("Eye_todo_done_" . $provider_id));
3794 while ($row = sqlFetchArray($TODO_data)) {
3795 if ($row['codes'] === '') {
3796 continue;
3798 list($code_type_here,$code) = explode(":", $row['codes']);
3799 $codedesc = lookup_code_descriptions($row['codes']);
3800 $order = array("\r\n", "\n","\r");
3801 $codedesc = str_replace($order, '', $codedesc);
3802 if ($codedesc == '') {
3803 $codedesc = $row['title'];
3805 $codetext = $codedesc . " (" . $row['codes'] . ")";
3806 $checked = '';
3807 if (in_array($row['codes'], $arrTESTS)) {
3808 $checked = "checked='yes'";
3809 $class1 = "lights_on";
3810 $class2 = "";
3811 } else {
3812 $class1 = "lights_off";
3813 $class2 = 'nodisplay';
3816 * This will link to a report generator for billable procedures/tests.
3817 * They items need to be read/interpreted/dictated/documented to be billable.
3818 * The reading may already be documented within the scanned item itself.
3819 * Thus this will be optional.
3820 * If needed, these reports should be categoriezed and filed ala the document engine.
3821 * If a procedure/test has a document category and there is a document uploaded for today's encounter
3822 * an icon should be displayed linked to the test/interpretation.
3823 * Procedures/surgeries performed will need an op-note like format.
3824 * This will be another series of forms then.
3825 * echo "<i class='far fa-file-word'></i>";
3827 echo '<td class="' . $class1 . ' ">';
3828 echo "<input type='checkbox' class='TESTS indent20' id='TEST_$counter' data-codetext='" . attr($codetext) . "' data-title='" . attr($codetext) . "' name='TEST[]' $checked value='" . attr($row['codes']) . "'> ";
3829 $label = text(substr($row['title'], 0, 30));
3830 echo "<label for='TEST_$counter' class='input-helper input-helper--checkbox'>";
3831 echo $label . "</label>";
3832 echo '<div id="TEST_' . $counter . '_justmods" class="' . $class2 . ' indent20" style="margin-bottom: 5px;">' . xlt('Modifier(s)') . ': <input type="text" style="width:100px;" id="TEST_' . $counter . '_modifier" value="' . ($row['modifier'] ?? '') . '">';
3834 OK we are going to attach this test to a specific ICD10 code listed above.
3835 The codes are listed by number.
3836 The user will add in the number here
3840 echo '<br />' . xlt('Justify Dx') . ':
3842 <span class="TESTS_justify indent20" id="TEST_' . $counter . '_justify"></span>
3843 </div>
3846 $count++;
3847 $counter++;
3848 if ($count == "3") {
3849 echo '</td><tr>';
3850 $count = '0';
3851 } else {
3852 echo "</td>";
3857 </td>
3858 </tr>
3859 </table>
3860 <br />
3861 </td>
3862 </tr>
3863 </table>
3864 <table style="width:100%;padding-top:10px;vertical-align:top;">
3865 <tr>
3866 <td style="width:40%;">
3867 <b><u><?php echo xlt('Appt{{Abbreviation for appointment}}') . " " . xlt('Status') . " / " . xlt('Flow Board'); ?>:</u></b><br />
3868 <div class="indent20">
3869 <input type="radio" name="visit_status" id="checked_out" value=">" /><label for="checked_out"> <b>></b> <?php echo xlt('Checked Out'); ?></label>
3870 <br />
3871 <input type="radio" name="visit_status" id="coded" value="$" /><label for="coded"> <b>$</b>&nbsp;<?php echo xlt('Coding complete'); ?></label>
3872 <br />
3873 <input type="radio" name="visit_status" id="send_notes" value="}" /><label for="send_notes"> <b>}</b> <?php echo xlt('Send Notes'); ?></label>
3874 </div>
3875 </td>
3876 <td style="padding-left:15px;vertical-align:text-top;text-left">
3877 <div class="widget text-center">
3878 <b><u><?php echo xlt('Process');
3879 echo " " . xlt('Billing'); ?>:</b></u><br />
3880 <button id="code_me_now" ><?php echo xlt('Populate Fee Sheet'); ?></button>
3881 <button id="open_fee_sheet"
3882 onclick="openNewForm('<?php echo $GLOBALS['webroot']; ?>/interface/patient_file/encounter/load_form.php?formname=fee_sheet', 'Fee Sheet');" href="JavaScript:void(0);"
3883 tabindex="-1"><?php echo xlt('Open Fee Sheet'); ?>
3884 </button>
3885 </div>
3886 </td>
3887 </tr>
3888 </table>
3889 </div>
3890 </dd>
3892 <?php
3894 * This a provider-specific ORDER list of items that the user can define.
3895 * Pencil icon links to 'list_options' in DB which opens in the RTop frame.
3896 * If the provider-specific list does not exist, create it and populate it
3897 * with generic starter items from list_options list "Eye_todo_done_defaults".
3898 * This list is used to create the plan for the next visit. Anything with a CODE
3899 * is also listed as a billable item/TEST in the CODING ENGINE.
3901 $query = "select * from list_options where list_id=? and activity='1' order by seq";
3902 $TODO_data = sqlStatement($query, array("Eye_todo_done_" . $provider_id));
3903 if (sqlNumRows($TODO_data) < '1') {
3904 // Provider list is not created yet, or was deleted.
3905 // Create it fom defaults...
3906 $query = "INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `activity`) VALUES ('lists', ?, ?, '0', '1', '0', '', '', '', '0')";
3907 sqlStatement($query, array('Eye_todo_done_' . $provider_id,'Eye Orders ' . $prov_data['lname']));
3908 $SQL_INSERT = "INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `mapping`, `notes`, `codes`, `activity`, `subtype`) VALUES ";
3909 $number_rows = 0;
3910 $query = "SELECT * FROM list_options where list_id =? ORDER BY seq";
3911 $TODO_data = sqlStatement($query, array("Eye_todo_done_defaults"));
3912 while ($TODO = sqlFetchArray($TODO_data)) {
3913 if ($number_rows > 0) {
3914 $SQL_INSERT .= ",
3917 $SQL_INSERT .= "('Eye_todo_done_" . add_escape_custom($provider_id) . "','" . add_escape_custom($TODO['option_id']) . "','" . add_escape_custom($TODO['title']) . "','" . add_escape_custom($TODO['seq']) . "','" . add_escape_custom($TODO['mapping']) . "','" . add_escape_custom($TODO['notes']) . "','" . add_escape_custom($TODO['codes']) . "','" . add_escape_custom($TODO['activity']) . "','" . add_escape_custom($TODO['subtype']) . "')";
3918 $number_rows++;
3920 sqlStatement($SQL_INSERT . ";");
3923 <dt class="borderShadow">
3924 <span><?php echo xlt('Next Visit Orders'); ?></span>
3925 <a href="<?php echo $GLOBALS['webroot']; ?>/interface/super/edit_list.php?list_id=Eye_todo_done_<?php echo attr($provider_id); ?>" target="RTop"
3926 title="<?php echo xla('Click here to Edit this Doctor\'s Plan options'); ?>"
3927 name="provider_todo" style="color:black;font-weight:600;"><i class="fa fa-pencil-alt fa-fw"></i> </a>
3928 </dt>
3929 <dd>
3930 <table>
3931 <tr class="" style="vertical-align:bottom;margin: 10px;;">
3932 <td></td>
3933 </tr>
3934 <tr>
3935 <td style="padding-right:20px;padding-left:20px;">
3936 <?php
3937 // Iterate through this "provider's" orders and compare to list of options.
3938 $count = 0;
3939 $counter = 0;
3940 $query = "SELECT * FROM form_eye_mag_orders where form_id=? and pid=? ORDER BY id ASC";
3941 $PLAN_results = sqlStatement($query, array($form_id, $pid ));
3942 while ($plan_row = sqlFetchArray($PLAN_results)) {
3943 $PLAN_arr[] = $plan_row;
3945 while ($row = sqlFetchArray($TODO_data)) {
3946 $arrPLAN[$counter]['option_id'] = $row['option_id'];
3947 $arrPLAN[$counter]['title'] = $row['title'];
3948 $arrPLAN[$counter]['option_value'] = $row['option_value'];
3949 $arrPLAN[$counter]['mapping'] = $row['mapping'];
3950 $arrPLAN[$counter]['notes'] = $row['notes'];
3951 $arrPLAN[$counter]['codes'] = $row['codes'];
3952 $arrPLAN[$counter]['subtype'] = $row['subtype'];
3953 $checked = '';
3954 $title = $row['title'];
3955 if ($here = in_array_r($title, ($PLAN_arr ?? ''))) {
3956 $checked = "checked='yes'";
3957 $found++;
3959 // <!-- <i title="Build your plan." class="fa fa-mail-forward fa-flip-horizontal" id="make_blank_PLAN" name="make_blank_PLAN"></i>-->
3960 echo "<input type='checkbox' id='PLAN$counter' name='PLAN[]' $checked value='" . attr($row['title']) . "'> ";
3961 $label = text(substr($row['title'], 0, 30));
3962 echo "<label for='PLAN$counter' class='input-helper input-helper--checkbox' title='" . attr($row['notes']) . "'>";
3963 echo $label . "</label><br />";
3964 $count++;
3965 $counter++;
3966 if ($count == "3") {
3967 echo '</td><tr><td style="padding-right:20px;padding-left:20px;">';
3968 $count = '0';
3969 } else {
3970 echo "</td><td>";
3974 <script>
3975 var PLANoptions = <?php echo json_encode($arrPLAN ?? ''); ?>;
3976 </script>
3977 </td>
3978 </tr>
3979 <tr>
3980 <td colspan="3" style="padding-left:20px;padding-top:4px;">
3981 <textarea id="Plan<?php echo $counter; ?>" name="PLAN[]" style="width: 440px;height: 44px;"><?php if (($found ?? null) < (empty($PLAN_arr) ? 0 : count($PLAN_arr))) {
3982 echo $PLAN_arr[count($PLAN_arr) - 1]['ORDER_DETAILS']; } ?></textarea>
3983 </td>
3984 </tr>
3985 </table>
3986 </dd>
3989 <dt class="borderShadow"><span><?php echo xlt('Communication Engine'); ?></span></dt>
3990 <dd>
3991 <div style="padding:5px 20px 5px 20px;">
3993 <table style="width:100%;">
3994 <tr>
3995 <td class="bold underline" style="min-width:50px;"></td>
3996 <td class="bold underline" style="min-width:100px;">PCP</td>
3997 <td class="bold underline" style="min-width:100px;">Referrer</td>
3998 </tr>
3999 <tr>
4000 <td></td>
4001 <td>
4002 <?php
4003 $ures = sqlStatement("SELECT id, fname, lname, specialty FROM users " .
4004 "WHERE active = 1 AND ( info IS NULL OR info NOT LIKE '%Inactive%' ) " .
4005 "AND ( authorized = 1 OR ( username = '' AND npi != '' ) ) " .
4006 "ORDER BY lname, fname");
4007 echo "<select name='form_PCP' id='form_PCP' title='" . xla('Primary Care Provider') . "'>";
4008 echo "<option value=''>" . xlt($empty_title ?? '') . "</option>";
4009 $got_selected = false;
4010 while ($urow = sqlFetchArray($ures)) {
4011 $uname = text($urow['lname'] . ' ' . $urow['fname']);
4012 $optionId = attr($urow['id']);
4013 echo "<option value='$optionId'";
4014 if ($urow['id'] == $pat_data['providerID']) {
4015 echo " selected";
4016 $got_selected = true;
4019 echo ">$uname</option>";
4022 if (!$got_selected && ($currvalue ?? null)) {
4023 echo "<option value='" . attr($currvalue) . "' selected>* " . text($currvalue) . " *</option>";
4024 echo "</select>";
4025 echo "<span class='danger' title='" . xla('Please choose a valid selection from the list.') . "'>" . xlt('Fix this') . "!</span>";
4026 } else {
4027 echo "</select>";
4030 </td>
4031 <td>
4032 <?php
4033 $ures = sqlStatement("SELECT id, fname, lname, specialty FROM users " .
4034 "WHERE active = 1 AND ( info IS NULL OR info NOT LIKE '%Inactive%' ) " .
4035 "AND ( authorized = 1 OR ( username = '') ) " .
4036 "ORDER BY lname, fname");
4037 echo "<select name='form_rDOC' id='form_rDOC' title='" . xla('Every name in the address book appears here, not only physicians.') . "'>";
4038 echo "<option value=''>" . xlt($empty_title ?? '') . "</option>";
4039 $got_selected = false;
4040 while ($urow = sqlFetchArray($ures)) {
4041 $uname = text($urow['lname'] . ' ' . $urow['fname']);
4042 $optionId = attr($urow['id']);
4043 echo "<option value='$optionId'";
4044 if ($urow['id'] == $pat_data['ref_providerID']) {
4045 echo " selected";
4046 $got_selected = true;
4049 echo ">$uname</option>";
4052 if (!$got_selected && ($currvalue ?? '')) {
4053 echo "<option value='" . attr($currvalue) . "' selected>* " . text($currvalue) . " *</option>";
4054 echo "</select>";
4055 echo " <span class='danger' title='" . xla('Please choose a valid selection from the list.') . "'>" . xlt('Fix this') . "!</span>";
4056 } else {
4057 echo "</select>";
4060 </td>
4061 </tr>
4062 <tr>
4063 <td class="bold top"><?php echo xlt('Phone'); ?>:</td>
4064 <td>
4065 <span id="pcp_phone"><?php echo text($pcp_data['phonew1'] ?? ''); ?></span>
4066 <span id="pcp_phonew2"><?php if ($pcp_data['phonew2'] ?? '') {
4067 echo "<br />" . text($pcp_data['phonew2']);} ?>
4068 </span>
4069 </td>
4070 <td>
4071 <span id="ref_phone"><?php echo text($ref_data['phonew1'] ?? ''); ?></span>
4072 <span id="ref_phonew2"><?php if ($pcp_data['phonew2'] ?? null) {
4073 echo "<br />" . text($pcp_data['phonew2']);} ?>
4074 </span>
4075 </td>
4076 </tr>
4077 <tr>
4078 <td class="bold top"><?php echo xlt('Fax'); ?>:</td>
4079 <td class="bold">
4080 <?php
4081 if (($pcp_data['fax'] ?? '') > '') {
4082 // does the fax already exist?
4083 $query = "SELECT * FROM form_taskman WHERE TO_ID=? and PATIENT_ID=? and ENC_ID=?";
4084 $FAX_PCP = sqlQuery($query, array($pat_data['providerID'],$pid,$encounter));
4085 if ($FAX_PCP['ID']) { //it is here already, make them print and manually fax it. Show icon
4087 <span id='pcp_fax'><?php echo text($pcp_data['fax']); ?></span>
4088 <span id='pcp_fax_info'>
4089 <a onclick="openNewForm('<?php echo $GLOBALS['webroot']; ?>/controller.php?document&view&patient_id=<?php echo attr($pid); ?>&doc_id=<?php echo attr($FAX_PCP['DOC_ID']); ?>', 'PCP: Fax Report');"
4090 href='JavaScript:void(0);'
4091 title='<?php echo xla('View the Summary Report sent via Fax Server on') . "\t " . attr($FAX_PCP['COMPLETED_DATE']); ?>'>
4092 <i class='far fa-file-pdf fa-fw'></i></a>
4093 <i class='fas fa-redo fa-fw'
4094 title='<?php echo xla("Click to Re-Send this fax"); ?>'
4095 onclick="top.restoreSession(); create_task('<?php echo attr($pat_data['providerID']); ?>','Fax-resend','pcp'); return false;"></i>
4096 </span> <?php
4097 } else { ?>
4098 <span id='pcp_fax'>
4099 <a href="JavaScript:void(0);"
4100 onclick="top.restoreSession(); create_task('<?php echo attr($pat_data['providerID']); ?>','Fax','pcp'); return false;">
4101 <?php echo text($pcp_data['fax']); ?>
4102 <span id="status_Fax_pcp"><i class="fas fa-fax fa-fw"></i></span>
4103 </a>&nbsp;&nbsp;
4104 </span>
4105 <span id='pcp_fax_info'></span>
4106 <?php
4108 } ?>
4109 </td>
4110 <td class="bold">
4111 <?php if (($ref_data['fax'] ?? null) > '') {
4112 // does the fax already exist?
4113 $query = "SELECT * FROM form_taskman WHERE TO_ID=? and PATIENT_ID=? and ENC_ID=?";
4114 $FAX_REF = sqlQuery($query, array($pat_data['ref_providerID'],$pid,$encounter));
4115 if ($FAX_REF['ID']) { //it is here already, make them print and manually fax it. Show icon ?>
4116 <span id='ref_fax'><?php echo text($ref_data['fax']); ?></span>
4117 <span id='ref_fax_info'>
4118 <a onclick="openNewForm('<?php echo $GLOBALS['webroot']; ?>/controller.php?document&view&patient_id=<?php echo attr($pid); ?>&doc_id=<?php echo attr($FAX_REF['DOC_ID']); ?>', 'Refer: Fax Report');"
4119 href='JavaScript:void(0);'
4120 title='<?php echo xla('View the Summary Report sent via Fax Server on') . "\t " . attr($FAX_REF['COMPLETED_DATE']); ?>'>
4121 <i class='far fa-file-pdf fa-fw'></i></a>
4122 <i class='fas fa-redo fa-fw'
4123 title='<?php echo xla("Click to Re-Send this fax"); ?>'
4124 onclick="top.restoreSession(); create_task('<?php echo attr($pat_data['ref_providerID']); ?>','Fax-resend','ref'); return false;"></i>
4125 </span> <?php
4126 } else { ?>
4127 <span id='ref_fax'>
4128 <a href="JavaScript:void(0);" onclick="top.restoreSession(); create_task('<?php echo attr($pat_data['ref_providerID']); ?>','Fax','ref'); return false;">
4129 <?php echo text($ref_data['fax']); ?>
4130 <span id="status_Fax_ref"><i class="fas fa-fax fa-fw"></i></span>
4131 </a>&nbsp;&nbsp;
4132 </span>
4133 <span id='ref_fax_info'></span>
4134 <?php
4136 } ?>
4137 </span>
4138 </td>
4139 </tr>
4140 <tr>
4141 <td class="top bold"><?php echo xlt('Address'); ?>:</td>
4142 <td class="top">
4143 <span id="pcp_address">
4144 <?php
4145 if (($pcp_data['organization'] ?? '') > '') {
4146 echo text($pcp_data['organization']) . "<br />";
4148 if (($pcp_data['street'] ?? '') > '') {
4149 echo text($pcp_data['street']) . "<br />";
4151 if (($pcp_data['streetb'] ?? '') > '') {
4152 echo text($pcp_data['streetb']) . "<br />";
4154 if (($pcp_data['city'] ?? '') > '') {
4155 echo text($pcp_data['city']) . ", ";
4157 if (($pcp_data['state'] ?? '') > '') {
4158 echo text($pcp_data['state']) . " ";
4160 if (($pcp_data['zip'] ?? '') > '') {
4161 echo text($pcp_data['zip']) . "<br />";
4164 if (($pcp_data['street2'] ?? '') > '') {
4165 echo "<br />" . text($pcp_data['street2']) . "<br />";
4167 if (($pcp_data['streetb2'] ?? '') > '') {
4168 echo text($pcp_data['streetb2']) . "<br />";
4170 if (($pcp_data['city2'] ?? '') > '') {
4171 echo text($pcp_data['city2']) . ", ";
4173 if (($pcp_data['state2'] ?? '') > '') {
4174 echo text($pcp_data['state2']) . " ";
4176 if (($pcp_data['zip2'] ?? '') > '') {
4177 echo text($pcp_data['zip2']) . "<br />";
4180 </span>
4181 </td>
4182 <td class="top">
4183 <span id="ref_address">
4184 <?php
4185 if (($ref_data['organization'] ?? null) > '') {
4186 echo text($ref_data['organization']) . "<br />";
4188 if (($ref_data['street'] ?? null) > '') {
4189 echo text($ref_data['street']) . "<br />";
4191 if (($ref_data['streetb'] ?? null) > '') {
4192 echo text($ref_data['streetb']) . "<br />";
4194 if (($ref_data['city'] ?? null) > '') {
4195 echo text($ref_data['city']) . ", ";
4197 if (($ref_data['state'] ?? null) > '') {
4198 echo text($ref_data['state']) . " ";
4200 if (($ref_data['zip'] ?? null) > '') {
4201 echo text($ref_data['zip']) . "<br />";
4204 if (($ref_data['street2'] ?? null) > '') {
4205 echo "<br />" . text($ref_data['street2']) . "<br />";
4207 if (($ref_data['streetb2'] ?? null) > '') {
4208 echo text($ref_data['streetb2']) . "<br />";
4210 if (($ref_data['city2'] ?? null) > '') {
4211 echo text($ref_data['city2']) . ", ";
4213 if (($ref_data['state2'] ?? null) > '') {
4214 echo text($ref_data['state2']) . " ";
4216 if (($ref_data['zip2'] ?? null) > '') {
4217 echo text($ref_data['zip2']) . "<br />";
4220 </span>
4221 </td>
4222 </tr>
4223 <tr><td>&nbsp;</td></tr>
4224 <tr><td class="top bold"><?php echo xlt('Insurance'); ?>:</td><td><?php echo text($ins_coA); ?></td></tr>
4225 <?php if (!empty($ins_coB)) { ?>
4226 <tr><td class="top bold"><?php echo xlt('Secondary'); ?>:</td><td><?php echo text($ins_coB); ?></td></tr>
4227 <?php } ?>
4228 <tr><td class="top bold"><?php echo xlt('Pharmacy'); ?>:</td>
4229 <?php
4230 $frow['data_type'] = "12";
4231 $frow['form_id'] = 'EYE';
4232 $frow['field_id'] = 'pharmacy_id';
4233 $frow['list_id'] = 'pharmacy_id';
4234 $frow['description'] = "Pharmacy";
4235 echo "<td colspan='2'>";
4236 ob_start();
4237 generate_form_field($frow, $pat_data['pharmacy_id']);
4238 $select_pharm = ob_get_clean();
4239 echo str_replace("form-control", "", $select_pharm);
4241 </td><td class="top">
4242 <button onclick="editScripts('<?php echo $GLOBALS['webroot']; ?>/controller.php?prescription&list&pid=<?php echo attr($pat_data['pid']); ?>');"><?php echo xlt('eRx'); ?></button>
4243 </td></tr>
4245 </table>
4246 </div>
4247 </dd>
4248 </dl>
4249 </div>
4250 </div>
4251 </div>
4252 </div>
4253 </div>
4254 <!-- END IMP/PLAN -->
4255 <!-- end form_container for the main body of the form -->
4256 </div>
4257 <!-- end Layer1 -->
4259 </form>
4260 <!-- end form -->
4261 </div> <!-- end Layer3 -->
4262 </div> <!-- end page wrapper -->
4263 <?php
4264 if ($display != "fullscreen") {
4265 // trial fullscreen will lead to tablet versions and bootstrap menu overhaul
4266 // this function is in php/eye_mag_functions.php
4267 $output = menu_overhaul_bottom($pid, $encounter);
4268 echo $output;
4271 <script src="<?php echo $GLOBALS['webroot']; ?>/interface/forms/<?php echo $form_folder; ?>/js/jquery-panelslider/jquery.panelslider.min.js"></script>
4272 <script>
4273 function openNewForm(sel, label) {
4274 top.restoreSession();
4275 FormNameValueArray = sel.split('formname=');
4276 if(FormNameValueArray[1] == 'newpatient' )
4278 parent.frames[0].location.href = sel;
4280 else
4282 parent.twAddFrameTab('enctabs', label, sel);
4286 * Function to add a CODE to an IMPRESSION/PLAN item
4287 * This is for callback by the find-code popup in IMPPLAN area.
4288 * Appends to or erases the current list of diagnoses.
4290 function set_related(codetype, code, selector, codedesc) {
4291 //target is the index of IMPRESSION[index].code we are searching for.
4292 var span = document.getElementById('CODE_'+IMP_target);
4293 if ('textContent' in span) {
4294 span.textContent = code;
4295 } else {
4296 span.innerText = code;
4298 $('#CODE_'+IMP_target).attr('title',codetype + ':' + code + ' ('+codedesc+')');
4300 obj.IMPPLAN_items[IMP_target].code = code;
4301 obj.IMPPLAN_items[IMP_target].codetype = codetype;
4302 obj.IMPPLAN_items[IMP_target].codedesc = codedesc;
4303 obj.IMPPLAN_items[IMP_target].codetext = codetype + ':' + code + ' ('+codedesc+')';
4304 // This lists the text for the CODE at the top of the PLAN_
4305 // It is already there on mouseover the code itself and is printed in reports//faxes, so it was removed here
4306 // obj.IMPPLAN_items[IMP_target].plan = codedesc+"\r"+obj.IMPPLAN_items[IMP_target].plan;
4308 if (obj.IMPPLAN_items[IMP_target].PMSFH_link > '') {
4309 var data = obj.IMPPLAN_items[IMP_target].PMSFH_link.match(/(.*)_(.*)/);
4310 if ((data[1] == "POH")||(data[1] == "PMH")) {
4311 obj.PMSFH[data[1]][data[2]].code= code;
4312 obj.PMSFH[data[1]][data[2]].codetype = codetype;
4313 obj.PMSFH[data[1]][data[2]].codedesc = codedesc;
4314 obj.PMSFH[data[1]][data[2]].description = codedesc;
4315 obj.PMSFH[data[1]][data[2]].diagnosis = codetype + ':' + code;
4316 obj.PMSFH[data[1]][data[2]].codetext = codetype + ':' + code + ' ('+codedesc+')';
4317 build_DX_list(obj);
4318 update_PMSFH_code(obj.PMSFH[data[1]][data[2]].issue,codetype + ':' +code);
4321 store_IMPPLAN(obj.IMPPLAN_items,'1');
4323 <?php require_once("$srcdir/restoreSession.php");
4325 function dopclick(id) {
4326 <?php if (($thisauth ?? '') != 'write') : ?>
4327 dlgopen('../../patient_file/summary/a_issue.php?issue=0&thistype=' + encodeURIComponent(id), '_blank', 550, 400, '', <?php echo xlj('Issues'); ?> );
4328 <?php else : ?>
4329 alert("<?php echo xls('You are not authorized to add/edit issues'); ?>");
4330 <?php endif; ?>
4332 function doscript(type,id,encounter,rx_number) {
4333 dlgopen('../../forms/eye_mag/SpectacleRx.php?REFTYPE=' + encodeURIComponent(type) + '&id=' + encodeURIComponent(id) + '&encounter=' + encodeURIComponent(encounter) + '&form_id=' + <?php echo js_url($form_id); ?> + '&rx_number=' + encodeURIComponent(rx_number), '_blank', 660, 590,'', <?php echo xlj('Dispense Rx'); ?>);
4336 function dispensed(pid) {
4337 dlgopen('../../forms/eye_mag/SpectacleRx.php?dispensed=1&pid='+encodeURIComponent(pid), '_blank', 560, 590, '', <?php echo xlj('Rx History'); ?>);
4339 // This invokes the find-code popup.
4340 function sel_diagnosis(target,term) {
4341 if (target =='') {
4342 target = "0";
4344 IMP_target = target;
4345 <?php
4346 if (($irow['type'] ?? null) == 'PMH') { //or POH
4348 dlgopen('<?php echo $rootdir ?>/patient_file/encounter/find_code_popup.php?codetype=<?php echo attr(collect_codetypes("medical_problem", "csv")) ?>&search_term='+encodeURI(term), '_blank', 600, 400,'', <?php echo xlj('Code Search'); ?>);
4349 <?php
4350 } else {
4352 dlgopen('<?php echo $rootdir ?>/patient_file/encounter/find_code_popup.php?codetype=<?php echo attr(collect_codetypes("diagnosis", "csv")) ?>&search_term='+encodeURI(term), '_blank', 600, 400, '', <?php echo xlj('Code Search'); ?>);
4353 <?php
4358 var obj =[];
4359 <?php
4360 //also add in any obj.Clinical data if the form was already opened
4361 $codes_found = start_your_engines($encounter_data);
4362 if ($codes_found) { ?>
4363 obj.Clinical = [<?php echo json_encode($codes_found[0]); ?>];
4364 <?php
4365 } ?>
4367 var base = '<?php echo $GLOBALS['webroot']; ?>';
4368 </script>
4369 <script src="<?php echo $GLOBALS['webroot']; ?>/interface/forms/<?php echo $form_folder; ?>/js/shorthand_eye.js"></script>
4370 <script src="<?php echo $GLOBALS['webroot']; ?>/interface/forms/<?php echo $form_folder; ?>/js/shortcut.js-2-01-B/shortcut.js"></script>
4371 <script src="<?php echo $GLOBALS['webroot']; ?>/interface/forms/<?php echo $form_folder; ?>/js/eye_base.php?enc=<?php echo attr($encounter); ?>&providerID=<?php echo attr($provider_id); ?>"></script>
4372 <script src="<?php echo $GLOBALS['webroot']; ?>/interface/forms/<?php echo $form_folder; ?>/js/canvasdraw.js"></script>
4373 <div id="right-panel" name="right-panel" class="panel_side" >
4374 <div class="text-center" style="margin-top: 10px;">
4375 <span class="fa fa-file-alt" id="PANEL_TEXT" name="PANEL_TEXT"></span>
4376 <span class="fa fa-database" id="PANEL_QP" name="PANEL_QP"></span>
4377 <span class="fa fa-paint-brush" id="PANEL_DRAW" name="PANEL_DRAW"></span>
4378 <span class="fa fa-user-md fa-sm" name="Shorthand_kb"></span>
4379 <span class="fa fa-times" id="close-panel-bt"></span>
4380 </div>
4381 <div id="right_panel_refresh" data-role="panel" name="right_panel_refresh">
4382 <?php
4383 // We are building the panel bar with the patient medical info
4384 // Since the "lists" table has a "subtype" field now
4385 // each section could be customized, like SOCHx, subtype "smoking"
4386 // However openEMR stores most of this SocHx data in the layout_options table with
4387 // the form_id='HIS' and group_name='4Lifestyle' fields.
4388 // So we need to conform and pull this information out of the current "History" fields.
4389 // We do this in the eye_mag_functions.php file by creating a new array $PMSFH
4390 // pulling in the issues, Social History, FH and ROS into one place.
4391 // Eye Form uses $PMSFH to build two display options:
4392 // 1. PMH_QP (square panel)
4393 // - function display_PRIOR_section("PMSFH",$id,$id,$pid) in php/eye_mag_functions.php
4394 // - creates/populates the PMSFH values to the right of the PMH zone, in the PMH_2: QP zone.
4395 // 2. Right Panel
4396 // - function show_PMSFH_panel($PMSFH) in php/eye_mag_functions.php
4397 // - creates/populates the right panel NavBar
4398 echo $output_PMSFH_panel = show_PMSFH_panel($PMSFH);
4400 </div>
4401 </div>
4402 <script>
4403 $('#left-panel-link').panelslider({side: 'left', clickClose: false, duration: 600, easingOpen: 'easeInBack', easingClose: 'easeOutBack'});
4404 $('#right-panel-link').panelslider({side: 'right', clickClose: false, duration: 600, easingOpen: 'easeInBack', easingClose: 'easeOutBack'});
4405 $('#right-panel-link_2').panelslider({side: 'right', clickClose: false, duration: 600, easingOpen: 'easeInBack', easingClose: 'easeOutBack'});
4406 $('#close-panel-bt').click(function() {
4407 $.panelslider.close();
4409 <?php
4410 if (($PANEL_RIGHT ?? null) > '0') { ?>
4411 $("#right-panel-link").trigger("click");
4412 <?php
4415 </script>
4416 </body>
4417 </html>