当前位置: 首页>>代码示例>>PHP>>正文


PHP get_invoice_summary函数代码示例

本文整理汇总了PHP中get_invoice_summary函数的典型用法代码示例。如果您正苦于以下问题:PHP get_invoice_summary函数的具体用法?PHP get_invoice_summary怎么用?PHP get_invoice_summary使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_invoice_summary函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 if ($subresult2 = getBillingByEncounter($pid, $result4['encounter'], "code_type, code, modifier, code_text, fee")) {
     // Get A/R info, if available, for this encounter.
     $arinvoice = array();
     $arlinkbeg = "";
     $arlinkend = "";
     if ($billing_view && $accounting_enabled) {
         if ($INTEGRATED_AR) {
             $tmp = sqlQuery("SELECT id FROM form_encounter WHERE " . "pid = ? AND encounter = ?", array($pid, $result4['encounter']));
             $arid = 0 + $tmp['id'];
             if ($arid) {
                 $arinvoice = ar_get_invoice_summary($pid, $result4['encounter'], true);
             }
         } else {
             $arid = SLQueryValue("SELECT id FROM ar WHERE invnumber = " . "'{$pid}.{$result4['encounter']}'");
             if ($arid) {
                 $arinvoice = get_invoice_summary($arid, true);
             }
         }
         if ($arid) {
             $arlinkbeg = "<a href='../../billing/sl_eob_invoice.php?id=" . htmlspecialchars($arid, ENT_QUOTES) . "'" . " target='_blank' class='text' style='color:#00cc00'>";
             $arlinkend = "</a>";
         }
     }
     // Throw in product sales.
     $query = "SELECT s.drug_id, s.fee, d.name " . "FROM drug_sales AS s " . "LEFT JOIN drugs AS d ON d.drug_id = s.drug_id " . "WHERE s.pid = ? AND s.encounter = ? " . "ORDER BY s.sale_id";
     $sres = sqlStatement($query, array($pid, $result4['encounter']));
     while ($srow = sqlFetchArray($sres)) {
         $subresult2[] = array('code_type' => 'PROD', 'code' => 'PROD:' . $srow['drug_id'], 'modifier' => '', 'code_text' => $srow['name'], 'fee' => $srow['fee']);
     }
     // This creates 5 columns of billing information:
     // billing code, charges, payments, adjustments, balance.
开发者ID:nitinkunte,项目名称:openemr,代码行数:31,代码来源:encounters.php

示例2: array

     if ($row['address2']) {
         $stmt['to'][] = $row['address2'];
     }
     $stmt['to'][] = $row['city'] . ", " . $row['state'] . " " . $row['zipcode'];
     $stmt['lines'] = array();
     $stmt['amount'] = '0.00';
     $stmt['today'] = $today;
     $stmt['duedate'] = $row['duedate'];
 } else {
     // Report the oldest due date.
     if ($row['duedate'] < $stmt['duedate']) {
         $stmt['duedate'] = $row['duedate'];
     }
 }
 $stmt['age'] = round((strtotime($today) - strtotime($stmt['duedate'])) / (24 * 60 * 60));
 $invlines = get_invoice_summary($row['id'], true);
 // true added by Rod 2006-06-09
 foreach ($invlines as $key => $value) {
     $line = array();
     $line['dos'] = $svcdate;
     $line['desc'] = $key == 'CO-PAY' ? "Patient Payment" : "Procedure {$key}";
     $line['amount'] = sprintf("%.2f", $value['chg']);
     $line['adjust'] = sprintf("%.2f", $value['adj']);
     $line['paid'] = sprintf("%.2f", $value['chg'] - $value['bal']);
     $line['notice'] = $duncount + 1;
     $line['detail'] = $value['dtl'];
     // Added by Rod 2006-06-09
     $stmt['lines'][] = $line;
     $stmt['amount'] = sprintf("%.2f", $stmt['amount'] + $value['bal']);
 }
 // Record something in ar.intnotes about this statement run.
开发者ID:katopenzz,项目名称:openemr,代码行数:31,代码来源:sl_eob_search.php

