Example #1
0
     if ($orderid) {
         if (isGpRelation(2, $orderid, 6, $row_note_id)) {
             $linked = "checked";
         } else {
             // Skip unlinked notes if that is requested.
             if ($form_doc_only) {
                 continue;
             }
         }
     }
 }
 $body = $iter['body'];
 if (preg_match('/^\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d\\:\\d\\d /', $body)) {
     $body = nl2br(htmlspecialchars(oeFormatPatientNote($body), ENT_NOQUOTES));
 } else {
     $body = htmlspecialchars(oeFormatSDFT(strtotime($iter['date'])) . date(' H:i', strtotime($iter['date'])), ENT_NOQUOTES) . ' (' . htmlspecialchars($iter['user'], ENT_NOQUOTES) . ') ' . nl2br(htmlspecialchars(oeFormatPatientNote($body), ENT_NOQUOTES));
 }
 $body = preg_replace('/(:\\d{2}\\s\\()' . $patient_id . '(\\sto\\s)/', '${1}' . $patientname . '${2}', $body);
 if ($iter["activity"] && $iter['message_status'] != "Done") {
     $checked = "checked";
 } else {
     $checked = "";
 }
 // highlight the row if it's been selected for updating
 if ($_REQUEST['noteid'] == $row_note_id) {
     echo " <tr height=20 class='noterow highlightcolor' id='" . htmlspecialchars($row_note_id, ENT_QUOTES) . "'>\n";
 } else {
     echo " <tr class='noterow' id='" . htmlspecialchars($row_note_id, ENT_QUOTES) . "'>\n";
 }
 echo "  <td><a href='pnotes_full_add.php?{$urlparms}&trigger=edit&noteid=" . htmlspecialchars($row_note_id, ENT_QUOTES) . "' class='css_button_small iframe' onclick='top.restoreSession()'><span>" . htmlspecialchars(xl('Edit'), ENT_NOQUOTES) . "</span></a>\n";
 // display, or not, a button to delete the note
Example #2
0
     if ($PatientPay > 0) {
         if ($rhtml) {
             $rhtml2 .= "<tr bgcolor='{$bgcolor}'>\n";
         }
         $rhtml2 .= "<td width='50'>";
         $rhtml2 .= "<span class='text'>" . xlt('COPAY') . ": </span>";
         $rhtml2 .= "</td>\n";
         $rhtml2 .= "<td><span class='text'>" . text(oeFormatMoney($PatientPay)) . "</span><span style='font-size:8pt;'>&nbsp;</span></td>\n";
         $rhtml2 .= '<td align="right"><span style="font-size:8pt;">&nbsp;&nbsp;&nbsp;';
         $rhtml2 .= "</span></td>\n";
         $rhtml2 .= '<td><span style="font-size:8pt;">&nbsp;&nbsp;&nbsp;';
         $rhtml2 .= "</span></td>\n";
         $rhtml2 .= '<td><span style="font-size:8pt;">&nbsp;&nbsp;&nbsp;';
         $rhtml2 .= "</span></td>\n";
         $rhtml2 .= '<td width=100>&nbsp;&nbsp;&nbsp;<span style="font-size:8pt;">';
         $rhtml2 .= text(oeFormatSDFT(strtotime($date)));
         $rhtml2 .= "</span></td>\n";
         if ($iter['id'] && $iter['authorized'] != 1) {
             $rhtml2 .= "<td><span class=alert>" . xlt("Note: This copay was entered against billing that has not been authorized. Please review status.") . "</span></td>\n";
         } else {
             $rhtml2 .= "<td></td>\n";
         }
         if (!$iter['id'] && $rowcnt == 1) {
             $rhtml2 .= "<td><input type='checkbox' value='0' name='claims[" . attr($this_encounter_id) . "][bill]' onclick='set_button_states()' id='CheckBoxBilling" . attr($CheckBoxBilling * 1) . "'>&nbsp;</td>\n";
             $CheckBoxBilling++;
         } else {
             $rhtml2 .= "<td></td>\n";
         }
     }
 }
 $rhtml .= $rhtml2;
Example #3
0
<br><?php 
    echo text($frow['city'] . ', ' . $frow['state']) . ' ' . text($frow['postal_code']);
    ?>
<br><?php 
    echo htmlentities($frow['phone']);
    ?>

