public function fetchDates(RsPatient $patient, $beginDate = null, $endDate = null) { $encounters = getEncounters($patient->id, $beginDate, $endDate, $this->getOptionId()); $dates = array(); foreach ($encounters as $encounter) { $dateRow = getEncounterDateByEncounter($encounter['encounter']); $dates[] = $dateRow['date']; } return $dates; }
width: 33.3%; float:left; display:inline; margin-top:10px; } </style> <?php $hide = 1; require_once "{$incdir}/patient_file/encounter/new_form.php"; ?> <div id="encounter_forms"> <?php $dateres = getEncounterDateByEncounter($encounter); $encounter_date = date("Y-m-d", strtotime($dateres["date"])); $providerIDres = getProviderIdOfEncounter($encounter); $providerNameRes = getProviderName($providerIDres); ?> <div class='encounter-summary-container'> <div class='encounter-summary-column'> <div> <span class="title"><?php echo oeFormatShortDate($encounter_date) . " " . xl("Encounter"); ?> </span> <?php $auth_notes_a = acl_check('encounters', 'notes_a'); $auth_notes = acl_check('encounters', 'notes');
} } echo "</div>\n"; //end the issue DIV } else { // we have an "encounter form" form field whose name is like // dirname_formid, with a value which is the encounter ID. // // display encounter forms, encoded as a POST variable // in the format: <formdirname_formid>=<encounterID> if ($auth_notes_a || $auth_notes || $auth_coding_a || $auth_coding || $auth_med || $auth_relaxed) { $form_encounter = $val; preg_match('/^(.*)_(\\d+)$/', $key, $res); $form_id = $res[2]; $formres = getFormNameByFormdirAndFormid($res[1], $form_id); $dateres = getEncounterDateByEncounter($form_encounter); $formId = getFormIdByFormdirAndFormid($res[1], $form_id); if ($res[1] == 'newpatient') { echo "<div class='text encounter'>\n"; echo "<h1>" . xl($formres["form_name"]) . "</h1>"; } else { echo "<div class='text encounter_form'>"; echo "<h1>" . xl_form_title($formres["form_name"]) . "</h1>"; } // show the encounter's date echo "(" . oeFormatSDFT(strtotime($dateres["date"])) . ") "; if ($res[1] == 'newpatient') { // display the provider info echo ' ' . xl('Provider') . ': ' . text(getProviderName(getProviderIdOfEncounter($form_encounter))); } echo "<br>\n";
/** * This prints a header for documents. Keeps the brand uniform... * @param string $pid patient_id * @param string $direction, options "web" or anything else. Web provides apache-friendly url links. * @return outputs directly to screen */ function report_header($pid, $direction = 'shell') { global $form_name; global $encounter; global $visit_date; /******************************************************************* $titleres = getPatientData($pid, "fname,lname,providerID"); $sql = "SELECT * FROM facility ORDER BY billing_location DESC LIMIT 1"; *******************************************************************/ //$titleres = getPatientData($pid, "fname,lname,providerID,DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS"); $titleres = getPatientData($pid, "fname,lname,providerID,DOB"); if ($_SESSION['pc_facility']) { $sql = "select * from facility where id=?"; $facility = sqlQuery($sql, array($_SESSION['pc_facility'])); } else { $sql = "SELECT * FROM facility ORDER BY billing_location DESC LIMIT 1"; $facility = sqlQuery($sql); } $DOB = oeFormatShortDate($titleres['DOB']); /******************************************************************/ ob_start(); // Use logo if it exists as 'practice_logo.gif' in the site dir // old code used the global custom dir which is no longer a valid ?> <table style="width:100%;"> <tr> <td style='width:150px;text-align:top;'> <?php if ($direction == "web") { global $OE_SITE_DIR; $practice_logo = $GLOBALS['webroot'] . "/sites/default/images/practice_logo.gif"; if (file_exists($OE_SITE_DIR . "/images/practice_logo.gif")) { echo "<img src='{$practice_logo}' align='left' style='width:150px;margin:0px 10px;'><br />\n"; } } else { global $OE_SITE_DIR; $practice_logo = "{$OE_SITE_DIR}/images/practice_logo.gif"; if (file_exists($practice_logo)) { echo "<img src='{$practice_logo}' align='left' style='width:100px;margin:0px 10px;'><br />\n"; } } ?> </td> <td style='width:40%;'> <em style="font-weight:bold;font-size:1.4em;"><?php echo text($facility['name']); ?> </em><br /> <?php echo text($facility['street']); ?> <br /> <?php echo text($facility['city']); ?> , <?php echo text($facility['state']); ?> <?php echo text($facility['postal_code']); ?> <br /> <?php echo xlt('Phone') . ': ' . text($facility['phone']); ?> <br /> <?php echo xlt('Fax') . ': ' . text($facility['fax']); ?> <br /> <br clear='all' /> <?php $visit = getEncounterDateByEncounter($encounter); $visit_date = $visit['date']; ?> </td> <td> <em style="font-weight:bold;font-size:1.4em;"><?php echo text($titleres['fname']) . " " . text($titleres['lname']); ?> </em><br /> <b style="font-weight:bold;"><?php echo xlt('DOB'); ?> :</b> <?php echo text($DOB); ?> <br /> <b style="font-weight:bold;"><?php echo xlt('Generated on'); ?> :</b> <?php echo oeFormatShortDate(); ?> <br /> <b><?php echo xlt('Visit Date'); ?> :</b> <?php echo oeFormatSDFT(strtotime($visit_date)); ?> <br /> <b><?php echo xlt('Provider') . ':</b> ' . text(getProviderName(getProviderIdOfEncounter($encounter))) . '<br />'; ?> </td> </tr> </table> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
$info .= ', DOB: ' . $result['DOB'] . ', Age: ' . $age; } if ($result['phone_home']) { $info .= ', Home: ' . $result['phone_home']; } if ($result['pharmacy_id']) { $pharmacy = new Pharmacy($result['pharmacy_id']); if ($pharmacy->get_phone()) { $info .= ', Pharm: ' . $pharmacy->get_phone(); } } if (!empty($_GET["set_encounter"])) { setencounter($_GET["set_encounter"]); } if (!empty($encounter)) { $subresult = getEncounterDateByEncounter($encounter); $encounter_date = dateformat(strtotime($subresult['date'])); } else { $encounter_date = dateformat(); //otherwise, set today's date } ?> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"> <tr> <td width="33%" valign="middle" nowrap> <span class="title_bar_top"><?php echo $result["fname"] . " " . $result["lname"]; ?> </span>
} $("#OSSPH").val(Lnewsph); $("#OSCYL").val(Lnewcyl); $("#OSAXIS").val(Lnewaxis); $('#OSAXIS').trigger('blur'); $('#OSSPH').trigger('blur'); $('#OSCYL').trigger('blur'); } } </script> </head> <body> <?php echo report_header($pid, "web"); $visit = getEncounterDateByEncounter($encounter); $visit_date = $visit['date']; ?> <br /><br /> <form method="post" action="<?php echo $rootdir; ?> /forms/<?php echo text($form_folder); ?> /SpectacleRx.php?mode=update" id="Spectacle" class="eye_mag pure-form" name="Spectacle" style="text-align:center;"> <!-- start container for the main body of the form --> <input type="hidden" name="REFDATE" id="REFDATE" value="<?php echo attr($data['date']); ?> ">