/interface/forms/eye_mag/php/eye_mag_functions.php
PHP | 6325 lines | 5381 code | 387 blank | 557 comment | 699 complexity | 195694ffba08fbf97a66268381143798 MD5 | raw file
Possible License(s): Apache-2.0, AGPL-1.0, GPL-2.0, LGPL-3.0, BSD-3-Clause, Unlicense, MPL-2.0, GPL-3.0, LGPL-2.1
Large files files are truncated, but you can click here to view the full file
- <?php
- /**
- * forms/eye_mag/php/eye_mag_functions.php
- *
- * Functions which extend clinical forms
- *
- * @package OpenEMR
- * @link https://www.open-emr.org
- * @author Ray Magauran <rmagauran@gmail.com>
- * @copyright Copyright (c) 2016- Raymond Magauran <rmagauran@gmail.com>
- * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
- */
- $form_folder = "eye_mag";
- require_once(dirname(__FILE__) . "/../../../../custom/code_types.inc.php");
- require_once(dirname(__FILE__) . "/../../../../library/options.inc.php");
- global $PMSFH;
- use OpenEMR\Common\Acl\AclMain;
- use OpenEMR\Services\FacilityService;
- $facilityService = new FacilityService();
- /**
- * This function returns HTML old record selector widget when needed (4 input values)
- *
- * @param string $zone options ALL,EXT,ANTSEG,RETINA,NEURO, DRAW_PRIORS_$zone
- * @param string $visit_date Future functionality to limit result set. UTC DATE Formatted
- * @param string $pid value = patient id
- * @param string $type options text(default) image
- * @return string returns the HTML old record/image selector widget for the desired zone and type
- */
- function priors_select($zone, $orig_id, $id_to_show, $pid, $type = 'text')
- {
- global $priors;
- global $form_id;
- global $earlier;
- if ($type == "canvas") {
- $zone = $zone . "_canvas";
- }
- $tables = array('form_eye_hpi','form_eye_ros','form_eye_vitals',
- 'form_eye_acuity','form_eye_refraction','form_eye_biometrics',
- 'form_eye_external', 'form_eye_antseg','form_eye_postseg',
- 'form_eye_neuro','form_eye_locking');
- $output_return = "<span id='" . attr($zone) . "_prefix_oldies' name='" . attr($zone) . "_prefix_oldies' class='oldies_prefix'>";
- $selected = '';
- $current = '';
- if (!$priors) { //we have to build it
- $query = "select form_encounter.date as encounter_date,form_eye_base.id as form_id, form_eye_base.*
- from form_eye_base,forms,form_encounter
- where
- form_encounter.encounter = forms.encounter and
- form_eye_base.id=forms.form_id and
- forms.deleted != '1' and
- forms.pid =form_eye_base.pid and
- forms.formdir='eye_mag' and form_eye_base.pid=? ORDER BY encounter_date DESC LIMIT 20";
- // Unlike the obj data(PMSFH,Clinical,IMPPLAN etc), this data is static.
- // It only needs to be passed once to the client side.
- $result = sqlStatement($query, array($pid));
- $counter = sqlNumRows($result);
- $priors = array();
- if ($counter < 2) {
- return;
- }
- $i = "0";
- while ($prior = sqlFetchArray($result)) {
- $dated = new DateTime($prior['encounter_date']);
- $dated = $dated->format('Y-m-d');
- $oeexam_date = oeFormatShortDate($dated);
- foreach ($tables as $table) {
- $sql = "SELECT * from " . $table . " WHERE id=?";
- $sub_data = sqlStatement($sql, array($prior['id']));
- $data = sqlFetchArray($sub_data);
- if ($data) {
- $prior = array_merge($prior, $data);
- }
- }
- $priors[$i] = $prior;
- $priors[$i]['encounter_date'] = $oeexam_date;
- if (($i > 0) && ($prior['PLAN'])) {
- //this plan is a todo list for next visit, which is $i-1 actually
- $j = $i - 1;
- $priors[$j]['TODO'] = array();
- $priors[$j]['TODO'] = $prior['PLAN'];
- }
- $selected = '';
- $priors[$i]['visit_date'] = $oeexam_date;
- $priors[$i]['exam_date'] = $oeexam_date;
- if ($id_to_show == $prior['form_id']) {
- $selected = 'selected="selected"';
- $current = $i;
- }
- $output .= "<option value='" . attr($prior['id']) . "' " . attr($selected) . ">" . text($oeexam_date) . "</option>";
- $selected = '';
- $i++;
- }
- } else {
- //priors[] exists, containing the visits data AND the priors[earlier] field at the end, so iterate through all but the last one.
- //$visit_count = count($priors) - 1;
- for ($i = 0; $i < count($priors); $i++) {
- if ($form_id == $priors[$i]['id']) {
- $selected = 'selected=selected';
- $current = $i;
- } else {
- $selected = '';
- }
- $output .= "<option value='" . attr($priors[$i]['id']) . "' " . attr($selected) . ">" . text($priors[$i]['exam_date']) . "</option>";
- }
- }
- $i--;
- if ($current < $i) {
- $earlier = $current + 1;
- } else {
- $earlier = $current;
- }
- if ($current > '0') {
- $later = ($current - 1);
- } else {
- $later = "0";
- }
- //current visit =[0]
- if (!$priors[$current]['PLAN']) {
- $priors[$current]['PLAN'] = array();
- $query = "SELECT * from form_eye_mag_orders where form_id=?";
- $orders = sqlStatement($query, array($priors[$earlier]['id']));
- while ($row = sqlFetchArray($orders)) {
- $priors[$current]["PLAN"][] = $row;
- $priors[$later]["TODO"][] = $row;
- }
- }
- if ($id_to_show != $orig_id) {
- $output_return .= '
- <span title="' . xla($zone) . ': ' . xla("Copy these values into current visit.") . '
- ' . xla("Updated fields will be purple.") . '"
- id="COPY_' . attr($zone) . '"
- name="COPY_' . attr($zone) . '"
- value="' . attr($id_to_show) . '" onclick=\'$("#COPY_SECTION").val("' . attr($zone) . '-' . attr($id_to_show) . '").trigger("change");\'>
- <i class="fa fa-paste fa-lg"></i>
- </span>
- ';
- }
- $output_return .= '
- <span onclick=\'$("#PRIOR_' . attr($zone) . '").val("' . attr($priors[$i][id]) . '").trigger("change");\'
- id="PRIORS_' . attr($zone) . '_earliest"
- name="PRIORS_' . attr($zone) . '_earliest"
- class="fa fa-fast-backward fa-sm PRIORS"
- title="' . attr($zone) . ': ' . attr($priors[$i]['encounter_date']) . '">
- </span>
-
- <span onclick=\'$("#PRIOR_' . attr($zone) . '").val("' . attr($priors[$earlier][id]) . '").trigger("change");\'
- id="PRIORS_' . attr($zone) . '_minus_one"
- name="PRIORS_' . attr($zone) . '_minus_one"
- class="fa fa-step-backward fa-sm PRIORS"
- title="' . attr($zone) . ': ' . attr($priors[$earlier]['encounter_date']) . '">
- </span>
- <select name="PRIOR_' . attr($zone) . '"
- id="PRIOR_' . attr($zone) . '"
- style="padding:0 0;font-size:1.2em;"
- class="PRIORS">
- ' . $output . '
- </select>
-
- <span onclick=\'$("#PRIOR_' . attr($zone) . '").val("' . attr($priors[$later][id]) . '").trigger("change");\'
- id="PRIORS_' . attr($zone) . '_plus_one"
- name="PRIORS_' . attr($zone) . '_plus_one"
- class="fa fa-step-forward PRIORS"
- title="' . attr($zone) . ': ' . attr($priors[$later]['encounter_date']) . '">
- </span>
- <span onclick=\'$("#PRIOR_' . attr($zone) . '").val("' . attr($priors[0][id]) . '").trigger("change");\'
- id="PRIORS_' . attr($zone) . '_latest"
- name="PRIORS_' . attr($zone) . '_latest"
- class="fa fa-fast-forward PRIORS"
- title="' . attr($zone) . ': ' . attr($priors[0]['encounter_date']) . '">
- </span>
- </span>';
- return $output_return;
- }
- /**
- * This function returns ZONE specific HTML for a PRIOR record (3 input values)
- *
- * This is where the magic of displaying the old records happens.
- * Each section is a duplicate of the base html except the values are from a prior visit,
- * the background and background-color are different, and the input fields are disabled.
- *
- * @param string $zone options ALL,EXT,ANTSEG,RETINA,NEURO. DRAW_PRIORS_$zone and IMPPLAN to do.
- * @param string $visit_date. Future functionality to limit result set. UTC DATE Formatted
- * @param string $pid value = patient id
- * @return outputs the ZONE specific HTML for a prior record + "priors_select" widget for the desired zone
- */
- function display_PRIOR_section($zone, $orig_id, $id_to_show, $pid, $report = '0')
- {
- global $form_folder;
- $query = "SELECT * FROM form_eye_mag_prefs
- where PEZONE='PREFS' AND id=?
- ORDER BY ZONE_ORDER,ordering";
- $result = sqlStatement($query, array($_SESSION['authUserID']));
- while ($prefs = sqlFetchArray($result)) {
- ${$prefs['LOCATION']} = $prefs['GOVALUE'];
- }
- $query = "SELECT *
- from form_eye_base,
- form_eye_hpi,form_eye_ros,form_eye_vitals,
- form_eye_acuity,form_eye_refraction,form_eye_biometrics,
- form_eye_external, form_eye_antseg,form_eye_postseg,
- form_eye_neuro,form_eye_locking
- where
- form_eye_base.id=form_eye_hpi.id and
- form_eye_base.id=form_eye_ros.id and
- form_eye_base.id=form_eye_vitals.id and
- form_eye_base.id=form_eye_acuity.id and
- form_eye_base.id=form_eye_refraction.id and
- form_eye_base.id=form_eye_biometrics.id and
- form_eye_base.id=form_eye_external.id and
- form_eye_base.id=form_eye_antseg.id and
- form_eye_base.id=form_eye_postseg.id and
- form_eye_base.id=form_eye_neuro.id and
- form_eye_base.id=form_eye_locking.id and
- form_eye_base.pid =? and
- form_eye_base.id=?";
- $result = sqlQuery($query, array($pid,$id_to_show));
- @extract($result);
- ob_start();
- if ($zone == "REFRACTIONS") {
- //TODO maybe just sql _refraction+acuity
- display_refractive_data($result);
- } elseif ($zone == "EXT") {
- if ($report == '0') {
- $output = priors_select($zone, $orig_id, $id_to_show, $pid);
- }
- ?>
- <input disabled type="hidden" id="PRIORS_<?php echo attr($zone); ?>_prefix" name="PRIORS_<?php echo attr($zone); ?>_prefix" value="">
- <span class="closeButton float-right fas fa-times" id="Close_PRIORS_<?php echo attr($zone); ?>" name="Close_PRIORS_<?php echo attr($zone); ?>"></span>
- <div name="prior_selector">
- <?php
- echo $output;//prior visit selector - already sanitized
- ?>
- </div>
- <span style="font-weight:bold;">
- <?php
- if ($report == '0') {
- echo xlt('Prior Exam');
- } else {
- echo xlt($zone);
- } ?>: </span>
- <br />
- <div id="PRIORS_EXT_left_1">
- <table>
- <?php
- list($imaging,$episode) = display($pid, $encounter, "EXT");
- echo $episode;
- ?>
- </table>
- <table>
- <tr>
- <td></td><td><?php echo xlt('R'); ?></td><td><?php echo xlt('L{{left}}'); ?></td>
- </tr>
- <tr>
- <td class="right"><?php echo xlt('Lev Fn{{levator function}}'); ?></td>
- <td><input disabled type="text" size="1" name="PRIOR_RLF" id="PRIOR_RLF" value="<?php echo attr($RLF); ?>"></td>
- <td><input disabled type="text" size="1" name="PRIOR_LLF" id="PRIOR_LLF" value="<?php echo attr($LLF); ?>"></td>
- </tr>
- <tr>
- <td class="right"><?php echo xlt('MRD{{marginal reflex distance}}'); ?></td>
- <td><input disabled type="text" size="1" name="PRIOR_RMRD" id="PRIOR_RMRD" value="<?php echo attr($RMRD); ?>"></td>
- <td><input disabled type="text" size="1" name="PRIOR_LMRD" id="PRIOR_LMRD" value="<?php echo attr($LMRD); ?>"></td>
- </tr>
- <tr>
- <td class="right"><?php echo xlt('Vert Fissure{{vertical fissure height}}'); ?></td>
- <td><input disabled type="text" size="1" name="PRIOR_RVFISSURE" id="PRIOR_RVFISSURE" value="<?php echo attr($RVFISSURE); ?>"></td>
- <td><input disabled type="text" size="1" name="PRIOR_LVFISSURE" id="PRIOR_LVFISSURE" value="<?php echo attr($LVFISSURE); ?>"></td>
- </tr>
- <tr>
- <td class="right"><?php echo xlt('Carotid Bruit'); ?></td>
- <td><input disabled type="text" name="PRIOR_RCAROTID" id="PRIOR_RCAROTID" value="<?php echo attr($RCAROTID); ?>"></td>
- <td><input disabled type="text" name="PRIOR_LCAROTID" id="PRIOR_LCAROTID" value="<?php echo attr($LCAROTID); ?>"></td>
- </tr>
- <tr>
- <td class="right"><?php echo xlt('Temporal Art.{{Temporal Artery}}'); ?></td>
- <td><input disabled type="text" size="1" name="PRIOR_RTEMPART" id="PRIOR_RTEMPART" value="<?php echo attr($RTEMPART); ?>"></td>
- <td><input disabled type="text" size="1" name="PRIOR_LTEMPART" id="PRIOR_LTEMPART" value="<?php echo attr($LTEMPART); ?>"></td>
- </tr>
- <tr>
- <td class="right"><?php echo xlt('CN V{{cranial nerve five}}'); ?></td>
- <td><input disabled type="text" size="1" name="PRIOR_RCNV" id="PRIOR_RCNV" value="<?php echo attr($RCNV); ?>"></td>
- <td><input disabled type="text" size="1" name="PRIOR_LCNV" id="PRIOR_LCNV" value="<?php echo attr($LCNV); ?>"></td>
- </tr>
- <tr>
- <td class="right"><?php echo xlt('CN VII{{cranial nerve seven}}'); ?></td>
- <td><input disabled type="text" size="1" name="PRIOR_RCNVII" id="PRIOR_RCNVII" value="<?php echo attr($RCNVII); ?>"></td>
- <td><input disabled type="text" size="1" name="PRIOR_LCNVII" id="PRIOR_LCNVII" value="<?php echo attr($LCNVII); ?>"></td>
- </tr>
- <tr><td colspan=3 class="underline"><?php echo xlt('Hertel Exophthalmometry'); ?></td></tr>
- <tr class="center">
- <td>
- <input disabled type=text size=1 id="PRIOR_ODHERTEL" name="PRIOR_ODHERTEL" value="<?php echo attr($ODHERTEL); ?>">
- <i class="fa fa-minus"></i>
- </td>
- <td>
- <input disabled type=text size=3 id="PRIOR_HERTELBASE" name="PRIOR_HERTELBASE" value="<?php echo attr($HERTELBASE); ?>">
- <i class="fa fa-minus"></i>
- </td>
- <td>
- <input disabled type=text size=1 id="PRIOR_OSHERTEL" name="PRIOR_OSHERTEL" value="<?php echo attr($OSHERTEL); ?>">
- </td>
- </tr>
- <tr><td> </td></tr>
- </table>
- </div>
- <?php ($EXT_VIEW == 1) ? ($display_EXT_view = "wide_textarea") : ($display_EXT_view = "narrow_textarea");?>
- <?php ($display_EXT_view == "wide_textarea") ? ($marker = "fa-minus-square-o") : ($marker = "fa-plus-square-o");?>
- <div id="PRIOR_EXT_text_list" name="PRIOR_EXT_text_list" class="borderShadow PRIORS <?php echo attr($display_EXT_view); ?>" >
- <span class="top_right fa <?php echo attr($marker); ?>" name="PRIOR_EXT_text_view" id="PRIOR_EXT_text_view"></span>
- <table cellspacing="0" cellpadding="0" >
- <tr>
- <th><?php echo xlt('Right'); ?></th><td style="width:100px;"></td><th><?php echo xlt('Left'); ?> </th>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_RBROW" id="PRIOR_RBROW" class="right EXT"><?php echo text($RBROW); ?></textarea></td>
- <td class="ident"><?php echo xlt('Brow'); ?></td>
- <td><textarea disabled name="PRIOR_LBROW" id="PRIOR_LBROW" class=""><?php echo text($LBROW); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_RUL" id="PRIOR_RUL" class="right"><?php echo text($RUL); ?></textarea></td>
- <td class="ident"><?php echo xlt('Upper Lids'); ?></td>
- <td><textarea disabled name="PRIOR_LUL" id="PRIOR_LUL" class=""><?php echo text($LUL); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_RLL" id="PRIOR_RLL" class="right"><?php echo text($RLL); ?></textarea></td>
- <td class="ident"><?php echo xlt('Lower Lids'); ?></td>
- <td><textarea disabled name="PRIOR_LLL" id="PRIOR_LLL" class=""><?php echo text($LLL); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_RMCT" id="PRIOR_RMCT" class="right"><?php echo text($RMCT); ?></textarea></td>
- <td class="ident"><?php echo xlt('Medial Canthi'); ?></td>
- <td><textarea disabled name="PRIOR_LMCT" id="PRIOR_LMCT" class=""><?php echo text($LMCT); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_RADNEXA" id="PRIOR_RADNEXA" class="right"><?php echo text($RADNEXA); ?></textarea></td>
- <td class="ident"><?php echo xlt('Adnexa'); ?></td>
- <td><textarea disabled name="PRIOR_LADNEXA" id="PRIOR_LADNEXA" class=""><?php echo text($LADNEXA); ?></textarea></td>
- </tr>
- </table>
- </div>
- <br />
- <div class="QP_lengthen">
- <span style="font-weight:bold;"><?php echo xlt('Comments'); ?>:</span>
- <br />
- <textarea disabled id="PRIOR_EXT_COMMENTS" name="PRIOR_EXT_COMMENTS"><?php echo text($EXT_COMMENTS); ?></textarea>
- </div>
- <?php
- } elseif ($zone == "ANTSEG") {
- if ($report == '0') {
- $output = priors_select($zone, $orig_id, $id_to_show, $pid);
- }
- ?>
- <input disabled type="hidden" id="PRIORS_<?php echo attr($zone); ?>_prefix" name="PRIORS_<?php echo attr($zone); ?>_prefix" value="">
- <span class="closeButton float-right fas fa-times" id="Close_PRIORS_<?php echo attr($zone); ?>" name="Close_PRIORS_<?php echo attr($zone); ?>"></span>
- <div name="prior_selector">
- <?php
- echo $output;
- ?>
- </div>
- <span style="font-weight:bold;"> <?php echo xlt('Prior Exam'); ?>:</span>
- <br />
- <div class="text_clinical" id="PRIORS_ANTSEG_left_1">
- <table>
- <?php
- list($imaging,$episode) = display($pid, $encounter, "ANTSEG");
- echo $episode;
- ?>
- </table>
- <table>
- <tr >
- <td></td><td><?php echo xlt('R{{right}}'); ?></td><td><?php echo xlt('L{{left}}'); ?></td>
- </tr>
- <tr>
- <td class="right" ><?php echo xlt('Gonio{{Gonioscopy abbreviation}}'); ?></td>
- <td><input disabled type="text" name="PRIOR_ODGONIO" id="PRIOR_ODGONIO" value="<?php echo attr($ODGONIO); ?>"></td>
- <td><input disabled type="text" name="PRIOR_OSGONIO" id="PRIOR_OSGONIO" value="<?php echo attr($OSGONIO); ?>"></td>
- </tr>
- <tr>
- <td class="right" ><?php echo xlt('Pachymetry'); ?></td>
- <td><input disabled type="text" name="PRIOR_ODKTHICKNESS" id="PRIOR_ODKTHICKNESS" value="<?php echo attr($ODKTHICKNESS); ?>"></td>
- <td><input disabled type="text" name="PRIOR_OSKTHICKNESS" id="PRIOR_OSKTHICKNESS" value="<?php echo attr($OSKTHICKNESS); ?>"></td>
- </tr>
- <tr>
- <td class="right" title="<?php echo xla('Schirmers I (w/o anesthesia)'); ?>"><?php echo xlt('Schirmer I'); ?></td>
- <td><input disabled type="text" name="PRIOR_ODSCHIRMER1" id="PRIOR_ODSCHIRMER1" value="<?php echo attr($ODSCHIRMER1); ?>"></td>
- <td><input disabled type="text" name="PRIOR_OSSCHRIMER2" id="PRIOR_OSSCHIRMER1" value="<?php echo attr($OSSCHIRMER1); ?>"></td>
- </tr>
- <tr>
- <td class="right" title="<?php echo xla('Schirmers II (w/ anesthesia)'); ?>"><?php echo xlt('Schirmer II'); ?></td>
- <td><input disabled type="text" name="PRIOR_ODSCHIRMER2" id="PRIOR_ODSCHIRMER2" value="<?php echo attr($ODSCHIRMER2); ?>"></td>
- <td><input disabled type="text" name="PRIOR_OSSCHRIMER2" id="PRIOR_OSSCHIRMER2" value="<?php echo attr($OSSCHIRMER2); ?>"></td>
- </tr>
- <tr>
- <td class="right" title="<?php echo xla('Tear Break Up Time'); ?>"><?php echo xlt('TBUT{{tear breakup time}}'); ?></td>
- <td><input disabled type="text" name="PRIOR_ODTBUT" id="PRIOR_ODTBUT" value="<?php echo attr($ODTBUT); ?>"></td>
- <td><input disabled type="text" name="PRIOR_OSTBUT" id="PRIOR_OSTBUT" value="<?php echo attr($OSTBUT); ?>"></td>
- </tr>
- <tr>
- <td colspan="3" rowspan="4" id="PRIORS_dil_box" nowrap="">
- <br />
- <?php
- // This is going to be based off a list in the near future
- // to allow for end-user customization
- ?>
- <span id="PRIORS_dil_listbox_title"><?php echo xlt('Dilation'); ?>:</span>
- <span id="PRIORS_dil_meds" class="float-right"><?php
- if ($DIL_MEDS) {
- echo text($DIL_MEDS);
- }
- ?></span>
- <br />
- <table id="PRIORS_dil_listbox">
- <tr>
- <td>
- <input disabled type="checkbox" class="dil_drug" id="PRIORS_CycloMydril" name="PRIORS_CYCLOMYDRIL" value="Cyclomydril" <?php
- if ($CYCLOMYDRIL == 'Cyclomydril') {
- echo "checked='checked'";
- } ?> />
- <label for="CycloMydril" class="input-helper input-helper--checkbox"><?php echo text('CycloMydril'); ?></label>
- </td>
- <td>
- <input disabled type="checkbox" class="dil_drug" id="PRIORS_Tropicamide" name="PRIORS_TROPICAMIDE" value="Tropicamide 2.5%" <?php
- if ($TROPICAMIDE == 'Tropicamide 2.5%') {
- echo "checked='checked'";
- } ?> />
- <label for="Tropicamide" class="input-helper input-helper--checkbox"><?php echo text('Tropic 2.5%'); ?></label>
- </td>
- </tr>
- <tr>
- <td>
- <input disabled type="checkbox" class="dil_drug" id="PRIORS_Neo25" name="PRIORS_NEO25" value="Neosynephrine 2.5%" <?php
- if ($NEO25 == 'Neosynephrine 2.5%') {
- echo "checked='checked'";
- } ?> />
- <label for="Neo25" class="input-helper input-helper--checkbox"><?php echo text('Neo 2.5%'); ?></label>
- </td>
- <td>
- <input disabled type="checkbox" class="dil_drug" id="PRIORS_Neo10" name="PRIORS_NEO10" value="Neosynephrine 10%" <?php
- if ($NEO10 == 'Neosynephrine 10%') {
- echo "checked='checked'";
- } ?> />
- <label for="Neo10" class="input-helper input-helper--checkbox"><?php echo text('Neo 10%'); ?></label>
- </td>
- </tr>
- <tr>
- <td>
- <input disabled type="checkbox" class="dil_drug" id="PRIORS_Cyclogyl" style="left:150px;" name="PRIORS_CYCLOGYL" value="Cyclopentolate 1%" <?php
- if ($CYCLOGYL == 'Cyclopentolate 1%') {
- echo "checked='checked'";
- } ?> />
- <label for="Cyclogyl" class="input-helper input-helper--checkbox"><?php echo text('Cyclo 1%'); ?></label>
- </td>
- <td>
- <input disabled type="checkbox" class="dil_drug" id="PRIORS_Atropine" name="PRIORS_ATROPINE" value="Atropine 1%" <?php
- if ($ATROPINE == 'Atropine 1%') {
- echo "checked='checked'";
- } ?> />
- <label for="Atropine" class="input-helper input-helper--checkbox"><?php echo text('Atropine 1%'); ?></label>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- <?php ($ANTSEG_VIEW == '1') ? ($display_ANTSEG_view = "wide_textarea") : ($display_ANTSEG_view = "narrow_textarea");?>
- <?php ($display_ANTSEG_view == "wide_textarea") ? ($marker = "fa-minus-square-o") : ($marker = "fa-plus-square-o");?>
- <div id="PRIOR_ANTSEG_text_list" name="PRIOR_ANTSEG_text_list" class="borderShadow PRIORS <?php echo attr($display_ANTSEG_view); ?>" >
- <span class="top_right fa <?php echo attr($marker); ?>" name="PRIOR_ANTSEG_text_view" id="PRIOR_ANTSEG_text_view"></span>
- <table>
- <tr>
- <th><?php echo xlt('OD{{right eye}}'); ?></th><th></th><th><?php echo xlt('OS{{left eye}}'); ?></th></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_ODCONJ" id="PRIOR_ODCONJ" class="right"><?php echo text($ODCONJ); ?></textarea></td>
- <td class="ident"><?php echo xlt('Conj{{Conjunctiva}}'); ?> / <?php echo xlt('Sclera'); ?></td>
- <td><textarea disabled name="PRIOR_OSCONJ" id="PRIOR_OSCONJ" class=""><?php echo text($OSCONJ); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_ODCORNEA" id="PRIOR_ODCORNEA" class="right"><?php echo text($ODCORNEA); ?></textarea></td>
- <td class="ident"><?php echo xlt('Cornea'); ?></td>
- <td><textarea disabled name="PRIOR_OSCORNEA" id="PRIOR_OSCORNEA" class=""><?php echo text($OSCORNEA); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_ODAC" id="PRIOR_ODAC" class="right"><?php echo text($ODAC); ?></textarea></td>
- <td class="ident"><?php echo xlt('A/C{{anterior chamber}}'); ?></td>
- <td><textarea disabled name="PRIOR_OSAC" id="PRIOR_OSAC" class=""><?php echo text($OSAC); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_ODLENS" id="PRIOR_ODLENS" class=" right"><?php echo text($ODLENS); ?></textarea></td>
- <td class="ident" ><?php echo xlt('Lens'); ?></td>
- <td><textarea disabled name="PRIOR_OSLENS" id="PRIOR_OSLENS" class=""><?php echo text($OSLENS); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_ODIRIS" id="PRIOR_ODIRIS" class="right"><?php echo text($ODIRIS); ?></textarea></td>
- <td class="ident"><?php echo xlt('Iris'); ?></td>
- <td><textarea disabled name="PRIOR_OSIRIS" id="PRIOR_OSIRIS" class=""><?php echo text($OSIRIS); ?></textarea></td>
- </tr>
- </table>
- </div>
- <br />
- <div class="QP_lengthen">
- <span style="font-weight:bold;"><?php echo xlt('Comments'); ?>:</span>
- <br />
- <textarea disabled id="PRIOR_ANTSEG_COMMENTS" name="PRIOR_ANTSEG_COMMENTS"><?php echo text($ANTSEG_COMMENTS); ?></textarea>
- </div>
- <?php
- } elseif ($zone == "RETINA") {
- if ($report == '0') {
- $output = priors_select($zone, $orig_id, $id_to_show, $pid);
- }
- ?>
- <input disabled type="hidden" id="PRIORS_<?php echo attr($zone); ?>_prefix" name="PRIORS_<?php echo attr($zone); ?>_prefix" value="">
- <span class="closeButton float-right fas fa-times" id="Close_PRIORS_<?php echo attr($zone); ?>" name="Close_PRIORS_<?php echo attr($zone); ?>"></span>
- <div name="prior_selector">
- <?php
- echo $output;
- ?>
- </div>
- <span style="font-weight:bold;"><?php echo xlt('Prior Exam'); ?>:</span>
- <br />
- <div id="PRIORS_RETINA_left_1" class="text_clinical">
- <table>
- <?php
- list($imaging,$episode) = display($pid, $encounter, "POSTSEG");
- echo $episode;
- ?>
- </table>
- <br />
- <table>
- <tr class="bold">
- <td></td>
- <td><?php echo xlt('OD{{right eye}}'); ?> </td><td><?php echo xlt('OS{{left eye}}'); ?> </td>
- </tr>
- <tr>
- <td class="bold right"><?php echo xlt('C/D Ratio{{cup to disc ration}}'); ?>:</td>
- <td>
- <input type="text" disabled name="PRIOR_ODCUP" size="4" id="PRIOR_ODCUP" value="<?php echo attr($ODCUP); ?>">
- </td>
- <td>
- <input type="text" disabled name="PRIOR_OSCUP" size="4" id="PRIOR_OSCUP" value="<?php echo attr($OSCUP); ?>">
- </td>
- </tr>
- <tr>
- <td class="bold right">
- <?php echo xlt('CMT{{Central Macular Thickness}}'); ?>:</td>
- <td>
- <input type="text" disabled name="PRIOR_ODCMT" size="4" id="PRIOR_ODCMT" value="<?php echo attr($ODCMT); ?>">
- </td>
- <td>
- <input type="text" disabled name="PRIOR_OSCMT" size="4" id="PRIOR_OSCMT" value="<?php echo attr($OSCMT); ?>">
- </td>
- </tr>
- </table>
- <br />
- <table>
- <?php
- list($imaging,$episode) = display($pid, $encounter, "NEURO");
- echo $episode;
- ?>
- </table>
- </div>
- <?php ($RETINA_VIEW == 1) ? ($display_RETINA_view = "wide_textarea") : ($display_RETINA_view = "narrow_textarea");?>
- <?php ($display_RETINA_view == "wide_textarea") ? ($marker = "fa-minus-square-o") : ($marker = "fa-plus-square-o");?>
- <div>
- <div id="PRIOR_RETINA_text_list" name="PRIOR_RETINA_text_list" class="borderShadow PRIORS <?php echo attr($display_RETINA_view); ?>">
- <span class="top_right fa <?php echo attr($marker); ?>" name="PRIOR_RETINA_text_view" id="PRIOR_RETINA_text_view"></span>
- <table cellspacing="0" cellpadding="0">
- <tr>
- <th><?php echo xlt('OD{{right eye}}'); ?></th><td style="width:100px;"></td><th><?php echo xlt('OS{{left eye}}'); ?></th></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_ODDISC" id="PRIOR_ODDISC" class="right"><?php echo text($ODDISC); ?></textarea></td>
- <td style="text-align:center;font-size:0.9em;"><?php echo xlt('Disc'); ?></td>
- <td><textarea disabled name="PRIOR_OSDISC" id="PRIOR_OSDISC"><?php echo text($OSDISC); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="ODMACULA" id="ODMACULA" class="right"><?php echo text($ODMACULA); ?></textarea></td>
- <td style="text-align:center;font-size:0.9em;"><?php echo xlt('Macula'); ?></td>
- <td><textarea disabled name="PRIOR_OSMACULA" id="PRIOR_OSMACULA"><?php echo text($OSMACULA); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_ODVESSELS" id="PRIOR_ODVESSELS" class="right"><?php echo text($ODVESSELS); ?></textarea></td>
- <td style="text-align:center;font-size:0.9em;"><?php echo xlt('Vessels'); ?></td>
- <td><textarea disabled name="PRIOR_OSVESSELS" id="PRIOR_OSVESSELS"><?php echo text($OSVESSELS); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea name="PRIOR_ODVITREOUS" id="PRIOR_ODVITREOUS" class="right"><?php echo text($ODVITREOUS); ?></textarea></td>
- <td style="text-align:center;font-size:0.9em;" ><?php echo xlt('Vitreous'); ?></td>
- <td><textarea name="PRIOR_OSVITREOUS" id="PRIOR_OSVITREOUS"><?php echo text($OSVITREOUS); ?></textarea></td>
- </tr>
- <tr>
- <td><textarea disabled name="PRIOR_ODPERIPH" id="PRIOR_ODPERIPH" class="right"><?php echo text($ODPERIPH); ?></textarea></td>
- <td style="text-align:center;font-size:0.9em;" class=""><?php echo xlt('Periph'); ?></td>
- <td><textarea disabled name="PRIOR_OSPERIPH" id="PRIOR_OSPERIPH"><?php echo text($OSPERIPH); ?></textarea></td>
- </tr>
- </table>
- </div>
- </div>
- <br />
- <br />
- <div class="QP_lengthen">
- <SPAN style="font-weight:bold;"><?php echo xlt('Comments'); ?>:</SPAN>
- <br />
- <textarea disabled id="PRIOR_RETINA_COMMENTS" name="PRIOR_RETINA_COMMENTS" style="width:4.0in;height:3.0em;"><?php echo text($RETINA_COMMENTS); ?></textarea>
- </div>
- <?php
- } elseif ($zone == "NEURO") {
- if ($report == '0') {
- $output = priors_select($zone, $orig_id, $id_to_show, $pid);
- }
- ?>
- <input disabled type="hidden" id="PRIORS_<?php echo attr($zone); ?>_prefix" name="PRIORS_<?php echo attr($zone); ?>_prefix" value="">
- <span class="closeButton float-right fas fa-times" id="Close_PRIORS_<?php echo attr($zone); ?>" name="Close_PRIORS_<?php echo attr($zone); ?>"></span>
- <div name="prior_selector">
- <?php
- echo $output;
- ?>
- </div>
- <span style="font-weight:bold;"><?php echo xlt('Prior Exam'); ?>:</span>
- <br />
- <div style="float:left;margin-top:0.8em;font-size:0.8em;">
- <div id="PRIOR_NEURO_text_list" class="borderShadow PRIORS" style="border:1pt solid black;float:left;width:195px;padding:10px;text-align:center;margin:2 2;font-weight:bold;">
- <table style="font-size:1.0em;font-weight:600;">
- <tr>
- <td></td><td style="text-align:center;"><?php echo xlt('OD{{right eye}}'); ?></td><td style="text-align:center;"><?php echo xlt('OS{{left eye}}'); ?></td></tr>
- <tr>
- <td class="right">
- <?php echo xlt('Color'); ?>:
- </td>
- <td>
- <input disabled type="text" id="PRIOR_ODCOLOR" name="PRIOR_ODCOLOR" value="<?php
- if ($ODCOLOR) {
- echo attr($ODCOLOR);
- } else {
- echo " / ";
- } ?>"/>
- </td>
- <td>
- <input disabled type="text" id="PRIOR_OSCOLOR" name="PRIOR_OSCOLOR" value="<?php
- if ($OSCOLOR) {
- echo attr($OSCOLOR);
- } else {
- echo " / ";
- } ?>"/>
- </td>
- <td style="text-align:bottom;">
- <span title="<?php echo xla('Insert normals - 11/11'); ?>" class="fa fa-reply"></span>
- </td>
- </tr>
- <tr>
- <td class="right" style="white-space: nowrap;font-size:0.9em;">
- <span title="<?php echo xla('Variation in red color discrimination between the eyes (eg. OD=100, OS=75)'); ?>"><?php echo xlt('Red Desat{{red desaturation}}'); ?>:</span>
- </td>
- <td>
- <input disabled type="text" size="6" name="PRIOR_ODREDDESAT" id="PRIOR_ODREDDESAT" value="<?php echo attr($ODREDDESAT); ?>"/>
- </td>
- <td>
- <input disabled type="text" size="6" name="PRIOR_OSREDDESAT" id="PRIOR_OSREDDESAT" value="<?php echo attr($OSREDDESAT); ?>"/>
- </td>
- <td>
- <span id="" class="fa fa-reply" name="" title="<?php echo xla('Insert normals - 100/100'); ?>"></span>
- </td>
- </tr>
- <tr>
- <td class="right" style="white-space: nowrap;font-size:0.9em;">
- <span title="<?php echo xla('Variation in white (muscle) light brightness discrimination between the eyes (eg. OD=$1.00, OS=$0.75)'); ?>"><?php echo xlt('Coins'); ?>:</span>
- </td>
- <td>
- <input disabled type="text" size="6" name="PRIOR_ODCOINS" id="PRIOR_ODCOINS" value="<?php echo attr($ODCOINS); ?>"/>
- </td>
- <td>
- <input disabled type="text" size="6" name="PRIOR_OSCOINS" id="PRIOR_OSCOINS" value="<?php echo attr($OSCOINS); ?>"/>
- </td>
- <td>
- <span id="" class="fa fa-reply" name="" title="<?php echo xla('Insert normals - 100/100'); ?>"></span>
- </td>
- </tr>
- </table>
- </div>
- <div class="borderShadow" style="position: relative;
- float: right;
- text-align: center;
- width: 260px;
- z-index: 1;
- margin: 2px 0 2px 2px;">
- <span class="closeButton fa fa-th" id="PRIOR_Close_ACTMAIN" name="PRIOR_Close_ACTMAIN"></span>
- <table class="ACT_top bold">
- <tr style="text-align:left;height:26px;vertical-align:middle;width:180px;">
- <td >
- <span id="PRIOR_ACTTRIGGER" name="PRIOR_ACTTRIGGER" style="text-decoration:underline;"><?php echo ('Alternate Cover Test'); ?>:</span>
- </td>
- <td>
- <span id="PRIOR_ACTNORMAL_CHECK" name="PRIOR_ACTNORMAL_CHECK">
- <label for="PRIOR_ACT" class="input-helper input-helper--checkbox"><?php echo xlt('Ortho'); ?></label>
- <input disabled type="checkbox" name="PRIOR_ACT" id="PRIOR_ACT" checked="<?php
- if ($ACT == '1') {
- echo "checked";
- } ?>"></span>
- </td>
- </tr>
- <tr>
- <td colspan="2" style="text-align:center;">
- <br />
- <div id="PRIOR_ACTMAIN" name="PRIOR_ACTMAIN" class="ACT_TEXT nodisplay" style="position:relative;z-index:1;margin 10 auto;">
- <table cellpadding="0" style="position:relative;margin: 7 5 19 5;">
- <tr>
- <td id="PRIOR_ACT_tab_SCDIST" name="PRIOR_ACT_tab_SCDIST" class="ACT_selected"> <?php echo xlt('scDist{{ACT without Correction Distance}}'); ?> </td>
- <td id="PRIOR_ACT_tab_CCDIST" name="PRIOR_ACT_tab_CCDIST" class="ACT_deselected"> <?php echo xlt('ccDist{{ACT with Correction Distance}}'); ?> </td>
- <td id="PRIOR_ACT_tab_SCNEAR" name="PRIOR_ACT_tab_SCNEAR" class="ACT_deselected"> <?php echo xlt('scNear{{ACT without Correction Near}}'); ?> </td>
- <td id="PRIOR_ACT_tab_CCNEAR" name="PRIOR_ACT_tab_CCNEAR" class="ACT_deselected"> <?php echo xlt('ccNear{{ACT with Correction Near}}'); ?> </td>
- </tr>
- <tr>
- <td colspan="4" style="text-align:center;font-size:0.8em;">
- <div id="PRIOR_ACT_SCDIST" name="PRIOR_ACT_SCDIST" class="ACT_box">
- <br />
- <table>
- <tr>
- <td class="text-center"><?php echo xlt('R{{right}}'); ?></td>
- <td style="border-right:1pt solid black;border-bottom:1pt solid black;text-align:right;">
- <textarea disabled id="PRIOR_ACT1SCDIST" name="PRIOR_ACT1SCDIST" class="ACT"><?php echo text($ACT1SCDIST); ?></textarea></td>
- <td style="border:1pt solid black;border-top:0pt;text-align:center;">
- <textarea disabled id="PRIOR_ACT2SCDIST" name="PRIOR_ACT2SCDIST"class="ACT"><?php echo text($ACT2SCDIST); ?></textarea></td>
- <td style="border-left:1pt solid black;border-bottom:1pt solid black;text-align:left;">
- <textarea disabled id="PRIOR_ACT3SCDIST" name="PRIOR_ACT3SCDIST" class="ACT"><?php echo text($ACT3SCDIST); ?></textarea></td>
- <td class="text-center"><?php echo xlt('L{{left}}'); ?></td>
- </tr>
- <tr>
- <td class="text-center"><i class="fa fa-reply rotate-left"></i></td>
- <td style="border:1pt solid black;border-left:0pt;text-align:right;">
- <textarea disabled id="PRIOR_ACT4SCDIST" name="PRIOR_ACT4SCDIST" class="ACT"><?php echo text($ACT4SCDIST); ?></textarea></td>
- <td style="border:1pt solid black;text-align:center;">
- <textarea disabled id="PRIOR_ACT5SCDIST" name="PRIOR_ACT5SCDIST" class="ACT"><?php echo text($ACT5SCDIST); ?></textarea></td>
- <td style="border:1pt solid black;border-right:0pt;text-align:left;">
- <textarea disabled id="PRIOR_ACT6SCDIST" name="PRIOR_ACT6SCDIST" class="ACT"><?php echo text($ACT6SCDIST); ?></textarea></td>
- <td class="text-center"><i class="fa fa-reply flip-left"></i></td>
- </tr>
- <tr>
- <td style="border:0; border-top:2pt solid black;border-right:2pt solid black;text-align:right;">
- <textarea disabled id="PRIOR_ACT10SCDIST" name="PRIOR_ACT10SCDIST" class="ACT"><?php echo text($ACT10SCDIST); ?></textarea></td>
- <td style="border-right:1pt solid black;border-top:1pt solid black;text-align:right;">
- <textarea disabled id="PRIOR_ACT7SCDIST" name="PRIOR_ACT7SCDIST" class="ACT"><?php echo text($ACT7SCDIST); ?></textarea></td>
- <td style="border:1pt solid black;border-bottom:0pt;text-align:center;">
- <textarea disabled id="PRIOR_ACT8SCDIST" name="PRIOR_ACT8SCDIST" class="ACT"><?php echo text($ACT8SCDIST); ?></textarea></td>
- <td style="border-left:1pt solid black;border-top:1pt solid black;text-align:left;">
- <textarea disabled id="PRIOR_ACT9SCDIST" name="PRIOR_ACT9SCDIST" class="ACT"><?php echo text($ACT9SCDIST); ?></textarea></td>
- <td style="border:0; border-top:2pt solid black;border-left:2pt solid black;text-align:left;vertical-align:middle;">
- <textarea disabled id="PRIOR_ACT11SCDIST" name="PRIOR_ACT11SCDIST" class="ACT"><?php echo text($ACT11SCDIST); ?></textarea>
- </td>
- </tr>
- </table>
- <br />
- </div>
- <div id="PRIOR_ACT_CCDIST" name="PRIOR_ACT_CCDIST" class="nodisplay ACT_box">
- <br />
- <table>
- <tr>
- <td class="text-center"><?php echo xlt('R{{right}}'); ?></td>
- <td style="border-right:1pt solid black;border-bottom:1pt solid black;text-align:right;">
- <textarea disabled id="PRIOR_ACT1CCDIST" name="PRIOR_ACT1CCDIST" class="ACT"><?php echo text($ACT1CCDIST); ?></textarea></td>
- <td style="border:1pt solid black;border-top:0pt;text-align:center;">
- <textarea disabled id="PRIOR_ACT2CCDIST" name="PRIOR_ACT2CCDIST"class="ACT"><?php echo text($ACT2CCDIST); ?></textarea></td>
- <td style="border-left:1pt solid black;border-bottom:1pt solid black;text-align:left;">
- <textarea disabled id="PRIOR_ACT3CCDIST" name="PRIOR_ACT3CCDIST" class="ACT"><?php echo text($ACT3CCDIST); ?></textarea></td>
- <td class="text-center"><?php echo xlt('L{{left}}'); ?></td>
- </tr>
- <tr>
- <td class="text-center"><i class="fa fa-reply rotate-left"></i></td>
- <td style="border:1pt solid black;border-left:0pt;text-align:right;">
- <textarea disabled id="PRIOR_ACT4CCDIST" name="PRIOR_ACT4CCDIST" class="ACT"><?php echo text($ACT4CCDIST); ?></textarea></td>
- <td style="border:1pt solid black;text-align:center;">
- <textarea disabled id="PRIOR_ACT5CCDIST" name="PRIOR_ACT5CCDIST" class="ACT"><?php echo text($ACT5CCDIST); ?></textarea></td>
- …
Large files files are truncated, but you can click here to view the full file