<p>
<table border='0' cellspacing='8'>
 <tr>
  <td><?php 
    echo xlt('Date');
    ?>
:</td>
  <td><?php 
    echo text(oeFormatSDFT(strtotime($payrow['dtime'])));
    ?>
</td>
 </tr>
 <tr>
  <td><?php 
    echo xlt('Patient');
    ?>
:</td>
  <td><?php 
    echo text($patdata['fname']) . " " . text($patdata['mname']) . " " . text($patdata['lname']) . " (" . text($patdata['pubpid']) . ")";
    ?>
</td>
 </tr>
 <tr>
  <td><?php 
Example #4
0
                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";
                    // call the report function for the form
                    ?>
                
                <div name="search_div" id="search_div_<?php 
                    echo attr($form_id);
                    ?>
_<?php 
                    echo attr($res[1]);
                    ?>
" class="report_search_div class_<?php 
Example #5
0
     $rhtml .= ":" . $iter['modifier'];
 }
 $rhtml .= "</span><span style='font-size:8pt;'>{$justify}</span></td>\n";
 $rhtml .= '<td align="right"><span style="font-size:8pt;">&nbsp;&nbsp;&nbsp;';
 if ($iter['id'] && $iter['fee'] > 0) {
     $rhtml .= oeFormatMoney($iter['fee']);
 }
 $rhtml .= "</span></td>\n";
 $rhtml .= '<td><span style="font-size:8pt;">&nbsp;&nbsp;&nbsp;';
 if ($iter['id']) {
     $rhtml .= getProviderName(empty($iter['provider_id']) ? $iter['enc_provider_id'] : $iter['provider_id']);
 }
 $rhtml .= "</span></td>\n";
 $rhtml .= '<td width=100>&nbsp;&nbsp;&nbsp;<span style="font-size:8pt;">';
 if ($iter['id']) {
     $rhtml .= oeFormatSDFT(strtotime($iter["date"]));
 }
 $rhtml .= "</span></td>\n";
 if ($iter['id'] && $iter['authorized'] != 1) {
     $rhtml .= "<td><span class=alert>" . xl("Note: This code was not entered by an authorized user. Only authorized codes may be uploaded to the Open Medical Billing Network for processing. If you wish to upload these codes, please select an authorized user here.") . "</span></td>\n";
 } else {
     $rhtml .= "<td></td>\n";
 }
 if ($iter['id'] && $last_encounter_id != $this_encounter_id) {
     $tmpbpr = $iter['bill_process'];
     if ($tmpbpr == '0' && $iter['billed']) {
         $tmpbpr = '2';
     }
     $rhtml .= "<td><input type='checkbox' value='{$tmpbpr}' name='claims[" . $this_encounter_id . "][bill]' onclick='set_button_states()' id='CheckBoxBilling" . $CheckBoxBilling * 1 . "'>&nbsp;</td>\n";
     $CheckBoxBilling++;
 } else {
/**
 * 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;
}
Example #7
0
 $linked = "";
 if ($docid) {
     if (isGpRelation(1, $docid, 6, $row_note_id)) {
         $linked = "checked";
     } else {
         // Skip unlinked notes if that is requested.
         if ($form_doc_only) {
             continue;
         }
     }
 }
 $body = $iter['body'];
 if (preg_match('/^\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d\\:\\d\\d /', $body)) {
     $body = nl2br(oeFormatPatientNote($body));
 } else {
     $body = oeFormatSDFT(strtotime($iter['date'])) . date(' H:i', strtotime($iter['date'])) . ' (' . $iter['user'] . ') ' . nl2br(oeFormatPatientNote($body));
 }
 if ($iter["activity"]) {
     $checked = "checked";
 } else {
     $checked = "";
 }
 // highlight the row if it's been selected for updating
 if ($_REQUEST['noteid'] == $row_note_id) {
     echo " <tr height=20 class='noterow highlightcolor' id='{$row_note_id}'>\n";
 } else {
     echo " <tr class='noterow' id='{$row_note_id}'>\n";
 }
 echo "  <td><a href='pnotes_full_add.php?trigger=edit&noteid={$row_note_id}' class='css_button_small iframe'><span>" . xl('Edit') . "</span></a>\n";
 // display, or not, a button to delete the note
 // if the user is an admin or if they are the author of the note, they can delete it