示例3: list

    // Determine the date of service.  An 8-digit encounter number is
    // presumed to be a date of service imported during conversion.
    // Otherwise look it up in the form_encounter table.
    //
    $svcdate = "";
    list($patient_id, $encounter) = explode(".", $arrow['invnumber']);
    if (strlen($encounter) == 8) {
        $svcdate = substr($encounter, 0, 4) . "-" . substr($encounter, 4, 2) . "-" . substr($encounter, 6, 2);
    } else {
        if ($encounter) {
            $tmp = sqlQuery("SELECT date FROM form_encounter WHERE " . "encounter = {$encounter}");
            $svcdate = substr($tmp['date'], 0, 10);
        }
    }
    // Get invoice charge details.
    $codes = get_invoice_summary($trans_id, true);
}
$pdrow = sqlQuery("select genericname2, genericval2 " . "from patient_data where pid = '{$patient_id}' limit 1");
?>
<center>

<form method='post' action='sl_eob_invoice.php?id=<?php 
echo $trans_id;
?>
'
 onsubmit='return validate(this)'>

<table border='0' cellpadding='3'>
 <tr>
  <td>
   <?php 
开发者ID:robonology,项目名称:openemr,代码行数:31,代码来源:sl_eob_invoice.php

示例4: era_callback

