<a href="javascript:void(0);" title="<?php echo attr($note); ?> "><img src="../../../images/info.png"/></a> <?php } } ?> </div> <?php } ?> <br/> <?php if ($result = getFormByEncounter($pid, $encounter, "id, date, form_id, form_name, formdir, user, deleted")) { echo "<table width='100%' id='partable'>"; $divnos = 1; foreach ($result as $iter) { $formdir = $iter['formdir']; // skip forms whose 'deleted' flag is set to 1 if ($iter['deleted'] == 1) { continue; } // Skip forms that we are not authorized to see. if ($auth_notes_a || $auth_notes && $iter['user'] == $_SESSION['authUser'] || $auth_relaxed && ($formdir == 'sports_fitness' || $formdir == 'podiatry')) { } else { continue; } // $form_info = getFormInfoById($iter['id']); if (strtolower(substr($iter['form_name'], 0, 5)) == 'camos') {
$lastdocname = ""; $doc_encounters = 0; while ($row = sqlFetchArray($res)) { $patient_id = $row['pid']; $docname = ''; if (!empty($row['ulname']) || !empty($row['ufname'])) { $docname = $row['ulname']; if (!empty($row['ufname']) || !empty($row['umname'])) { $docname .= ', ' . $row['ufname'] . ' ' . $row['umname']; } } $errmsg = ""; if ($details) { // Fetch all other forms for this encounter. $encnames = ''; $encarr = getFormByEncounter($patient_id, $row['encounter'], "formdir, user, form_name, form_id"); if ($encarr != '') { foreach ($encarr as $enc) { if ($enc['formdir'] == 'newpatient') { continue; } if ($encnames) { $encnames .= '<br />'; } $encnames .= $enc['form_name']; } } // Fetch coding and compute billing status. $coded = ""; $billed_count = 0; $unbilled_count = 0;
<frame src="coding.php" name="Codesets" scrolling="auto"> <frame src="blank.php" name="Codes" scrolling="auto"> <frame src="diagnosis.php" name="Diagnosis" scrolling="auto"> </frameset> </frameset> <noframes><body bgcolor="#FFFFFF"> </body></noframes> </HTML> <?php exit(0); } //this was either a user click on the encounter menu link if (isset($_GET["mode"]) && $_GET["mode"] == "new") { $enc = date("Ymd"); if (getFormByEncounter($pid, $enc)) { //there is an encounter enterred for today $encounter = $enc; $_SESSION["encounter"] = $enc; } else { //no encounter for today yet $encounter = ""; $_SESSION["encounter"] = ""; ?> <HTML> <head> <?php html_header_show(); ?> <TITLE>
$auth_sensitivity = acl_check('sensitivities', $result4['sensitivity']); if (!$auth_sensitivity) { $reason_string = "(" . htmlspecialchars(xl("No access"), ENT_NOQUOTES) . ")"; } } // This generates document lines as appropriate for the date order. while ($drow && $raw_encounter_date && $drow['docdate'] > $raw_encounter_date) { showDocument($drow); $drow = sqlFetchArray($dres); } // Fetch all forms for this encounter, if the user is authorized to see // this encounter's notes and this is the clinical view. $encarr = array(); $encounter_rows = 1; if (!$billing_view && $auth_sensitivity && ($auth_notes_a || $auth_notes && $result4['user'] == $_SESSION['authUser'])) { $encarr = getFormByEncounter($pid, $result4['encounter'], "formdir, user, form_name, form_id, deleted"); $encounter_rows = count($encarr); } $rawdata = $result4['encounter'] . "~" . oeFormatShortDate($raw_encounter_date); echo "<tr class='encrow text' id='" . htmlspecialchars($rawdata, ENT_QUOTES) . "'>\n"; // show encounter date echo "<td valign='top' title='" . htmlspecialchars(xl('View encounter', '', '', ' ') . "{$pid}.{$result4['encounter']}", ENT_QUOTES) . "'>" . htmlspecialchars(oeFormatShortDate($raw_encounter_date), ENT_NOQUOTES) . "</td>\n"; if ($billing_view) { // Show billing note that you can click on to edit. $feid = $result4['id'] ? htmlspecialchars($result4['id'], ENT_QUOTES) : 0; // form_encounter id echo "<td valign='top'>"; echo "<div id='note_{$feid}'>"; //echo "<div onclick='editNote($feid)' title='Click to edit' class='text billing_note_text'>"; echo "<div id='{$feid}' title='" . htmlspecialchars(xl('Click to edit'), ENT_QUOTES) . "' class='text billing_note_text'>"; echo $result4['billing_note'] ? nl2br(htmlspecialchars($result4['billing_note'], ENT_NOQUOTES)) : htmlspecialchars(xl('Add', '', '[', ']'), ENT_NOQUOTES);
} $subresult7 = getInsuranceDataByDate($pid, $raw_encounter_date, "tertiary"); if ($subresult6 && $subresult7["provider_name"]) { $insured .= "<span class='text'>" . xl('Tertiary') . ": " . $subresult7["provider_name"] . "</span><br>\n"; } } else { $insured = "(No access)"; } echo "<td valign='top'>{$linkbeg}" . $insured . "</a></td>\n"; } print "</tr>\n"; // Now show a line for each encounter form, if the user is authorized to // see this encounter's notes. // if ($auth_sensitivity && ($auth_notes_a || $auth_notes && $iter['user'] == $_SESSION['authUser'])) { $encarr = getFormByEncounter($pid, $iter['encounter'], "formdir, user, form_name, form_id"); foreach ($encarr as $enc) { if ($enc['formdir'] == 'newpatient') { continue; } $title = ""; $frow = sqlQuery("select * from form_" . $enc['formdir'] . " where id = " . $enc['form_id']); foreach ($frow as $fkey => $fvalue) { if (!preg_match('/[A-Za-z]/', $fvalue)) { continue; } if ($title) { $title .= "; "; } $title .= strtoupper($fkey) . ': ' . $fvalue; }