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


PHP addBilling函数代码示例

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


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

示例1: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->well_child = new FormWellChild($_POST['id']);
     parent::populate_object($this->well_child);
     $new_form = false;
     if (empty($_POST['id'])) {
         $new_form = true;
     }
     $this->well_child->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     if ($new_form) {
         addForm($GLOBALS['encounter'], "Well Child Visit", $this->well_child->id, "well_child", $GLOBALS['pid'], $_SESSION['userauthorized']);
     }
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . mysql_real_escape_string($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = mysql_fetch_array($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:29,代码来源:C_FormWellChild.class.php

示例2: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->evaluation = new FormEvaluation($_POST['id']);
     parent::populate_object($this->evaluation);
     $this->evaluation->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     addForm($GLOBALS['encounter'], "Evaluation Form", $this->evaluation->id, "evaluation", $GLOBALS['pid'], $_SESSION['userauthorized']);
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . add_escape_custom($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = sqlFetchArray($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:juggernautsei,项目名称:openemr,代码行数:23,代码来源:C_FormEvaluation.class.php

示例3: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->prosthesis = new FormProsthesis($_POST['id']);
     parent::populate_object($this->prosthesis);
     $this->prosthesis->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     addForm($GLOBALS['encounter'], "Prosthesis & Orthotics Form", $this->prosthesis->id, "prosthesis", $GLOBALS['pid'], $_SESSION['userauthorized']);
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . mysql_real_escape_string($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = mysql_fetch_array($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:23,代码来源:C_FormProsthesis.class.php

示例4: die

             die($msg);
         }
     }
 }
 // Post payment.
 if ($_POST['form_amount']) {
     $amount = sprintf('%01.2f', trim($_POST['form_amount']));
     $form_source = trim($_POST['form_source']);
     $paydesc = trim($_POST['form_method']);
     if ($INTEGRATED_AR) {
         // Post the payment as a billed copay into the billing table.
         // Maybe this should even be done for the SL case.
         if (!empty($form_source)) {
             $paydesc .= " {$form_source}";
         }
         addBilling($form_encounter, 'COPAY', $amount, $paydesc, $form_pid, 0, 0, '', '', 0 - $amount, '', '', 1);
     } else {
         $msg = invoice_add_line_item($invoice_info, 'COPAY', $paydesc, $form_source, 0 - $amount);
         if ($msg) {
             die($msg);
         }
     }
 }
 if (!$INTEGRATED_AR) {
     $msg = invoice_post($invoice_info);
     if ($msg) {
         die($msg);
     }
 }
 // If applicable, set the invoice reference number.
 $invoice_refno = '';
开发者ID:robonology,项目名称:openemr,代码行数:31,代码来源:pos_checkout.php

示例5: arPostCharge

function arPostCharge($patient_id, $encounter_id, $session_id, $amount, $units, $thisdate, $code, $description, $debug)
{
    /*****************************************************************
       // Select an existing billing item as a template.
       $row= sqlQuery("SELECT * FROM billing WHERE " .
         "pid = '$patient_id' AND encounter = '$encounter_id' AND " .
         "code_type = 'CPT4' AND activity = 1 " .
         "ORDER BY id DESC LIMIT 1");
       $this_authorized = 0;
       $this_provider = 0;
       if (!empty($row)) {
         $this_authorized = $row['authorized'];
         $this_provider = $row['provider_id'];
       }
       *****************************************************************/
    $codeonly = $code;
    $modifier = '';
    $tmp = strpos($code, ':');
    if ($tmp) {
        $codeonly = substr($code, 0, $tmp);
        $modifier = substr($code, $tmp + 1);
    }
    addBilling($encounter_id, 'CPT4', $codeonly, addslashes($description), $patient_id, 0, 0, $modifier, $units, $amount, '', '');
}
开发者ID:hompothgyorgy,项目名称:openemr,代码行数:24,代码来源:sl_eob.inc.php

示例6: addBilling

$N = 10;
$mode = $_GET['mode'];
$type = $_GET['type'];
$modifier = $_GET['modifier'];
$units = $_GET['units'];
$fee = $_GET['fee'];
$code = $_GET['code'];
$text = $_GET['text'];
if (isset($mode)) {
    if ($mode == "add") {
        if (strtolower($type) == "copay") {
            addBilling($encounter, $type, sprintf("%01.2f", $code), strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID'], $modifier, $units, sprintf("%01.2f", 0 - $code));
        } elseif (strtolower($type) == "other") {
            addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID'], $modifier, $units, sprintf("%01.2f", $fee));
        } else {
            addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID'], $modifier, $units, $fee);
        }
    }
}
?>
<html>
<head>
<?php 
html_header_show();
?>
<link rel="stylesheet" href="<?php 
echo $css_header;
?>
" type="text/css">
</head>
<body class="body_bottom">
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:superbill_codes.php

示例7: arPostCharge

function arPostCharge($patient_id, $encounter_id, $session_id, $amount, $units, $thisdate, $code, $description, $debug, $codetype = '')
{
    /*****************************************************************
       // Select an existing billing item as a template.
       $row= sqlQuery("SELECT * FROM billing WHERE " .
         "pid = '$patient_id' AND encounter = '$encounter_id' AND " .
         "code_type = 'CPT4' AND activity = 1 " .
         "ORDER BY id DESC LIMIT 1");
       $this_authorized = 0;
       $this_provider = 0;
       if (!empty($row)) {
         $this_authorized = $row['authorized'];
         $this_provider = $row['provider_id'];
       }
       *****************************************************************/
    if (empty($codetype)) {
        // default to CPT4 if empty, which is consistent with previous functionality.
        $codetype = "CPT4";
    }
    $codeonly = $code;
    $modifier = '';
    $tmp = strpos($code, ':');
    if ($tmp) {
        $codeonly = substr($code, 0, $tmp);
        $modifier = substr($code, $tmp + 1);
    }
    addBilling($encounter_id, $codetype, $codeonly, $description, $patient_id, 0, 0, $modifier, $units, $amount, '', '');
}
开发者ID:mi-squared,项目名称:openemr,代码行数:28,代码来源:sl_eob.inc.php

示例8: add_escape_custom

$fee = -$amount_paid;
$amount_paid = $feeSum - $discountAmount;
//Post by getfeesheet web serivece for view Only
$itemFee = $_POST['itemFee'];
$date = $_POST['date'];
$units = add_escape_custom($_POST['units']);
$code_type = 'COPAY';
$auth = "1";
if ($userId = validateToken($token)) {
    $user = getUsername($userId);
    $acl_allow = acl_check('acct', 'bill', $user);
    $_SESSION['authUser'] = $user;
    $_SESSION['authGroup'] = $site;
    $_SESSION['pid'] = $patientId;
    if ($acl_allow) {
        addBilling($visit_id, $code_type, $code, $code_text, $patientId, $auth, $provider = "0", $modifier = "0", $units, $fee, $ndc_info = '', $justify = '', $billed = "1", $notecodes = '');
        $strQuery1 = "UPDATE `billing` SET";
        $strQuery1 .= " activity  = 0";
        $strQuery1 .= " WHERE encounter = " . add_escape_custom($visit_id) . " AND pid = " . add_escape_custom($patientId);
        $result1 = sqlStatement($strQuery1);
        $strQuery2 = 'UPDATE `billing` SET';
        $strQuery2 .= ' fee  = "' . add_escape_custom($feeSum) . '",';
        $strQuery2 .= ' bill_date  = "' . date('Y-m-d H:i:s') . '",';
        $strQuery2 .= ' billed  = 1';
        $strQuery2 .= ' WHERE id = ' . add_escape_custom($billing_id);
        $result2 = sqlStatement($strQuery2);
        $strQuery3 = "INSERT INTO ar_activity ( pid, encounter, code, modifier, payer_type, post_user, post_time, session_id, memo, adj_amount ) \n                                            VALUES ( '" . add_escape_custom($patientId) . "',\n                                                    '" . add_escape_custom($visit_id) . "',\n                                                    '',\n                                                    '',\n                                                    '0',\n                                                    '" . $userId . "',\n                                                    '" . date('Y-m-d H:i:s') . "',\\\n                                                    '0',\n                                                    'Discount',\n                                                    '" . add_escape_custom($discountAmount) . "'\n                                                        )";
        $result3 = sqlStatement($strQuery3);
        if ($result1 && $result2 && $result3) {
            $xml_string .= "<status>0</status>";
            $xml_string .= "<reason>The Checkout has been added.</reason>";
开发者ID:jv2003113,项目名称:openemr-api,代码行数:31,代码来源:addcheckout.php

示例9: die

         if ($msg) {
             die($msg);
         }
     }
     if ($code_type == 'PROD') {
         // Product sales. The fee and encounter ID may have changed.
         $query = "update drug_sales SET fee = ?, " . "encounter = ?, billed = 1 WHERE " . "sale_id = ?";
         sqlQuery($query, array($amount, $form_encounter, $id));
     } else {
         if ($code_type == 'TAX') {
             // In the SL case taxes show up on the invoice as line items.
             // Otherwise we gotta save them somewhere, and in the billing
             // table with a code type of TAX seems easiest.
             // They will have to be stripped back out when building this
             // script's input form.
             addBilling($form_encounter, 'TAX', 'TAX', 'Taxes', $form_pid, 0, 0, '', '', $amount, '', '', 1);
         } else {
             // Because there is no insurance here, there is no need for a claims
             // table entry and so we do not call updateClaim().  Note we should not
             // eliminate billed and bill_date from the billing table!
             $query = "UPDATE billing SET fee = ?, billed = 1, " . "bill_date = NOW() WHERE id = ?";
             sqlQuery($query, array($amount, $id));
         }
     }
 }
 // Post discount.
 if ($_POST['form_discount']) {
     if ($GLOBALS['discount_by_money']) {
         $amount = sprintf('%01.2f', trim($_POST['form_discount']));
     } else {
         $amount = sprintf('%01.2f', trim($_POST['form_discount']) * $form_amount / 100);
开发者ID:nitinkunte,项目名称:openemr,代码行数:31,代码来源:pos_checkout.php

示例10: addBilling

<?php

include_once "../../globals.php";
include_once "{$srcdir}/billing.inc";
$targparm = $GLOBALS['concurrent_layout'] ? "" : "target='Main'";
if (isset($mode)) {
    if ($mode == "add") {
        addBilling($encounter, $type, $code, $text, $pid, $userauthorized, $_SESSION['authUserID']);
    } elseif ($mode == "delete") {
        deleteBilling($id);
    } elseif ($mode == "clear") {
        clearBilling($id);
    }
}
?>
<html>
<head>
<?php 
html_header_show();
?>
<link rel="stylesheet" href="<?php 
echo $css_header;
?>
" type="text/css">
</head>

<body class="body_top">

<?php 
if ($GLOBALS['concurrent_layout']) {
    ?>
开发者ID:stephen-smith,项目名称:openemr,代码行数:31,代码来源:diagnosis_full.php

示例11: deleteBilling

                deleteBilling($id);
            } else {
                // authorizeBilling($id, $auth);
                sqlQuery("update billing set fee = '{$fee}', modifier = '{$modifier}', " . "authorized = {$auth}, provider_id = '{$provid}' where " . "id = '{$id}' and billed = 0 and activity = 1");
            }
        } else {
            if (!$del) {
                $query = "select code_text from codes where code_type = '" . $code_types[$code_type]['id'] . "' and " . "code = '{$code}' and ";
                if ($modifier) {
                    $query .= "modifier = '{$modifier}'";
                } else {
                    $query .= "(modifier is null or modifier = '')";
                }
                $result = sqlQuery($query);
                $code_text = addslashes($result['code_text']);
                addBilling($encounter, $code_type, $code, $code_text, $pid, $auth, $provid, $modifier, "", $fee);
            }
        }
    }
    terminate_coding();
    exit;
}
?>

<style>
.billcell { font-family: sans-serif; font-size: 10pt }
</style>
<script language="JavaScript">

// This is invoked by <select onchange> for the various dropdowns,
// including search results.
开发者ID:stephen-smith,项目名称:openemr,代码行数:31,代码来源:coding.inc.php

示例12: getUsername

$discountAmount = !empty($_POST['discountAmount']) ? $_POST['discountAmount'] : 0;
$billing_id = $_POST['billing_id'];
$charges = $fee - $discountAmount;
if ($userId = validateToken($token)) {
    $user = getUsername($userId);
    $acl_allow = acl_check('acct', 'bill', $user);
    // Session variable used in addBilling() function
    $_SESSION['authUser'] = $user;
    if ($acl_allow) {
        if ($code_type == 'TAX') {
            // In the SL case taxes show up on the invoice as line items.
            // Otherwise we gotta save them somewhere, and in the billing
            // table with a code type of TAX seems easiest.
            // They will have to be stripped back out when building this
            // script's input form.
            addBilling($visit_id, 'TAX', 'TAX', 'Taxes', $patientId, 0, 0, '', '', $charges, '', '', 1);
        } else {
            // Because there is no insurance here, there is no need for a claims
            // table entry and so we do not call updateClaim().  Note we should not
            // eliminate billed and bill_date from the billing table!
            $query = "UPDATE billing SET fee = ?, billed = 1, " . "bill_date = NOW() WHERE id = ?";
            sqlQuery($query, array($charges, $billing_id));
        }
        if (!empty($discountAmount)) {
            $time = date('Y-m-d H:i:s');
            $memo = 'Discount';
            $query = "INSERT INTO ar_activity ( " . "pid, encounter, code, modifier, payer_type, post_user, post_time, " . "session_id, memo, adj_amount " . ") VALUES ( " . "?, " . "?, " . "'', " . "'', " . "'0', " . "?, " . "?, " . "'0', " . "?, " . "? " . ")";
            sqlStatement($query, array($patientId, $visit_id, $userId, $time, $memo, $amount));
        }
        if (!empty($charges)) {
            $amount = sprintf('%01.2f', trim($charges));
开发者ID:bharathi26,项目名称:openemr,代码行数:31,代码来源:addcheckout.php

示例13: sqlQuery

     $tmp = sqlQuery("SELECT users.id FROM forms, users WHERE " . "forms.pid = '{$pid}' AND forms.encounter = '{$encounter}' AND " . "forms.formdir='newpatient' AND users.username = forms.user AND " . "users.authorized = 1");
     $provid = $tmp['id'] ? $tmp['id'] : $_SESSION["authUserID"];
     if (strtolower($type) == "copay") {
         addBilling($encounter, $type, sprintf("%01.2f", $code), strip_escape_custom($payment_method), $pid, $userauthorized, $provid, $modifier, $units, sprintf("%01.2f", 0 - $code));
     } elseif (strtolower($type) == "other") {
         addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $provid, $modifier, $units, sprintf("%01.2f", $fee));
     } else {
         $ndc_info = '';
         // If HCPCS, get and save default NDC data.
         if (strtolower($type) == "hcpcs") {
             $tmp = sqlQuery("SELECT ndc_info FROM billing WHERE " . "code_type = 'HCPCS' AND code = '{$code}' AND ndc_info LIKE 'N4%' " . "ORDER BY date DESC LIMIT 1");
             if (!empty($tmp)) {
                 $ndc_info = $tmp['ndc_info'];
             }
         }
         addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $provid, $modifier, $units, $fee, $ndc_info);
     }
 } elseif ($mode == "justify") {
     $diags = $_POST['code']['diag'];
     $procs = $_POST['code']['proc'];
     $sql = array();
     if (!empty($procs) && !empty($diags)) {
         $sql = array();
         foreach ($procs as $proc) {
             $justify_string = "";
             foreach ($diags as $diag) {
                 $justify_string .= $diag . ":";
             }
             $sql[] = "UPDATE billing set justify = concat(justify,'" . add_escape_custom($justify_string) . "') where encounter = '" . add_escape_custom($_POST['encounter_id']) . "' and pid = '" . add_escape_custom($_POST['patient_id']) . "' and code = '" . add_escape_custom($proc) . "'";
         }
     }
开发者ID:mi-squared,项目名称:openemr,代码行数:31,代码来源:diagnosis.php

示例14: max

$modifier = $_POST['modifier'];
$units = max(1, intval(trim($_POST['units'])));
$price = $_POST['price'];
$priceLevel = $_POST['priceLevel'];
$justify = $_POST['justify'];
$ndc_info = !empty($_POST['ndc_info']) ? $_POST['ndc_info'] : '';
$noteCodes = !empty($_POST['noteCodes']) ? $_POST['noteCodes'] : '';
$fee = sprintf('%01.2f', (0 + trim($price)) * $units);
if ($userId = validateToken($token)) {
    $user = getUsername($userId);
    $acl_allow = acl_check('acct', 'bill', $user);
    $_SESSION['authUser'] = $user;
    $_SESSION['authGroup'] = $site;
    $_SESSION['pid'] = $patientId;
    if ($acl_allow) {
        addBilling($visit_id, $code_type, $code, $code_text, $patientId, $auth, $provider_id, $modifier, $units, $fee, $ndc_info, $justify, 0, $noteCodes);
        $strQuery1 = 'UPDATE `patient_data` SET';
        $strQuery1 .= ' pricelevel  = "' . add_escape_custom($priceLevel) . '"';
        $strQuery1 .= ' WHERE pid = ?';
        $result1 = sqlStatement($strQuery1, array($patientId));
        $strQuery2 = 'UPDATE `form_encounter` SET';
        $strQuery2 .= ' provider_id  = "' . add_escape_custom($provider_id) . '",';
        $strQuery2 .= ' supervisor_id  = "' . add_escape_custom($supervisor_id) . '"';
        $strQuery2 .= ' WHERE pid = ?' . ' AND encounter = ?';
        $result2 = sqlStatement($strQuery2, array($patientId, $visit_id));
        if ($result1 && $result2) {
            $xml_string .= "<status>0</status>";
            $xml_string .= "<reason>Fee Sheet added successfully</reason>";
        }
    } else {
        $xml_string .= "<status>-2</status>\n";
开发者ID:jv2003113,项目名称:openemr-api,代码行数:31,代码来源:addfeesheet.php

示例15: sqlQuery

$patdata = sqlQuery("SELECT " . "p.fname, p.mname, p.lname, p.pubpid, i.copay " . "FROM patient_data AS p " . "LEFT OUTER JOIN insurance_data AS i ON " . "i.pid = p.pid AND i.type = 'primary' " . "WHERE p.pid = '{$pid}' ORDER BY i.date DESC LIMIT 1");
$alertmsg = '';
// anything here pops up in an alert box
// If the Save button was clicked...
if ($_POST['form_save']) {
    $form_pid = $_POST['form_pid'];
    $form_method = trim($_POST['form_method']);
    $form_source = trim($_POST['form_source']);
    // Post payments for unbilled encounters.  These go into the billing table.
    if ($_POST['form_upay']) {
        foreach ($_POST['form_upay'] as $enc => $payment) {
            if ($amount = 0 + $payment) {
                if (!$enc) {
                    $enc = todaysEncounter($form_pid);
                }
                addBilling($enc, 'COPAY', sprintf('%.2f', $amount), $form_method, $form_pid, 1, $_SESSION["authUserID"], '', 1, 0 - $amount, '', '');
                frontPayment($form_pid, $enc, $form_method, $form_source, $amount, 0);
            }
        }
    }
    // Post payments for previously billed encounters.  These go to A/R.
    if ($_POST['form_bpay']) {
        foreach ($_POST['form_bpay'] as $enc => $payment) {
            if ($amount = 0 + $payment) {
                if ($INTEGRATED_AR) {
                    $thissrc = '';
                    if ($form_method) {
                        $thissrc .= $form_method;
                        if ($form_source) {
                            $thissrc .= " {$form_source}";
                        }
开发者ID:robonology,项目名称:openemr,代码行数:31,代码来源:front_payment.php


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