本文整理汇总了PHP中SLConnect函数的典型用法代码示例。如果您正苦于以下问题:PHP SLConnect函数的具体用法?PHP SLConnect怎么用?PHP SLConnect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SLConnect函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: slInitialize
function slInitialize()
{
if ($GLOBALS['oer_config']['ws_accounting']['enabled'] === 2) {
return;
}
global $chart_id_cash, $chart_id_ar, $chart_id_income, $services_id;
global $sl_cash_acc, $sl_ar_acc, $sl_income_acc, $sl_services_id;
SLConnect();
$chart_id_cash = SLQueryValue("select id from chart where accno = '{$sl_cash_acc}'");
if ($sl_err) {
die($sl_err);
}
if (!$chart_id_cash) {
die(xl("There is no COA entry for cash account ") . "'{$sl_cash_acc}'");
}
$chart_id_ar = SLQueryValue("select id from chart where accno = '{$sl_ar_acc}'");
if ($sl_err) {
die($sl_err);
}
if (!$chart_id_ar) {
die(xl("There is no COA entry for AR account ") . "'{$sl_ar_acc}'");
}
$chart_id_income = SLQueryValue("select id from chart where accno = '{$sl_income_acc}'");
if ($sl_err) {
die($sl_err);
}
if (!$chart_id_income) {
die(xl("There is no COA entry for income account ") . "'{$sl_income_acc}'");
}
$services_id = SLQueryValue("select id from parts where partnumber = '{$sl_services_id}'");
if ($sl_err) {
die($sl_err);
}
if (!$services_id) {
die(xl("There is no parts entry for services ID ") . "'{$sl_services_id}'");
}
}
示例2: generate_receipt
function generate_receipt($patient_id, $encounter = 0)
{
global $sl_err, $sl_cash_acc, $css_header, $details, $INTEGRATED_AR;
// Get details for what we guess is the primary facility.
$frow = sqlQuery("SELECT * FROM facility " . "ORDER BY billing_location DESC, accepts_assignment DESC, id LIMIT 1");
$patdata = getPatientData($patient_id, 'fname,mname,lname,pubpid,street,city,state,postal_code,providerID');
// Get the most recent invoice data or that for the specified encounter.
//
// Adding a provider check so that their info can be displayed on receipts
if ($INTEGRATED_AR) {
if ($encounter) {
$ferow = sqlQuery("SELECT id, date, encounter, provider_id FROM form_encounter " . "WHERE pid = ? AND encounter = ?", array($patient_id, $encounter));
} else {
$ferow = sqlQuery("SELECT id, date, encounter, provider_id FROM form_encounter " . "WHERE pid = ? " . "ORDER BY id DESC LIMIT 1", array($patient_id));
}
if (empty($ferow)) {
die(xlt("This patient has no activity."));
}
$trans_id = $ferow['id'];
$encounter = $ferow['encounter'];
$svcdate = substr($ferow['date'], 0, 10);
if ($GLOBALS['receipts_by_provider']) {
if (isset($ferow['provider_id'])) {
$encprovider = $ferow['provider_id'];
} else {
if (isset($patdata['providerID'])) {
$encprovider = $patdata['providerID'];
} else {
$encprovider = -1;
}
}
}
if ($encprovider) {
$providerrow = sqlQuery("SELECT fname, mname, lname, title, street, streetb, " . "city, state, zip, phone, fax FROM users WHERE id = ?", array($encprovider));
}
} else {
SLConnect();
//
$arres = SLQuery("SELECT * FROM ar WHERE " . "invnumber LIKE '{$patient_id}.%' " . "ORDER BY id DESC LIMIT 1");
if ($sl_err) {
die(text($sl_err));
}
if (!SLRowCount($arres)) {
die(xlt("This patient has no activity."));
}
$arrow = SLGetRow($arres, 0);
//
$trans_id = $arrow['id'];
//
// Determine the date of service. An 8-digit encounter number is
// presumed to be a date of service imported during conversion or
// associated with prescriptions only. Otherwise look it up in the
// form_encounter table.
//
$svcdate = "";
list($trash, $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 = ?", array($encounter));
$svcdate = substr($tmp['date'], 0, 10);
}
}
}
// end not $INTEGRATED_AR
// Get invoice reference number.
$encrow = sqlQuery("SELECT invoice_refno FROM form_encounter WHERE " . "pid = ? AND encounter = ? LIMIT 1", array($patient_id, $encounter));
$invoice_refno = $encrow['invoice_refno'];
?>
<html>
<head>
<?php
html_header_show();
?>
<link rel='stylesheet' href='<?php
echo $css_header;
?>
' type='text/css'>
<title><?php
echo xlt('Receipt for Payment');
?>
</title>
<script type="text/javascript" src="../../library/dialog.js"></script>
<script language="JavaScript">
<?php
require $GLOBALS['srcdir'] . "/restoreSession.php";
?>
// Process click on Print button.
function printme() {
var divstyle = document.getElementById('hideonprint').style;
divstyle.display = 'none';
window.print();
return false;
}
// Process click on Delete button.
function deleteme() {
//.........这里部分代码省略.........
示例3: substr
$code = substr($code, 0, $i);
}
return $bcodes['CPT4'][xl('Lab')][$code] || $bcodes['CPT4'][xl('Immunizations')][$code] || $bcodes['HCPCS'][xl('Therapeutic Injections')][$code];
}
function bucks($amount)
{
if ($amount) {
echo oeFormatMoney($amount);
}
}
if (!acl_check('acct', 'rep')) {
die(xl("Unauthorized access."));
}
$INTEGRATED_AR = $GLOBALS['oer_config']['ws_accounting']['enabled'] === 2;
if (!$INTEGRATED_AR) {
SLConnect();
$chart_id_cash = SLQueryValue("select id from chart where accno = '{$sl_cash_acc}'");
if ($sl_err) {
die($sl_err);
}
}
$form_use_edate = $_POST['form_use_edate'];
$form_cptcode = trim($_POST['form_cptcode']);
$form_icdcode = trim($_POST['form_icdcode']);
$form_procedures = empty($_POST['form_procedures']) ? 0 : 1;
$form_from_date = fixDate($_POST['form_from_date'], date('Y-m-01'));
$form_to_date = fixDate($_POST['form_to_date'], date('Y-m-d'));
$form_facility = $_POST['form_facility'];
?>
<html>
<head>
示例4: 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;
}
}
}
}
示例5: fixDate
} // End not csv export
} // end details
$producttotal += $rowamount;
$cattotal += $rowamount;
$grandtotal += $rowamount;
$productqty += $qty;
$catqty += $qty;
$grandqty += $qty;
} // end function
if (! acl_check('acct', 'rep')) die(xl("Unauthorized access."));
$INTEGRATED_AR = $GLOBALS['oer_config']['ws_accounting']['enabled'] === 2;
if (!$INTEGRATED_AR) SLConnect();
$form_from_date = fixDate($_POST['form_from_date'], date('Y-m-d'));
$form_to_date = fixDate($_POST['form_to_date'] , date('Y-m-d'));
$form_facility = $_POST['form_facility'];
if ($_POST['form_csvexport']) {
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=sales_by_item.csv");
header("Content-Description: File Transfer");
// CSV headers:
if ($_POST['form_details']) {
echo '"Category",';
示例6: generatePageElement
if(($pagesize > 0) && ($pagestart>0))
{
generatePageElement($pagestart-$pagesize,$pagesize,$billing_view,$issue,"⇐" . htmlspecialchars( xl("Prev"), ENT_NOQUOTES) . " ");
}
echo ($pagestart + 1)."-".$upper." " . htmlspecialchars( xl('of'), ENT_NOQUOTES) . " " .$numRes;
if(($pagesize>0) && ($pagestart+$pagesize <= $numRes))
{
generatePageElement($pagestart+$pagesize,$pagesize,$billing_view,$issue," " . htmlspecialchars( xl("Next"), ENT_NOQUOTES) . "⇒");
}
$res4 = sqlStatement($query, $sqlBindArray);
if ($billing_view && $accounting_enabled && !$INTEGRATED_AR) SLConnect();
while ($result4 = sqlFetchArray($res4)) {
// $href = "javascript:window.toencounter(" . $result4['encounter'] . ")";
$reason_string = "";
$auth_sensitivity = true;
$raw_encounter_date = '';
$raw_encounter_date = date("Y-m-d", strtotime($result4{"date"}));
$encounter_date = date("D F jS", strtotime($result4{"date"}));
// if ($auth_notes_a || ($auth_notes && $result4['user'] == $_SESSION['authUser']))
$reason_string .= htmlspecialchars( $result4{"reason"}, ENT_NOQUOTES) . "<br>\n";
// else