function era_callback(&$out)
{
    global $encount, $debug, $claim_status_codes, $adjustment_reasons, $remark_codes;
    global $invoice_total, $last_code, $paydate, $INTEGRATED_AR;
    global $InsertionId;
    //last inserted ID of
    // Some heading information.
    $chk_123 = $out['check_number'];
    $chk_123 = str_replace(' ', '_', $chk_123);
    if (isset($_REQUEST['chk' . $chk_123])) {
        if ($encount == 0) {
            writeMessageLine('#ffffff', 'infdetail', "Payer: " . htmlspecialchars($out['payer_name'], ENT_QUOTES));
            if ($debug) {
                writeMessageLine('#ffffff', 'infdetail', "WITHOUT UPDATE is selected; no changes will be applied.");
            }
        }
        $last_code = '';
        $invoice_total = 0.0;
        $bgcolor = ++$encount & 1 ? "#ddddff" : "#ffdddd";
        list($pid, $encounter, $invnumber) = slInvoiceNumber($out);
        // Get details, if we have them, for the invoice.
        $inverror = true;
        $codes = array();
        if ($pid && $encounter) {
            // Get invoice data into $arrow or $ferow.
            if ($INTEGRATED_AR) {
                $ferow = sqlQuery("SELECT e.*, p.fname, p.mname, p.lname " . "FROM form_encounter AS e, patient_data AS p WHERE " . "e.pid = '{$pid}' AND e.encounter = '{$encounter}' AND " . "p.pid = e.pid");
                if (empty($ferow)) {
                    $pid = $encounter = 0;
                    $invnumber = $out['our_claim_id'];
                } else {
                    $inverror = false;
                    $codes = ar_get_invoice_summary($pid, $encounter, true);
                    // $svcdate = substr($ferow['date'], 0, 10);
                }
            } else {
                $arres = SLQuery("SELECT ar.id, ar.notes, ar.shipvia, customer.name " . "FROM ar, customer WHERE ar.invnumber = '{$invnumber}' AND " . "customer.id = ar.customer_id");
                if ($sl_err) {
                    die($sl_err);
                }
                $arrow = SLGetRow($arres, 0);
                if ($arrow) {
                    $inverror = false;
                    $codes = get_invoice_summary($arrow['id'], true);
                } else {
                    // oops, no such invoice
                    $pid = $encounter = 0;
                    $invnumber = $out['our_claim_id'];
                }
            }
            // end not internal a/r
        }
        // Show the claim status.
        $csc = $out['claim_status_code'];
        $inslabel = 'Ins1';
        if ($csc == '1' || $csc == '19') {
            $inslabel = 'Ins1';
        }
        if ($csc == '2' || $csc == '20') {
            $inslabel = 'Ins2';
        }
        if ($csc == '3' || $csc == '21') {
            $inslabel = 'Ins3';
        }
        $primary = $inslabel == 'Ins1';
        writeMessageLine($bgcolor, 'infdetail', "Claim status {$csc}: " . $claim_status_codes[$csc]);
        // Show an error message if the claim is missing or already posted.
        if ($inverror) {
            writeMessageLine($bgcolor, 'errdetail', "The following claim is not in our database");
        } else {
            // Skip this test. Claims can get multiple CLPs from the same payer!
            //
            // $insdone = strtolower($arrow['shipvia']);
            // if (strpos($insdone, 'ins1') !== false) {
            //  $inverror = true;
            //  writeMessageLine($bgcolor, 'errdetail',
            //   "Primary insurance EOB was already posted for the following claim");
            // }
        }
        if ($csc == '4') {
            //Denial case, code is stored in the claims table for display in the billing manager screen with reason explained.
            $inverror = true;
            if (!$debug) {
                if ($pid && $encounter) {
                    $code_value = '';
                    foreach ($out['svc'] as $svc) {
                        foreach ($svc['adj'] as $adj) {
                            //Per code and modifier the reason will be showed in the billing manager.
                            $code_value .= $svc['code'] . '_' . $svc['mod'] . '_' . $adj['group_code'] . '_' . $adj['reason_code'] . ',';
                        }
                    }
                    $code_value = substr($code_value, 0, -1);
                    //We store the reason code to display it with description in the billing manager screen.
                    //process_file is used as for the denial case file name will not be there, and extra field(to store reason) can be avoided.
                    updateClaim(true, $pid, $encounter, $_REQUEST['InsId'], substr($inslabel, 3), 7, 0, $code_value);
                }
            }
            writeMessageLine($bgcolor, 'errdetail', "Not posting adjustments for denied claims, please follow up manually!");
        } else {
            if ($csc == '22') {
//.........这里部分代码省略.........
开发者ID:rreddy70,项目名称:openemr,代码行数:101,代码来源:sl_eob_process.php

示例5: loadPayerInfo

 function loadPayerInfo(&$billrow)
 {
     global $sl_err;
     $encounter_date = substr($this->encounter['date'], 0, 10);
     // Create the $payers array.  This contains data for all insurances
     // with the current one always at index 0, and the others in payment
     // order starting at index 1.
     //
     $this->payers = array();
     $this->payers[0] = array();
     $query = "SELECT * FROM insurance_data WHERE " . "pid = '{$this->pid}' AND " . "date <= '{$encounter_date}' " . "ORDER BY type ASC, date DESC";
     $dres = sqlStatement($query);
     $prevtype = '';
     while ($drow = sqlFetchArray($dres)) {
         if (strcmp($prevtype, $drow['type']) == 0) {
             continue;
         }
         $prevtype = $drow['type'];
         // Very important to look at entries with a missing provider because
         // they indicate no insurance as of the given date.
         if (empty($drow['provider'])) {
             continue;
         }
         $ins = count($this->payers);
         if ($drow['provider'] == $billrow['payer_id'] && empty($this->payers[0]['data'])) {
             $ins = 0;
         }
         $crow = sqlQuery("SELECT * FROM insurance_companies WHERE " . "id = '" . $drow['provider'] . "'");
         $orow = new InsuranceCompany($drow['provider']);
         $this->payers[$ins] = array();
         $this->payers[$ins]['data'] = $drow;
         $this->payers[$ins]['company'] = $crow;
         $this->payers[$ins]['object'] = $orow;
     }
     // This kludge hands most cases of a rare ambiguous situation, where
     // the primary insurance company is the same as the secondary.  It seems
     // nobody planned for that!
     //
     for ($i = 1; $i < count($this->payers); ++$i) {
         if ($billrow['process_date'] && $this->payers[0]['data']['provider'] == $this->payers[$i]['data']['provider']) {
             $tmp = $this->payers[0];
             $this->payers[0] = $this->payers[$i];
             $this->payers[$i] = $tmp;
         }
     }
     $this->using_modifiers = true;
     // Get payment and adjustment details if there are any previous payers.
     //
     $this->invoice = array();
     if ($this->payerSequence() != 'P') {
         if ($GLOBALS['oer_config']['ws_accounting']['enabled'] === 2) {
             $this->invoice = ar_get_invoice_summary($this->pid, $this->encounter_id, true);
         } else {
             if ($GLOBALS['oer_config']['ws_accounting']['enabled']) {
                 SLConnect();
                 $arres = SLQuery("select id from ar where invnumber = " . "'{$this->pid}.{$this->encounter_id}'");
                 if ($sl_err) {
                     die($sl_err);
                 }
                 $arrow = SLGetRow($arres, 0);
                 if ($arrow) {
                     $this->invoice = get_invoice_summary($arrow['id'], true);
                 }
                 SLClose();
             }
         }
         // Secondary claims might not have modifiers in SQL-Ledger data.
         // In that case, note that we should not try to match on them.
         $this->using_modifiers = false;
         foreach ($this->invoice as $key => $trash) {
             if (strpos($key, ':')) {
                 $this->using_modifiers = true;
             }
         }
     }
 }
开发者ID:ranjanprasad,项目名称:openemr,代码行数:76,代码来源:Claim.class.php


注:本文中的get_invoice_summary函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。