示例#1
1
function showDocument(&$drow)
{
    global $ISSUE_TYPES, $auth_med;
    $docdate = $drow['docdate'];
    echo "<tr class='text docrow' id='" . htmlspecialchars($drow['id'], ENT_QUOTES) . "' title='" . htmlspecialchars(xl('View document'), ENT_QUOTES) . "'>\n";
    // show date
    echo "<td>" . htmlspecialchars(oeFormatShortDate($docdate), ENT_NOQUOTES) . "</td>\n";
    // show associated issue, if any
    echo "<td>";
    if ($auth_med) {
        $irow = sqlQuery("SELECT type, title, begdate " . "FROM lists WHERE " . "id = ? " . "LIMIT 1", array($drow['list_id']));
        if ($irow) {
            $tcode = $irow['type'];
            if ($ISSUE_TYPES[$tcode]) {
                $tcode = $ISSUE_TYPES[$tcode][2];
            }
            echo htmlspecialchars("{$tcode}: " . $irow['title'], ENT_NOQUOTES);
        }
    } else {
        echo "(" . htmlspecialchars(xl('No access'), ENT_NOQUOTES) . ")";
    }
    echo "</td>\n";
    // show document name and category
    echo "<td colspan='3'>" . htmlspecialchars(xl('Document') . ": " . basename($drow['url']) . ' (' . xl_document_category($drow['name']) . ')', ENT_NOQUOTES) . "</td>\n";
    // skip billing and insurance columns
    if (!$GLOBALS['athletic_team']) {
        echo "<td colspan=5>&nbsp;</td>\n";
    }
    echo "</tr>\n";
}
示例#2
0
function writeDetailLine($bgcolor, $class, $ptname, $invnumber, $code, $date, $description, $amount, $balance)
{
    global $last_ptname, $last_invnumber, $last_code;
    if ($ptname == $last_ptname) {
        $ptname = '&nbsp;';
    } else {
        $last_ptname = $ptname;
    }
    if ($invnumber == $last_invnumber) {
        $invnumber = '&nbsp;';
    } else {
        $last_invnumber = $invnumber;
    }
    if ($code == $last_code) {
        $code = '&nbsp;';
    } else {
        $last_code = $code;
    }
    if ($amount) {
        $amount = sprintf("%.2f", $amount);
    }
    if ($balance) {
        $balance = sprintf("%.2f", $balance);
    }
    $dline = " <tr bgcolor='{$bgcolor}'>\n" . "  <td class='{$class}'>{$ptname}</td>\n" . "  <td class='{$class}'>{$invnumber}</td>\n" . "  <td class='{$class}'>{$code}</td>\n" . "  <td class='{$class}'>" . oeFormatShortDate($date) . "</td>\n" . "  <td class='{$class}'>{$description}</td>\n" . "  <td class='{$class}' align='right'>" . oeFormatMoney($amount) . "</td>\n" . "  <td class='{$class}' align='right'>" . oeFormatMoney($balance) . "</td>\n" . " </tr>\n";
    echo $dline;
}
示例#3
0
function thisLineItem($row)
{
    $provname = $row['provider_lname'];
    if (!empty($row['provider_fname'])) {
        $provname .= ', ' . $row['provider_fname'];
        if (!empty($row['provider_mname'])) {
            $provname .= ' ' . $row['provider_mname'];
        }
    }
    if ($_POST['form_csvexport']) {
        echo '"' . addslashes($row['patient_name']) . '",';
        echo '"' . addslashes($row['pubpid']) . '",';
        echo '"' . addslashes(oeFormatShortDate($row['date_ordered'])) . '",';
        echo '"' . addslashes($row['organization']) . '",';
        echo '"' . addslashes($row['procedure_name']) . '",';
        echo '"' . addslashes($provname) . '",';
        echo '"' . addslashes($row['priority_name']) . '",';
        echo '"' . addslashes($row['status_name']) . '"' . "\n";
    } else {
        ?>
 <tr>
  <td class="detail"><?php 
        echo $row['patient_name'];
        ?>
</td>
  <td class="detail"><?php 
        echo $row['pubpid'];
        ?>
</td>
  <td class="detail"><?php 
        echo oeFormatShortDate($row['date_ordered']);
        ?>
</td>
  <td class="detail"><?php 
        echo $row['organization'];
        ?>
</td>
  <td class="detail"><?php 
        echo $row['procedure_name'];
        ?>
</td>
  <td class="detail"><?php 
        echo $provname;
        ?>
</td>
  <td class="detail"><?php 
        echo $row['priority_name'];
        ?>
</td>
  <td class="detail"><?php 
        echo $row['status_name'];
        ?>
</td>
 </tr>
<?php 
    }
    // End not csv export
}
示例#4
0
function oeFormatPatientNote($note)
{
    $i = 0;
    while ($i !== false) {
        if (preg_match('/^\\d\\d\\d\\d-\\d\\d-\\d\\d/', substr($note, $i))) {
            $note = substr($note, 0, $i) . oeFormatShortDate(substr($note, $i, 10)) . substr($note, $i + 10);
        }
        $i = strpos("\n", $note, $i);
        if ($i !== false) {
            ++$i;
        }
    }
    return $note;
}
示例#5
0
function echoLine($iname, $date, $charges, $ptpaid, $inspaid, $duept)
{
    $balance = bucks($charges - $ptpaid - $inspaid);
    $getfrompt = $duept > 0 ? $duept : 0;
    echo " <tr>\n";
    echo "  <td class='detail'>" . oeFormatShortDate($date) . "</td>\n";
    echo "  <td class='detail' align='right'>" . bucks($charges) . "</td>\n";
    echo "  <td class='detail' align='right'>" . bucks($ptpaid) . "</td>\n";
    echo "  <td class='detail' align='right'>" . bucks($inspaid) . "</td>\n";
    echo "  <td class='detail' align='right'>{$balance}</td>\n";
    echo "  <td class='detail' align='right'>" . bucks($duept) . "</td>\n";
    echo "  <td class='detail' align='right'><input type='text' name='{$iname}' " . "size='6' value='" . rawbucks($getfrompt) . "' onchange='calctotal()' " . "onkeyup='calctotal()' /></td>\n";
    echo " </tr>\n";
}
function printAmendment($amendmentID, $lastAmendment)
{
    $query = "SELECT lo.title AS 'amendmentFrom', lo1.title AS 'amendmentStatus',a.* FROM amendments a \n\t\tLEFT JOIN list_options lo ON a.amendment_by = lo.option_id AND lo.list_id = 'amendment_from' AND lo.activity = 1\n\t\tLEFT JOIN list_options lo1 ON a.amendment_status = lo1.option_id AND lo1.list_id = 'amendment_status' AND lo1.activity = 1\n\t\tWHERE a.amendment_id = ?";
    $resultSet = sqlQuery($query, array($amendmentID));
    echo "<table>";
    echo "<tr class=text>";
    echo "<td class=bold>" . xlt("Requested Date") . ":" . "</td>";
    echo "<td>" . oeFormatShortDate($resultSet['amendment_date']) . "</td>";
    echo "</tr>";
    echo "<tr class=text>";
    echo "<td class=bold>" . xlt("Requested By") . ":" . "</td>";
    echo "<td>" . generate_display_field(array('data_type' => '1', 'list_id' => 'amendment_from'), $resultSet['amendment_by']) . "</td>";
    echo "</tr>";
    echo "<tr class=text>";
    echo "<td class=bold>" . xlt("Request Status") . ":" . "</td>";
    echo "<td>" . generate_display_field(array('data_type' => '1', 'list_id' => 'amendment_status'), $resultSet['amendment_status']) . "</td>";
    echo "</tr>";
    echo "<tr class=text>";
    echo "<td class=bold>" . xlt("Request Description") . ":" . "</td>";
    echo "<td>" . text($resultSet['amendment_desc']) . "</td>";
    echo "</tr>";
    echo "</table>";
    echo "<hr>";
    echo "<span class='bold'>" . xlt("History") . "</span><br>";
    $pageBreak = $lastAmendment ? "" : "page-break-after:always";
    echo "<table border='1' cellspacing=0 cellpadding=3 style='width:75%;margin-top:10px;margin-bottom:20px;" . $pageBreak . "'>";
    echo "<tr class='text bold'>";
    echo "<th align=left style='width:10%'>" . xlt("Date") . "</th>";
    echo "<th align=left style='width:20%'>" . xlt("By") . "</th>";
    echo "<th align=left >" . xlt("Comments") . "</th>";
    echo "</tr>";
    $query = "SELECT u.fname,u.lname,ah.* FROM amendments_history ah INNER JOIN users u ON ah.created_by = u.id WHERE ah.amendment_id = ?";
    $resultSet = sqlStatement($query, array($amendmentID));
    while ($row = sqlFetchArray($resultSet)) {
        echo "<tr class=text>";
        $created_date = date('Y-m-d', strtotime($row['created_time']));
        echo "<td>" . oeFormatShortDate($created_date) . "</td>";
        echo "<td>" . text($row['lname']) . ", " . text($row['fname']) . "</td>";
        echo "<td>" . text($row['amendment_note']) . "</td>";
        echo "</tr>";
    }
    echo "</table>";
}
示例#7
0
function echoLine($iname, $date, $charges, $ptpaid, $inspaid, $duept, $encounter = 0, $copay = 0, $patcopay = 0)
{
    global $var_index;
    $var_index++;
    $balance = bucks($charges - $ptpaid - $inspaid - $copay * -1);
    $balance = round($duept, 2) != 0 ? 0 : $balance;
    //if balance is due from patient, then insurance balance is displayed as zero
    $encounter = $encounter ? $encounter : '';
    echo " <tr id='tr_" . attr($var_index) . "' >\n";
    echo "  <td class='detail'>" . text(oeFormatShortDate($date)) . "</td>\n";
    echo "  <td class='detail' id='" . attr($date) . "' align='center'>" . htmlspecialchars($encounter, ENT_QUOTES) . "</td>\n";
    echo "  <td class='detail' align='center' id='td_charges_{$var_index}' >" . htmlspecialchars(bucks($charges), ENT_QUOTES) . "</td>\n";
    echo "  <td class='detail' align='center' id='td_inspaid_{$var_index}' >" . htmlspecialchars(bucks($inspaid * -1), ENT_QUOTES) . "</td>\n";
    echo "  <td class='detail' align='center' id='td_ptpaid_{$var_index}' >" . htmlspecialchars(bucks($ptpaid * -1), ENT_QUOTES) . "</td>\n";
    echo "  <td class='detail' align='center' id='td_patient_copay_{$var_index}' >" . htmlspecialchars(bucks($patcopay), ENT_QUOTES) . "</td>\n";
    echo "  <td class='detail' align='center' id='td_copay_{$var_index}' >" . htmlspecialchars(bucks($copay), ENT_QUOTES) . "</td>\n";
    echo "  <td class='detail' align='center' id='balance_{$var_index}'>" . htmlspecialchars(bucks($balance), ENT_QUOTES) . "</td>\n";
    echo "  <td class='detail' align='center' id='duept_{$var_index}'>" . htmlspecialchars(bucks(round($duept, 2) * 1), ENT_QUOTES) . "</td>\n";
    echo "  <td class='detail' align='right'><input type='text' name='" . attr($iname) . "'  id='paying_" . attr($var_index) . "' " . " value='" . '' . "' onchange='coloring();calctotal()'  autocomplete='off' " . "onkeyup='calctotal()'  style='width:50px'/></td>\n";
    echo " </tr>\n";
}
示例#8
0
function generate_display_field($frow, $currvalue)
{
    $data_type = $frow['data_type'];
    $field_id = $frow['field_id'];
    $list_id = $frow['list_id'];
    $s = '';
    // generic selection list or the generic selection list with add on the fly
    // feature, or radio buttons
    if ($data_type == 1 || $data_type == 26 || $data_type == 27) {
        $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($list_id, $currvalue));
        $s = htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
    } else {
        if ($data_type == 2) {
            $s = htmlspecialchars($currvalue, ENT_NOQUOTES);
        } else {
            if ($data_type == 3) {
                $s = nl2br(htmlspecialchars($currvalue, ENT_NOQUOTES));
            } else {
                if ($data_type == 4) {
                    $s = htmlspecialchars(oeFormatShortDate($currvalue), ENT_NOQUOTES);
                } else {
                    if ($data_type == 10 || $data_type == 11) {
                        $urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
                        $s = htmlspecialchars(ucwords($urow['fname'] . " " . $urow['lname']), ENT_NOQUOTES);
                    } else {
                        if ($data_type == 12) {
                            $pres = get_pharmacies();
                            while ($prow = sqlFetchArray($pres)) {
                                $key = $prow['id'];
                                if ($currvalue == $key) {
                                    $s .= htmlspecialchars($prow['name'] . ' ' . $prow['area_code'] . '-' . $prow['prefix'] . '-' . $prow['number'] . ' / ' . $prow['line1'] . ' / ' . $prow['city'], ENT_NOQUOTES);
                                }
                            }
                        } else {
                            if ($data_type == 13) {
                                $squads = acl_get_squads();
                                if ($squads) {
                                    foreach ($squads as $key => $value) {
                                        if ($currvalue == $key) {
                                            $s .= htmlspecialchars($value[3], ENT_NOQUOTES);
                                        }
                                    }
                                }
                            } else {
                                if ($data_type == 14) {
                                    $urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
                                    $uname = $urow['lname'];
                                    if ($urow['fname']) {
                                        $uname .= ", " . $urow['fname'];
                                    }
                                    $s = htmlspecialchars($uname, ENT_NOQUOTES);
                                } else {
                                    if ($data_type == 15) {
                                        $s = htmlspecialchars($currvalue, ENT_NOQUOTES);
                                    } else {
                                        if ($data_type == 21) {
                                            $avalue = explode('|', $currvalue);
                                            $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                            $count = 0;
                                            while ($lrow = sqlFetchArray($lres)) {
                                                $option_id = $lrow['option_id'];
                                                if (in_array($option_id, $avalue)) {
                                                    if ($count++) {
                                                        $s .= "<br />";
                                                    }
                                                    // Added 5-09 by BM - Translate label if applicable
                                                    $s .= htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
                                                }
                                            }
                                        } else {
                                            if ($data_type == 22) {
                                                $tmp = explode('|', $currvalue);
                                                $avalue = array();
                                                foreach ($tmp as $value) {
                                                    if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
                                                        $avalue[$matches[1]] = $matches[2];
                                                    }
                                                }
                                                $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                $s .= "<table cellpadding='0' cellspacing='0'>";
                                                while ($lrow = sqlFetchArray($lres)) {
                                                    $option_id = $lrow['option_id'];
                                                    if (empty($avalue[$option_id])) {
                                                        continue;
                                                    }
                                                    // Added 5-09 by BM - Translate label if applicable
                                                    $s .= "<tr><td class='bold' valign='top'>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . ":&nbsp;</td>";
                                                    $s .= "<td class='text' valign='top'>" . htmlspecialchars($avalue[$option_id], ENT_NOQUOTES) . "</td></tr>";
                                                }
                                                $s .= "</table>";
                                            } else {
                                                if ($data_type == 23) {
                                                    $tmp = explode('|', $currvalue);
                                                    $avalue = array();
                                                    foreach ($tmp as $value) {
                                                        if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
                                                            $avalue[$matches[1]] = $matches[2];
                                                        }
                                                    }
                                                    $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                    $s .= "<table cellpadding='0' cellspacing='0'>";
                                                    while ($lrow = sqlFetchArray($lres)) {
                                                        $option_id = $lrow['option_id'];
                                                        $restype = substr($avalue[$option_id], 0, 1);
                                                        $resnote = substr($avalue[$option_id], 2);
                                                        if (empty($restype) && empty($resnote)) {
                                                            continue;
                                                        }
                                                        // Added 5-09 by BM - Translate label if applicable
                                                        $s .= "<tr><td class='bold' valign='top'>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . "&nbsp;</td>";
                                                        $restype = $restype == '1' ? xl('Normal') : ($restype == '2' ? xl('Abnormal') : xl('N/A'));
                                                        // $s .= "<td class='text' valign='top'>$restype</td></tr>";
                                                        // $s .= "<td class='text' valign='top'>$resnote</td></tr>";
                                                        $s .= "<td class='text' valign='top'>" . htmlspecialchars($restype, ENT_NOQUOTES) . "&nbsp;</td>";
                                                        $s .= "<td class='text' valign='top'>" . htmlspecialchars($resnote, ENT_NOQUOTES) . "</td>";
                                                        $s .= "</tr>";
                                                    }
                                                    $s .= "</table>";
                                                } else {
                                                    if ($data_type == 24) {
                                                        $query = "SELECT title, comments FROM lists WHERE " . "pid = ? AND type = 'allergy' AND enddate IS NULL " . "ORDER BY begdate";
                                                        // echo "<!-- $query -->\n"; // debugging
                                                        $lres = sqlStatement($query, array($GLOBALS['pid']));
                                                        $count = 0;
                                                        while ($lrow = sqlFetchArray($lres)) {
                                                            if ($count++) {
                                                                $s .= "<br />";
                                                            }
                                                            $s .= htmlspecialchars($lrow['title'], ENT_NOQUOTES);
                                                            if ($lrow['comments']) {
                                                                $s .= ' (' . htmlspecialchars($lrow['comments'], ENT_NOQUOTES) . ')';
                                                            }
                                                        }
                                                    } else {
                                                        if ($data_type == 25) {
                                                            $tmp = explode('|', $currvalue);
                                                            $avalue = array();
                                                            foreach ($tmp as $value) {
                                                                if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
                                                                    $avalue[$matches[1]] = $matches[2];
                                                                }
                                                            }
                                                            $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                            $s .= "<table cellpadding='0' cellspacing='0'>";
                                                            while ($lrow = sqlFetchArray($lres)) {
                                                                $option_id = $lrow['option_id'];
                                                                $restype = substr($avalue[$option_id], 0, 1);
                                                                $resnote = substr($avalue[$option_id], 2);
                                                                if (empty($restype) && empty($resnote)) {
                                                                    continue;
                                                                }
                                                                // Added 5-09 by BM - Translate label if applicable
                                                                $s .= "<tr><td class='bold' valign='top'>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . "&nbsp;</td>";
                                                                $restype = $restype ? xl('Yes') : xl('No');
                                                                $s .= "<td class='text' valign='top'>" . htmlspecialchars($restype, ENT_NOQUOTES) . "</td></tr>";
                                                                $s .= "<td class='text' valign='top'>" . htmlspecialchars($resnote, ENT_NOQUOTES) . "</td></tr>";
                                                                $s .= "</tr>";
                                                            }
                                                            $s .= "</table>";
                                                        } else {
                                                            if ($data_type == 28) {
                                                                $tmp = explode('|', $currvalue);
                                                                switch (count($tmp)) {
                                                                    case "3":
                                                                        $resnote = $tmp[0];
                                                                        $restype = $tmp[1];
                                                                        $resdate = $tmp[2];
                                                                        break;
                                                                    case "2":
                                                                        $resnote = $tmp[0];
                                                                        $restype = $tmp[1];
                                                                        $resdate = "";
                                                                        break;
                                                                    case "1":
                                                                        $resnote = $tmp[0];
                                                                        $resdate = $restype = "";
                                                                        break;
                                                                    default:
                                                                        $restype = $resdate = $resnote = "";
                                                                        break;
                                                                }
                                                                $s .= "<table cellpadding='0' cellspacing='0'>";
                                                                $s .= "<tr>";
                                                                $res = "";
                                                                if ($restype == "current" . $field_id) {
                                                                    $res = xl('Current');
                                                                }
                                                                if ($restype == "quit" . $field_id) {
                                                                    $res = xl('Quit');
                                                                }
                                                                if ($restype == "never" . $field_id) {
                                                                    $res = xl('Never');
                                                                }
                                                                if ($restype == "not_applicable" . $field_id) {
                                                                    $res = xl('N/A');
                                                                }
                                                                // $s .= "<td class='text' valign='top'>$restype</td></tr>";
                                                                // $s .= "<td class='text' valign='top'>$resnote</td></tr>";
                                                                if (!empty($resnote)) {
                                                                    $s .= "<td class='text' valign='top'>" . htmlspecialchars($resnote, ENT_NOQUOTES) . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>";
                                                                }
                                                                if (!empty($res)) {
                                                                    $s .= "<td class='text' valign='top'><b>" . htmlspecialchars(xl('Status'), ENT_NOQUOTES) . "</b>:&nbsp;" . htmlspecialchars($res, ENT_NOQUOTES) . "&nbsp;</td>";
                                                                }
                                                                if ($restype == "quit" . $field_id) {
                                                                    $s .= "<td class='text' valign='top'>" . htmlspecialchars($resdate, ENT_NOQUOTES) . "&nbsp;</td>";
                                                                }
                                                                $s .= "</tr>";
                                                                $s .= "</table>";
                                                            } else {
                                                                if ($data_type == 31) {
                                                                    $s .= nl2br($frow['description']);
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return $s;
}
    $user_info['patadj'][$k] = $us18_patadj;
    $user_info['patpay'][$k] = $us18_patpay;
    ++$k;
}
if ($us19_fee != 0 || $us19_inspay != 0 || $us19_insadj != 0 || $us19_patadj != 0 || $us19_patpay != 0) {
    $user_info['user'][$k] = $us19_user;
    $user_info['fee'][$k] = $us19_fee;
    $user_info['inspay'][$k] = $us19_inspay;
    $user_info['insadj'][$k] = $us19_insadj;
    $user_info['patadj'][$k] = $us19_patadj;
    $user_info['patpay'][$k] = $us19_patpay;
    ++$k;
}
if ($totals_only == 1) {
    $from_date = oeFormatShortDate(substr($query_part_day, 37, 10));
    $to_date = oeFormatShortDate(substr($query_part_day, 63, 10));
    print "<br><br>";
    ?>
<font size = 5 ><?php 
    echo xlt('Totals for ') . $from_date . ' ' . xlt('To') . ' ' . $to_date;
    ?>
</font><?php 
}
for ($i = 1; $i < $k;) {
    print "<table border=1><tr>\n";
    print "<br><br>";
    Printf("<td width=70><span class=text><b>" . xlt("User ") . "</center></b><center>" . text($user_info[user][$i])) . "</center>";
    Printf("<td width=140><span class=text><b><center>" . xlt("Charges") . ' ' . "</center></b><center>" . " %1\$.2f", text($user_info[fee][$i])) . "</center>";
    Printf("<td width=140><span class=text><b><center>" . xlt("Insurance Adj") . '. ' . "</center></b><center>" . "%1\$.2f", text($user_info[insadj][$i])) . "</center>";
    Printf("<td width=140><span class=text><b><center>" . xlt("Insurance Payments") . ' ' . "</center></b><center>" . "%1\$.2f", text($user_info[inspay][$i])) . "</center>";
    Printf("<td width=140><span class=text><b><center>" . xlt("Patient Adj") . '. ' . "</center></b><center>" . "%1\$.2f", text($user_info[patadj][$i])) . "</center>";
示例#10
0
            ?>
" ><a href="edit_payment.php?payment_id=<?php 
            echo htmlspecialchars($RowSearch['session_id']);
            ?>
"  class='iframe medium_modal' ><?php 
            echo htmlspecialchars($RowSearch['session_id']);
            ?>
</a></td>
								<td class="<?php 
            echo $StringClass;
            ?>
" ><a href="edit_payment.php?payment_id=<?php 
            echo htmlspecialchars($RowSearch['session_id']);
            ?>
"  class='iframe medium_modal' ><?php 
            echo $RowSearch['check_date'] == '0000-00-00' ? '&nbsp;' : htmlspecialchars(oeFormatShortDate($RowSearch['check_date']));
            ?>
</a></td>
								<td class="<?php 
            echo $StringClass;
            ?>
" ><a href="edit_payment.php?payment_id=<?php 
            echo htmlspecialchars($RowSearch['session_id']);
            ?>
"  class='iframe medium_modal'  ><?php 
            $frow['data_type'] = 1;
            $frow['list_id'] = 'payment_type';
            $PaymentType = '';
            if ($RowSearch['payment_type'] == 'insurance' || $RowSearch['payer_id'] * 1 > 0) {
                $PaymentType = 'insurance';
            } elseif ($RowSearch['payment_type'] == 'patient' || $RowSearch['patient_id'] * 1 > 0) {
  &nbsp;<?php 
               echo $docname == $docrow['docname'] ? "" : $docname;
               ?>
 </td>
 <td>
  &nbsp;<?php 
               /*****************************************************************
                  if ($form_to_date) {
                      echo $row['pc_eventDate'] . '<br>';
                      echo substr($row['pc_startTime'], 0, 5);
                  }
                  *****************************************************************/
               if (empty($row['pc_eventDate'])) {
                   echo oeFormatShortDate(substr($row['encdate'], 0, 10));
               } else {
                   echo oeFormatShortDate($row['pc_eventDate']) . ' ' . substr($row['pc_startTime'], 0, 5);
               }
               ?>
 </td>
 <td>
  &nbsp;<?php 
               echo $row['fname'] . " " . $row['lname'];
               ?>
 </td>
 <td>
  &nbsp;<?php 
               echo $row['pubpid'];
               ?>
 </td>
 <td align='right'>
  <?php 
示例#12
0
function write_form_line($code_type, $code, $id, $date, $description, $amount, $units, $taxrates)
{
    global $lino;
    $amount = sprintf("%01.2f", $amount);
    if (empty($units)) {
        $units = 1;
    }
    $price = $amount / $units;
    // should be even cents, but ok here if not
    if ($code_type == 'COPAY' && !$description) {
        $description = xl('Payment');
    }
    echo " <tr>\n";
    echo "  <td>" . text(oeFormatShortDate($date));
    echo "<input type='hidden' name='line[{$lino}][code_type]' value='" . attr($code_type) . "'>";
    echo "<input type='hidden' name='line[{$lino}][code]' value='" . attr($code) . "'>";
    echo "<input type='hidden' name='line[{$lino}][id]' value='" . attr($id) . "'>";
    echo "<input type='hidden' name='line[{$lino}][description]' value='" . attr($description) . "'>";
    echo "<input type='hidden' name='line[{$lino}][taxrates]' value='" . attr($taxrates) . "'>";
    echo "<input type='hidden' name='line[{$lino}][price]' value='" . attr($price) . "'>";
    echo "<input type='hidden' name='line[{$lino}][units]' value='" . attr($units) . "'>";
    echo "</td>\n";
    echo "  <td>" . text($description) . "</td>";
    echo "  <td align='right'>" . text($units) . "</td>";
    echo "  <td align='right'><input type='text' name='line[{$lino}][amount]' " . "value='" . attr($amount) . "' size='6' maxlength='8'";
    // Modifying prices requires the acct/disc permission.
    // if ($code_type == 'TAX' || ($code_type != 'COPAY' && !acl_check('acct','disc')))
    echo " style='text-align:right;background-color:transparent' readonly";
    // else echo " style='text-align:right' onkeyup='computeTotals()'";
    echo "></td>\n";
    echo " </tr>\n";
    ++$lino;
}
示例#13
0
                     if ($insco_name) {
                         $html .= "&nbsp;{$insco_name}";
                     } else {
                         $html .= "&nbsp;<font color='red'><b>Missing Name</b></font>";
                     }
                 }
             }
         }
     } else {
         // IPPF wants a visit date box with the current date in it.
         $html .= xl('Visit date', 'r');
         $html .= ":<br />\n";
         if (!empty($encdata)) {
             $html .= substr($encdata['date'], 0, 10);
         } else {
             $html .= oeFormatShortDate(date('Y-m-d')) . "\n";
         }
     }
     $html .= "</td>\n</tr>\n<tr>\n<td colspan='4' valign='top' class='fshead' style='height:{$lheight}pt'>";
     $html .= xl('Prior Visit', 'r');
     $html .= ":<br />\n</td>\n</tr>\n<tr>\n<td colspan='4' valign='top' class='fshead' style='height:{$lheight}pt'>";
     $html .= xl('Today\'s Charges', 'r');
     $html .= ":<br />\n</td>\n</tr>\n<tr>\n<td colspan='4' valign='top' class='fshead' style='height:{$lheight}pt'>";
     $html .= xl('Today\'s Balance', 'r');
     $html .= ":<br />\n</td>\n</tr>\n<tr>\n<td colspan='4' valign='top' class='fshead' style='height:{$lheight}pt'>";
     $html .= xl('Notes', 'r');
     $html .= ":<br />\n</td>\n</tr>";
 }
 // end if last page
 $html .= "</table>\n</td>\n<td valign='top'>\n<table border='0' cellspacing='0' cellpadding='0' width='100%'>\n<tr>\n<td class='toprow' style='width:10%'></td>\n<td class='toprow' style='width:10%'></td>\n<td class='toprow' style='width:25%'></td>\n<td class='toprow' style='width:55%'></td>\n</tr>";
 $cindex = genColumn($cindex);
示例#14
0
Calendar.setup({inputField:"form_onset_date", ifFormat:"%Y-%m-%d", button:"img_form_onset_date"});
<?php 
if (!$viewmode) {
    ?>
 function duplicateVisit(enc, datestr) {
    if (!confirm('<?php 
    echo xl("A visit already exists for this patient today. Click Cancel to open it, or OK to proceed with creating a new one.");
    ?>
')) {
            // User pressed the cancel button, so re-direct to today's encounter
            top.restoreSession();
            parent.left_nav.setEncounter(datestr, enc, window.name);
            parent.left_nav.setRadio(window.name, 'enc');
            parent.left_nav.loadFrame('enc2', window.name, 'patient_file/encounter/encounter_top.php?set_encounter=' + enc);
            return;
        }
        // otherwise just continue normally
    }    
<?php 
    // Search for an encounter from today
    $erow = sqlQuery("SELECT fe.encounter, fe.date " . "FROM form_encounter AS fe, forms AS f WHERE " . "fe.pid = ? " . " AND fe.date >= ? " . " AND fe.date <= ? " . " AND " . "f.formdir = 'newpatient' AND f.form_id = fe.id AND f.deleted = 0 " . "ORDER BY fe.encounter DESC LIMIT 1", array($pid, date('Y-m-d 00:00:00'), date('Y-m-d 23:59:59')));
    if (!empty($erow['encounter'])) {
        // If there is an encounter from today then present the duplicate visit dialog
        echo "duplicateVisit('" . $erow['encounter'] . "', '" . oeFormatShortDate(substr($erow['date'], 0, 10)) . "');\n";
    }
}
?>
</script>

</html>
示例#15
0
</b></td>
				<td><b><?php 
                echo htmlspecialchars(xl('Code'), ENT_NOQUOTES);
                ?>
</b></td>
				<td><b><?php 
                echo htmlspecialchars(xl('Encounter ID'), ENT_NOQUOTES);
                ?>
</b></td>
				<td colspan=8><b><?php 
                echo htmlspecialchars(xl('Code Text'), ENT_NOQUOTES);
                ?>
</b></td></tr>
	                        <tr bgcolor="#FFFFFF">
				<td><?php 
                echo htmlspecialchars(oeFormatShortDate($row['date']), ENT_NOQUOTES);
                ?>
&nbsp;</td>
			        <td><?php 
                echo htmlspecialchars($row['code'], ENT_NOQUOTES);
                ?>
&nbsp;</td>
                		<td><?php 
                echo htmlspecialchars($row['encounter'], ENT_NOQUOTES);
                ?>
&nbsp;</td>      
				<td colspan=8><?php 
                echo htmlspecialchars($row['code_text'], ENT_NOQUOTES);
                ?>
&nbsp;</td>
	                        </tr>
示例#16
0
function generate_order_summary($orderid)
{
    // If requested, save checkbox selections as to which procedures are not sendable.
    if ($_POST['bn_save']) {
        sqlStatement("UPDATE procedure_order_code " . "SET do_not_send = 0 WHERE " . "procedure_order_id = ? AND " . "do_not_send != 0", array($orderid));
        if (!empty($_POST['form_omit'])) {
            foreach ($_POST['form_omit'] as $key) {
                sqlStatement("UPDATE procedure_order_code " . "SET do_not_send = 1 WHERE " . "procedure_order_id = ? AND " . "do_not_send = 0 AND " . "procedure_order_seq = ?", array($orderid, intval($key)));
            }
        }
    }
    $orow = sqlQuery("SELECT " . "po.procedure_order_id, po.patient_id, po.date_ordered, po.order_status, " . "po.date_collected, po.specimen_type, po.specimen_location, po.lab_id, po.clinical_hx, " . "pd.pubpid, pd.lname, pd.fname, pd.mname, pd.DOB, pd.sex, " . "pd.street, pd.city, pd.state, pd.postal_code, " . "fe.date, " . "pp.name AS labname, " . "u.lname AS ulname, u.fname AS ufname, u.mname AS umname, " . "ru.lname AS ref_lname, ru.fname AS ref_fname, ru.mname AS ref_mname, " . "ru.street AS ref_street, ru.city AS ref_city, ru.state AS ref_state, ru.zip AS ref_zip " . "FROM procedure_order AS po " . "LEFT JOIN patient_data AS pd ON pd.pid = po.patient_id " . "LEFT JOIN procedure_providers AS pp ON pp.ppid = po.lab_id " . "LEFT JOIN users AS u ON u.id = po.provider_id " . "LEFT JOIN users AS ru ON ru.id = pd.ref_providerID " . "LEFT JOIN form_encounter AS fe ON fe.pid = po.patient_id AND fe.encounter = po.encounter_id " . "WHERE po.procedure_order_id = ?", array($orderid));
    $lab_id = intval($orow['lab_id']);
    $patient_id = intval($orow['patient_id']);
    $encdate = substr($orow['date'], 0, 10);
    // Get insurance info.
    $ins_policy = '';
    $ins_group = '';
    $ins_name = '';
    $ins_addr = '';
    $ins_city = '';
    $ins_state = '';
    $ins_zip = '';
    $irow = getInsuranceDataByDate($patient_id, $encdate, 'primary', "insd.provider, insd.policy_number, insd.group_number");
    if (!empty($irow['provider'])) {
        $ins_policy = $irow['policy_number'];
        $ins_group = $irow['group_number'];
        $insco = new InsuranceCompany($irow['provider']);
        if (!empty($insco)) {
            $ins_name = $insco->get_name();
            $tmp = $insco->get_address();
            $ins_addr = $tmp->get_line1();
            $ins_city = $tmp->get_city();
            $ins_state = $tmp->get_state();
            $ins_zip = $tmp->get_zip();
        }
    }
    ?>

<style>

.ordsum tr.head   { font-size:10pt; background-color:#cccccc; text-align:center; }
.ordsum tr.detail { font-size:10pt; }
.ordsum a, .ordsum a:visited, .ordsum a:hover { color:#0000cc; }

.ordsum table {
 border-style: solid;
 border-width: 1px 0px 0px 1px;
 border-color: black;
}

.ordsum td, .ordsum th {
 border-style: solid;
 border-width: 0px 1px 1px 0px;
 border-color: black;
}

/* specifically exclude from printing */
@media print {
 .unprintable {
  visibility: hidden;
  display: none;
 }
}

</style>

<form method='post' action='order_manifest.php?orderid=<?php 
    echo $orderid;
    ?>
'>

<div class='ordsum'>

<table width='100%' cellpadding='2' cellspacing='0'>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Patient Name');
    ?>
</td>
  <td><?php 
    echo myCellText($orow['lname'] . ', ' . $orow['fname'] . ' ' . $orow['mname']);
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Ordered By');
    ?>
</td>
  <td><?php 
    echo myCellText($orow['ulname'] . ', ' . $orow['ufname'] . ' ' . $orow['umname']);
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td width='5%' nowrap><?php 
    echo xlt('MRN (pid)');
    ?>
</td>
  <td width='45%'><?php 
    echo myCellText($patient_id);
    ?>
</td>
  <td width='5%' nowrap><?php 
    echo xlt('Order ID');
    ?>
</td>
  <td width='45%'><?php 
    echo myCellText($orow['procedure_order_id']);
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Encounter Date');
    ?>
</td>
  <td><?php 
    echo myCellText(oeFormatShortDate($encdate));
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Order Date');
    ?>
</td>
  <td><?php 
    echo myCellText(oeFormatShortDate($orow['date_ordered']));
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Birth Date');
    ?>
</td>
  <td><?php 
    echo myCellText(oeFormatShortDate($orow['DOB']));
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Lab');
    ?>
</td>
  <td><?php 
    echo myCellText($orow['labname']);
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Sex');
    ?>
</td>
  <td><?php 
    echo myCellText(getListItem('sex', $orow['sex']));
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Specimen Type');
    ?>
</td>
  <td><?php 
    echo myCellText($orow['specimen_type']);
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Address');
    ?>
</td>
  <td><?php 
    echo myCellText($orow['street'] . ', ' . $orow['city'] . ', ' . $orow['state'] . ' ' . $orow['postal_code']);
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Collection Date');
    ?>
</td>
  <td><?php 
    echo myCellText(oeFormatShortDate($orow['date_collected']));
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Ins Name');
    ?>
</td>
  <td><?php 
    echo myCellText($ins_name);
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Clinical History');
    ?>
</td>
  <td><?php 
    echo myCellText($orow['clinical_hx']);
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Ins Address');
    ?>
</td>
  <td><?php 
    echo myCellText("{$ins_addr}, {$ins_city}, {$ins_state} {$ins_zip}");
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Order Status');
    ?>
</td>
  <td><?php 
    echo myCellText(getListItem('ord_status', $orow['order_status']));
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Ins Policy');
    ?>
</td>
  <td><?php 
    echo myCellText($ins_policy);
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Referrer');
    ?>
</td>
  <td><?php 
    echo myCellText($orow['ref_lname'] . ', ' . $orow['ref_fname'] . ' ' . $orow['ref_mname']);
    ?>
</td>
 </tr>
 <tr bgcolor='#cccccc'>
  <td nowrap><?php 
    echo xlt('Ins Group');
    ?>
</td>
  <td><?php 
    echo myCellText($ins_group);
    ?>
</td>
  <td nowrap><?php 
    echo xlt('Referrer Address');
    ?>
</td>
  <td><?php 
    echo myCellText($orow['ref_street'] . ', ' . $orow['ref_city'] . ', ' . $orow['ref_state'] . ' ' . $orow['ref_zip']);
    ?>
</td>
 </tr>
</table>

&nbsp;<br />

<table width='100%' cellpadding='2' cellspacing='0'>

 <tr class='head'>
  <td><?php 
    echo xlt('Omit');
    ?>
</td>
  <td><?php 
    echo xlt('Code');
    ?>
</td>
  <td><?php 
    echo xlt('Description');
    ?>
</td>
  <td><?php 
    echo xlt('Diagnoses');
    ?>
</td>
  <td><?php 
    echo xlt('Notes');
    ?>
</td>
 </tr>

<?php 
    $query = "SELECT " . "procedure_order_seq, procedure_code, procedure_name, diagnoses, do_not_send " . "FROM procedure_order_code WHERE " . "procedure_order_id =  ? ";
    if (!empty($_POST['bn_show_sendable'])) {
        $query .= "AND do_not_send = 0 ";
    }
    $query .= "ORDER BY procedure_order_seq";
    $res = sqlStatement($query, array($orderid));
    $encount = 0;
    while ($row = sqlFetchArray($res)) {
        $order_seq = empty($row['procedure_order_seq']) ? 0 : $row['procedure_order_seq'] + 0;
        $procedure_code = empty($row['procedure_code']) ? '' : $row['procedure_code'];
        $procedure_name = empty($row['procedure_name']) ? '' : $row['procedure_name'];
        $diagnoses = empty($row['diagnoses']) ? '' : $row['diagnoses'];
        // Create a string of HTML representing the procedure answers.
        // This code cloned from gen_hl7_order.inc.php.
        // Should maybe refactor it into something like a ProcedureAnswer class.
        $qres = sqlStatement("SELECT " . "a.question_code, a.answer, q.fldtype, q.question_text " . "FROM procedure_answers AS a " . "LEFT JOIN procedure_questions AS q ON " . "q.lab_id = ? " . "AND q.procedure_code = ? AND " . "q.question_code = a.question_code " . "WHERE " . "a.procedure_order_id = ? AND " . "a.procedure_order_seq = ? " . "ORDER BY q.seq, a.answer_seq", array($lab_id, $procedure_code, $orderid, $order_seq));
        $notes = '';
        while ($qrow = sqlFetchArray($qres)) {
            // Formatting of these answer values may be lab-specific and we'll figure
            // out how to deal with that as more labs are supported.
            $answer = trim($qrow['answer']);
            $fldtype = $qrow['fldtype'];
            if ($fldtype == 'G') {
                $weeks = intval($answer / 7);
                $days = $answer % 7;
                $answer = $weeks . 'wks ' . $days . 'days';
            }
            if ($notes) {
                $notes .= '<br />';
            }
            $notes .= text($qrow['question_text'] . ': ' . $answer);
        }
        if ($notes === '') {
            $notes = '&nbsp;';
        }
        ++$encount;
        $bgcolor = "#" . ($encount & 1 ? "ddddff" : "ffdddd");
        echo " <tr class='detail' bgcolor='{$bgcolor}'>\n";
        echo "  <td><input type='checkbox' name='form_omit[{$order_seq}]' value='1'";
        if (!empty($row['do_not_send'])) {
            echo " checked";
        }
        echo " /></td>\n";
        echo "  <td>" . myCellText("{$procedure_code}") . "</td>\n";
        echo "  <td>" . myCellText("{$procedure_name}") . "</td>\n";
        echo "  <td>" . myCellText("{$diagnoses}") . "</td>\n";
        echo "  <td>{$notes}</td>\n";
        echo " </tr>\n";
    }
    ?>

</table>
</div>

<center>
<p class='unprintable'>
<input type='submit' name='bn_save' value='<?php 
    echo xla('Save omission selections');
    ?>
' />
&nbsp;
<input type='submit' name='bn_show_all' value='<?php 
    echo xla('Show all procedures');
    ?>
' />
&nbsp;
<input type='submit' name='bn_show_sendable' value='<?php 
    echo xla('Show only procedures not omitted');
    ?>
' />
</p>
</center>

</form>

<?php 
}
示例#17
0
							<td width="40" class="left top" ><?php 
                    echo htmlspecialchars(xl('Resn'), ENT_QUOTES);
                    ?>
</td>
							<td width="110" class="left top right" ><?php 
                    echo htmlspecialchars(xl('Follow Up Reason'), ENT_QUOTES);
                    ?>
</td>
						  </tr>
						  <?php 
                }
                while ($RowSearch = sqlFetchArray($ResultSearch)) {
                    $CountIndex++;
                    $CountIndexAbove++;
                    $ServiceDateArray = explode(' ', $RowSearch['date']);
                    $ServiceDate = oeFormatShortDate($ServiceDateArray[0]);
                    $Codetype = $RowSearch['code_type'];
                    $Code = $RowSearch['code'];
                    $Modifier = $RowSearch['modifier'];
                    if ($Modifier != '') {
                        $ModifierString = ", {$Modifier}";
                    } else {
                        $ModifierString = "";
                    }
                    $Fee = $RowSearch['fee'];
                    $Encounter = $RowSearch['encounter'];
                    $resPayer = sqlStatement("SELECT  payer_type from ar_activity where  session_id ='{$payment_id}' and\n\t\t\t\t\t\t\t\tpid ='{$PId}' and  encounter  ='{$Encounter}' and code_type='{$Codetype}' and code='{$Code}' and modifier='{$Modifier}' ");
                    $rowPayer = sqlFetchArray($resPayer);
                    $Ins = $rowPayer['payer_type'];
                    //Always associating the copay to a particular charge.
                    $BillingId = $RowSearch['id'];
示例#18
0
            echo $row['id'];
            ?>
"
    target="_blank"><?php 
            echo $row['invnumber'];
            ?>
</a>
  </td>
  <td class="detail">
   &nbsp;<?php 
            echo oeFormatShortDate($svcdate);
            ?>
  </td>
  <td class="detail">
   &nbsp;<?php 
            echo oeFormatShortDate($row['duedate']);
            ?>
  </td>
  <td class="detail" align="right">
   <?php 
            bucks($row['charges']);
            ?>
&nbsp;
  </td>
  <td class="detail" align="right">
   <?php 
            bucks($row['adjustments']);
            ?>
&nbsp;
  </td>
  <td class="detail" align="right">
    echo xlt('Destination');
    ?>
 </th>
 </thead>
 <tbody>
<?php 
    $row = array();
    if (!empty($ptrow)) {
        $query = "SELECT ct.ct_when, ct.ct_userid, ct.ct_location, " . "u.username, u.fname, u.mname, u.lname " . "FROM chart_tracker AS ct " . "LEFT OUTER JOIN users AS u ON u.id = ct.ct_userid " . "WHERE ct.ct_pid = ? " . "ORDER BY ct.ct_when DESC";
        $res = sqlStatement($query, array($curr_pid));
        while ($row = sqlFetchArray($res)) {
            ?>
 <tr>
  <td>
   <?php 
            echo text(oeFormatShortDate(substr($row['ct_when'], 0, 10))) . text(substr($row['ct_when'], 10));
            ?>
  </td>
  <td>
<?php 
            if (!empty($row['ct_location'])) {
                echo generate_display_field(array('data_type' => '1', 'list_id' => 'chartloc'), $row['ct_location']);
            } else {
                if (!empty($row['ct_userid'])) {
                    echo text($row['lname']) . ', ' . text($row['fname']) . ' ' . text($row['mname']);
                }
            }
            ?>
  </td>
 </tr>
<?php 
示例#20
0
 * @author Terry Hill <*****@*****.**>
 * @link http://www.open-emr.org 
 */
// I used the program example supplied with the Avery Label Print Class to produce this program
$fake_register_globals = false;
$sanitize_all_escapes = true;
require_once "../globals.php";
require_once "{$srcdir}/classes/PDF_Label.php";
require_once "{$srcdir}/formatting.inc.php";
//Get the data to place on labels
//
$patdata = sqlQuery("SELECT " . "p.fname, p.mname, p.lname, p.pubpid, p.DOB, " . "p.street, p.city, p.state, p.postal_code, p.pid " . "FROM patient_data AS p " . "WHERE p.pid = ? LIMIT 1", array($pid));
// re-order the dates
//
$today = oeFormatShortDate($date = 'today');
$dob = oeFormatShortDate($patdata['DOB']);
//get label type and number of labels on sheet
//
if ($GLOBALS['chart_label_type'] == '1') {
    $pdf = new PDF_Label('5160');
    $last = 30;
}
if ($GLOBALS['chart_label_type'] == '2') {
    $pdf = new PDF_Label('5161');
    $last = 20;
}
if ($GLOBALS['chart_label_type'] == '3') {
    $pdf = new PDF_Label('5162');
    $last = 14;
}
$pdf->AddPage();
                $docname = empty($tmp) ? 'Unknown' : $tmp['fname'] . ' ' . $tmp['lname'];
                $docnameleft = $docname;
            }
            if ($_POST['form_details']) {
                ?>

 <tr>
  <td class="detail">
   <?php 
                echo $docnameleft;
                $docnameleft = "&nbsp;";
                ?>
  </td>
  <td class="detail">
   <?php 
                echo oeFormatShortDate($row['transdate']);
                ?>
  </td>
<?php 
                if ($form_procedures) {
                    ?>
  <td class="detail">
   <?php 
                    echo empty($row['irnumber']) ? $row['invnumber'] : $row['irnumber'];
                    ?>
  </td>
<?php 
                }
                if ($form_cptcode) {
                    echo "  <td class='detail' align='right'>";
                    if ($INTEGRATED_AR) {
示例#22
0
}
// Check authorization for pending review.
$reviewauth = acl_check('patients', 'sign');
if ($form_review and !$reviewauth and !$thisauth) {
    die(xl('Not authorized'));
}
// Set pid for pending review.
if ($_GET['set_pid'] && $form_review) {
    require_once "{$srcdir}/pid.inc";
    require_once "{$srcdir}/patient.inc";
    setpid($_GET['set_pid']);
    $result = getPatientData($pid, "*, DATE_FORMAT(DOB,'%Y-%m-%d') as DOB_YMD");
    ?>
  <script language='JavaScript'>
    parent.left_nav.setPatient(<?php 
    echo "'" . addslashes($result['fname']) . " " . addslashes($result['lname']) . "',{$pid},'" . addslashes($result['pubpid']) . "','', ' " . xl('DOB') . ": " . oeFormatShortDate($result['DOB_YMD']) . " " . xl('Age') . ": " . getPatientAge($result['DOB_YMD']) . "'";
    ?>
);
    parent.left_nav.setRadio(window.name, 'orp');
  </script>
  <?php 
}
if (!$form_batch && !$pid && !$form_review) {
    die(xl('There is no current patient'));
}
function oresRawData($name, $index)
{
    $s = isset($_POST[$name][$index]) ? $_POST[$name][$index] : '';
    return trim(strip_escape_custom($s));
}
function oresData($name, $index)
示例#23
0
function thisLineItem($patient_id, $encounter_id, $description, $transdate, $qty, $cypfactor, $irnumber = '')
{
    global $product, $productcyp, $producttotal, $productqty, $grandtotal, $grandqty;
    $invnumber = empty($irnumber) ? "{$patient_id}.{$encounter_id}" : $irnumber;
    $rowcyp = sprintf('%01.2f', $cypfactor);
    $rowresult = sprintf('%01.2f', $rowcyp * $qty);
    $rowproduct = $description;
    if (!$rowproduct) {
        $rowproduct = 'Unknown';
    }
    if ($product != $rowproduct) {
        if ($product) {
            // Print product total.
            if ($_POST['form_csvexport']) {
                if (!$_POST['form_details']) {
                    echo '"' . display_desc($product) . '",';
                    echo '"' . $productqty . '",';
                    echo '"' . formatcyp($productcyp) . '",';
                    echo '"' . formatcyp($producttotal) . '"' . "\n";
                }
            } else {
                ?>

 <tr bgcolor="#ddddff">
  <td class="detail" colspan="<?php 
                echo $_POST['form_details'] ? 3 : 1;
                ?>
">
   <?php 
                if ($_POST['form_details']) {
                    echo xl('Total for ');
                }
                echo display_desc($product);
                ?>
  </td>
  <td class="dehead" align="right">
   <?php 
                echo $productqty;
                ?>
  </td>
  <td class="dehead" align="right">
   <?php 
                echo formatcyp($productcyp);
                ?>
  </td>
  <td class="dehead" align="right">
   <?php 
                echo formatcyp($producttotal);
                ?>
  </td>
 </tr>
<?php 
            }
            // End not csv export
        }
        $producttotal = 0;
        $productqty = 0;
        $product = $rowproduct;
        $productleft = $product;
        $productcyp = $rowcyp;
    }
    if ($_POST['form_details']) {
        if ($_POST['form_csvexport']) {
            echo '"' . display_desc($product) . '",';
            echo '"' . oeFormatShortDate(display_desc($transdate)) . '",';
            echo '"' . display_desc($invnumber) . '",';
            echo '"' . display_desc($qty) . '",';
            echo '"' . formatcyp($rowcyp) . '",';
            echo '"' . formatcyp($rowresult) . '"' . "\n";
        } else {
            ?>

 <tr>
  <td class="detail">
   <?php 
            echo display_desc($productleft);
            $productleft = "&nbsp;";
            ?>
  </td>
  <td class="dehead">
   <?php 
            echo oeFormatShortDate($transdate);
            ?>
  </td>
  <td class="detail">
   <?php 
            echo $invnumber;
            ?>
  </td>
  <td class="dehead" align="right">
   <?php 
            echo $qty;
            ?>
  </td>
  <td class="dehead" align="right">
   <?php 
            echo formatcyp($rowcyp);
            ?>
  </td>
  <td class="dehead" align="right">
   <?php 
            echo formatcyp($rowresult);
            ?>
  </td>
 </tr>
<?php 
        }
        // End not csv export
    }
    // end details
    $producttotal += $rowresult;
    $grandtotal += $rowresult;
    $productqty += $qty;
    $grandqty += $qty;
}
示例#24
0
                                 if (!isset($adjustment_reasons[$reason_array[3]])) {
                                     $lhtml .= htmlspecialchars(xl("For code"), ENT_QUOTES) . ' [' . text($reason_array[0]) . '] ' . htmlspecialchars(xl("and modifier"), ENT_QUOTES) . ' [' . text($reason_array[1]) . '] ' . htmlspecialchars(xl("the Denial code is"), ENT_QUOTES) . ' [' . text($reason_array[2]) . ' ' . text($reason_array[3]) . ']';
                                 } else {
                                     $lhtml .= htmlspecialchars(xl("For code"), ENT_QUOTES) . ' [' . text($reason_array[0]) . '] ' . htmlspecialchars(xl("and modifier"), ENT_QUOTES) . ' [' . text($reason_array[1]) . '] ' . htmlspecialchars(xl("the Denial Group code is"), ENT_QUOTES) . ' [' . text($reason_array[2]) . '] ' . htmlspecialchars(xl("and the Reason is"), ENT_QUOTES) . ':- ' . text($adjustment_reasons[$reason_array[3]]);
                                 }
                             }
                         } else {
                             $lhtml .= htmlspecialchars(xl("Not Specified."), ENT_QUOTES);
                         }
                         ++$lcount;
                     }
                 }
             }
         }
         if ($crow['process_time']) {
             $lhtml .= "<br>\n&nbsp;" . text(oeFormatShortDate(substr($crow['process_time'], 0, 10))) . text(substr($crow['process_time'], 10, 6)) . " " . xlt("Claim was generated to file") . " " . "<a href='get_claim_file.php?key=" . attr($crow['process_file']) . "' onclick='top.restoreSession()'>" . text($crow['process_file']) . "</a>";
             ++$lcount;
         }
         $lastcrow = $crow;
     }
     // end while ($crow = sqlFetchArray($cres))
     if ($lastcrow && $lastcrow['status'] == 4) {
         $lhtml .= "<br>\n&nbsp;" . xlt("This claim has been closed.");
         ++$lcount;
     }
     if ($lastcrow && $lastcrow['status'] == 5) {
         $lhtml .= "<br>\n&nbsp;" . xlt("This claim has been canceled.");
         ++$lcount;
     }
 }
 // end if ($iter['id'])
示例#25
0
    echo xlt('Request Description');
    ?>
</th>
			<th style="width:25%" align="left"><?php 
    echo xlt('Requested By');
    ?>
</th>
			<th style="width:15%" align="left"><?php 
    echo xlt('Request Status');
    ?>
</th>
		</tr>
	
		<?php 
    while ($row = sqlFetchArray($resultSet)) {
        $amendmentLink = "<a href=add_edit_amendments.php?id=" . attr($row['amendment_id']) . ">" . oeFormatShortDate($row['amendment_date']) . "</a>";
        ?>
			<tr class="amendmentrow" id="<?php 
        echo attr($row['amendment_id']);
        ?>
">
				<td><input id="check_list[]" name="check_list[]" type="checkbox" value="<?php 
        echo attr($row['amendment_id']);
        ?>
"></td>
				<td class=text><?php 
        echo $amendmentLink;
        ?>
 </td>
				<td class=text><?php 
        echo text($row['amendment_desc']);
示例#26
0
                $gev = "";
            } else {
                $gev = $getevent;
            }
        }
    }
    if ($ret = getEvents(array('sdate' => $get_sdate, 'edate' => $get_edate, 'user' => $form_user, 'sortby' => $_GET['sortby'], 'levent' => $gev, 'tevent' => $tevent))) {
        foreach ($ret as $iter) {
            //translate comments
            $patterns = array('/^success/', '/^failure/', '/ encounter/');
            $replace = array(xl('success'), xl('failure'), xl('encounter', '', ' '));
            $trans_comments = preg_replace($patterns, $replace, $iter["comments"]);
            ?>
 <TR class="oneresult">
  <TD class="text"><?php 
            echo oeFormatShortDate(substr($iter["date"], 0, 10)) . substr($iter["date"], 10);
            ?>
</TD>
  <TD class="text"><?php 
            echo xl($iter["event"]);
            ?>
</TD>
  <TD class="text"><?php 
            echo $iter["user"];
            ?>
</TD>
  <TD class="text"><?php 
            echo $iter["crt_user"];
            ?>
</TD>
  <TD class="text"><?php 
示例#27
0
             $status = xl('Empty');
         }
     }
 }
 $xml_string .= "<visit>";
 $xml_string .= "<provider>" . $docname . "</provider>";
 $xml_string .= "<date>" . oeFormatShortDate(substr($row['date'], 0, 10)) . "</date>";
 $xml_string .= "<patient>" . $row['lname'] . ', ' . $row['fname'] . ' ' . $row['mname'] . "</patient>";
 $xml_string .= "<id>" . $row['pubpid'] . "</id>";
 $xml_string .= "<status>" . $status . "</status>";
 $xml_string .= "<reason>" . trim($row['reason']) . "</reason>";
 $xml_string .= "<form>" . str_replace('<br />', '\\n', $encnames) . "</form>";
 $xml_string .= "<coding>" . $coded . "</coding>";
 $old_docname == '';
 $display_docname = $docname == $old_docname ? '' : $docname;
 $single_record = "\n                            <tr>\n                                <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$display_docname}</td>\n                                <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . oeFormatShortDate(substr($row['date'], 0, 10)) . "</td>\n                                <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . $row['lname'] . ', ' . $row['fname'] . ' ' . $row['mname'] . "</td>\n                                <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . $row['pubpid'] . "</td>\n                                <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . $status . "</td>\n                                    \n                                <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . trim($row['reason']) . "</td>\n                                <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . str_replace('<br />', ',', $encnames) . "</td>\n                                <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . $coded . "</td>\n                            </tr>";
 $html .= $single_record;
 $old_docname = $docname;
 $complete_single_record = $single_record_header . $single_record . "<table></div></body></html>";
 $xml_string .= "<visit_html>" . base64_encode($complete_single_record) . "</visit_html>";
 //                echo $single_record_header .$single_record. "<table></div></body></html>";
 //                $pdf1 = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
 //                $pdf1->SetCreator(PDF_CREATOR);
 //                $pdf1->SetAuthor("Haroon");
 //                $pdf1->SetTitle("My Report");
 //                $pdf1->SetSubject("My Report");
 ////        $pdf->SetKeywords("TCPDF, PDF, example, test, guide");
 //                $pdf1->setPrintHeader(false);
 //                $pdf1->setPrintFooter(false);
 //                $pdf1->AliasNbPages();
 //                $pdf1->AddPage();
示例#28
0
            ?>
  </td>
  <td>
   <a href='#' onclick="return show_referral(<?php 
            echo $row['id'];
            ?>
)">
   <?php 
            echo oeFormatShortDate($row['refer_date']);
            ?>
&nbsp;
   </a>
  </td>
  <td>
   <?php 
            echo oeFormatShortDate($row['reply_date']);
            ?>
  </td>
  <td>
   <?php 
            echo $row['patient_name'];
            ?>
  </td>
  <td>
   <?php 
            echo $row['pubpid'];
            ?>
  </td>
  <td>
   <?php 
            echo text($row['body']);
示例#29
0
        $note = '';
        if ($noteData) {
            $notes = array();
            $notes = explode("|", $noteData['docNotes']);
            $dates = explode("|", $noteData['docDates']);
            for ($i = 0; $i < count($notes); $i++) {
                $note .= oeFormatShortDate(date('Y-m-d', strtotime($dates[$i]))) . " : " . $notes[$i] . "\n";
            }
        }
        ?>
	<br>
	<a href="<?php 
        echo $doc_url;
        ?>
" style="font-size:small;" onsubmit="return top.restoreSession()"><?php 
        echo oeFormatShortDate($doc_iter[docdate]) . ": " . text(basename($doc_iter[url]));
        ?>
</a>
	<?php 
        if ($note != '') {
            ?>
 
			<a href="javascript:void(0);" title="<?php 
            echo attr($note);
            ?>
"><img src="../../../images/info.png"/></a>
	<?php 
        }
    }
    ?>
</div>
示例#30
0
<body class="body_top">

<form method="post" action="<?php 
echo $rootdir;
?>
/forms/procedure_order/new.php?id=<?php 
echo $formid;
?>
"
 onsubmit="return validate(this)">

<p class='title' style='margin-top:8px;margin-bottom:8px;text-align:center'>
<?php 
echo xl('Procedure Order for') . ' ';
echo $enrow['fname'] . ' ' . $enrow['mname'] . ' ' . $enrow['lname'];
echo ' ' . xl('on') . ' ' . oeFormatShortDate(substr($enrow['date'], 0, 10));
?>
</p>

<center>

<p>
<table border='1' width='95%' id='proctable'>

 <tr>
  <td width='1%' valign='top' nowrap><b><?php 
xl('Ordering Provider', 'e');
?>
:</b></td>
  <td valign='top'>
<?php