echo $IMPPLAN_count; ?> "> </div> </div> <?php /* There are at least 4 ways to build IMP/PLAN * 1. Freehand - textarea * 2. Copy Forward (prior_select) * 3. Build automatically through workflows. (build_PMSFH) * 4. Draw it in (display_draw_section) */ ?> <div id="IMPPLAN_right" class="exam_section_right borderShadow text_clinical"> <?php display_draw_section("IMPPLAN", $encounter, $pid); ?> <div id="PRIORS_IMPPLAN_left_text" name="PRIORS_IMPPLAN_left_text" class="PRIORS_class PRIORS"><i class="fa fa-spinner fa-spin"></i> </div> <div id="QP_IMPPLAN" name="QP_IMPPLAN" class="QP_class2"> <span id="iPLAN_BUILD" name="iPLAN_BUILD" class="bold"><?php echo xlt('Impression/Plan'); ?> </span> <div id="IP_P_1"> <?php echo $selector = priors_select("IMPPLAN", $id, $id, $pid); ?> </div> <span class="closeButton fa fa-close pull-right z100" id="BUTTON_TEXTD_IMPPLAN" name="BUTTON_TEXTD_IMPPLAN" value="1"></span>
function eye_mag_report($pid, $encounter, $cols, $id, $formname = 'eye_mag') { global $form_folder; global $form_name; global $choice; /** openEMR note: eye_mag Index is id, * linked to encounter in form_encounter * whose encounter is linked to id in forms. */ $query = "select form_encounter.date as encounter_date,form_eye_mag.*\n from form_eye_mag ,forms,form_encounter\n where\n form_encounter.encounter =? and\n form_encounter.encounter = forms.encounter and\n form_eye_mag.id=forms.form_id and\n forms.pid =form_eye_mag.pid and\n form_eye_mag.pid=? "; $objQuery = sqlQuery($query, array($encounter, $pid)); @extract($objQuery); $dated = new DateTime($encounter_date); $dated = $dated->format('Y/m/d'); global $visit_date; $visit_date = oeFormatShortDate($dated); /* * Patient/Client -> Visits -> Visit History, on mouse over this is called with variable "choice". * To use this feature, this "choice" variable must be added programmatically to * /interface/patient_file/history/encounters_ajax.php, currently line 20. * The variable $choice will tell us what to display. * If it is not present it will display everything == 'narrative'. * @param string $choice options NULL,TEXT,DRAW,NARRATIVE * @param string $encounter = encounter number * @param string $pid value = patient id * @return string => returns the HTML of the report selected */ if ($choice == 'DRAW') { /* $side="OU"; $zone = array("HPI","PMH","VISION","NEURO","EXT","ANTSEG","RETINA","IMPPLAN"); // for ($i = 0; $i < count($zone); ++$i) { // show only 2 for now in the encounter page ($choice =='drawing') ? ($count = count($zone)) : ($count ='2'); for ($i = 0; $i < $count; ++$i) { $file_location = $GLOBALS["OE_SITES_BASE"]."/".$_SESSION['site_id']."/documents/".$pid."/".$form_folder."/".$encounter."/".$side."_".$zone[$i]."_VIEW.png"; $sql = "SELECT * from documents where url='file://".$file_location."'"; $doc = sqlQuery($sql); if (file_exists($file_location) && ($doc['id'] > '0')) { $filetoshow = $GLOBALS['web_root']."/controller.php?document&retrieve&patient_id=$pid&document_id=$doc[id]&as_file=false"; ?><div style='position:relative;float:left;width:100px;height:75px;'> <img src='<?php echo $filetoshow; ?>' width=100 heght=75> </div> <? } else { // $filetoshow = "../../forms/".$form_folder."/images/".$side."_".$zone[$i]."_BASE.png?".rand(); } ?> <?php } } else if ($choice == "drawing") { */ ?> <div class="borderShadow"> <?php display_draw_section("VISION", $encounter, $pid); ?> </div> <div class="borderShadow"> <?php display_draw_section("NEURO", $encounter, $pid); ?> </div> <div class="borderShadow"> <?php display_draw_section("EXT", $encounter, $pid); ?> </div> <div class="borderShadow"> <?php display_draw_section("ANTSEG", $encounter, $pid); ?> </div> <div class="borderShadow"> <?php display_draw_section("RETINA", $encounter, $pid); ?> </div> <div class="borderShadow"> <?php display_draw_section("IMPPLAN", $encounter, $pid); ?> </div> <?php } else { if ($choice == 'TEXT') { //just display HPI and A/P narrative($pid, $encounter, $cols, $id, 'TEXT'); } else { if ($choice != "narrative") { narrative($pid, $encounter, $cols, $id, 'narrative'); //return; } } } }