Ejemplo n.º 1
0
// If an encounter ID was given, then we must generate a receipt.
//
if (!empty($_GET['enc'])) {
    generate_receipt($pid, $_GET['enc']);
    exit;
}
// Get the unbilled billing table items and product sales for
// this patient.
$query = "SELECT id, date, code_type, code, modifier, code_text, " . "provider_id, payer_id, units, fee, encounter " . "FROM billing WHERE pid = '{$pid}' AND activity = 1 AND " . "billed = 0 AND code_type != 'TAX' " . "ORDER BY encounter DESC, id ASC";
$bres = sqlStatement($query);
$query = "SELECT s.sale_id, s.sale_date, s.prescription_id, s.fee, " . "s.quantity, s.encounter, s.drug_id, d.name, r.provider_id " . "FROM drug_sales AS s " . "LEFT JOIN drugs AS d ON d.drug_id = s.drug_id " . "LEFT OUTER JOIN prescriptions AS r ON r.id = s.prescription_id " . "WHERE s.pid = '{$pid}' AND s.billed = 0 " . "ORDER BY s.encounter DESC, s.sale_id ASC";
$dres = sqlStatement($query);
// If there are none, just redisplay the last receipt and exit.
//
if (mysql_num_rows($bres) == 0 && mysql_num_rows($dres) == 0) {
    generate_receipt($pid);
    exit;
}
// Get the valid practitioners, including those not active.
$arr_users = array();
$ures = sqlStatement("SELECT id, username FROM users WHERE " . "( authorized = 1 OR info LIKE '%provider%' ) AND username != ''");
while ($urow = sqlFetchArray($ures)) {
    $arr_users[$urow['id']] = '1';
}
// Now write a data entry form:
// List unbilled billing items (cpt, hcpcs, copays) for the patient.
// List unbilled product sales for the patient.
// Present an editable dollar amount for each line item, a total
// which is also the default value of the input payment amount,
// and OK and Cancel buttons.
?>
Ejemplo n.º 2
0
// If an encounter ID was given, then we must generate a receipt.
//
if (!empty($_GET['enc'])) {
    generate_receipt($patient_id, $_GET['enc']);
    exit;
}
// Get the unbilled billing table items and product sales for
// this patient.
$query = "SELECT id, date, code_type, code, modifier, code_text, " . "provider_id, payer_id, units, fee, encounter " . "FROM billing WHERE pid = ? AND activity = 1 AND " . "billed = 0 AND code_type != 'TAX' " . "ORDER BY encounter DESC, id ASC";
$bres = sqlStatement($query, array($patient_id));
$query = "SELECT s.sale_id, s.sale_date, s.prescription_id, s.fee, " . "s.quantity, s.encounter, s.drug_id, d.name, r.provider_id " . "FROM drug_sales AS s " . "LEFT JOIN drugs AS d ON d.drug_id = s.drug_id " . "LEFT OUTER JOIN prescriptions AS r ON r.id = s.prescription_id " . "WHERE s.pid = ? AND s.billed = 0 " . "ORDER BY s.encounter DESC, s.sale_id ASC";
$dres = sqlStatement($query, array($patient_id));
// If there are none, just redisplay the last receipt and exit.
//
if (sqlNumRows($bres) == 0 && sqlNumRows($dres) == 0) {
    generate_receipt($patient_id);
    exit;
}
// Get the valid practitioners, including those not active.
$arr_users = array();
$ures = sqlStatement("SELECT id, username FROM users WHERE " . "( authorized = 1 OR info LIKE '%provider%' ) AND username != ''");
while ($urow = sqlFetchArray($ures)) {
    $arr_users[$urow['id']] = '1';
}
// Now write a data entry form:
// List unbilled billing items (cpt, hcpcs, copays) for the patient.
// List unbilled product sales for the patient.
// Present an editable dollar amount for each line item, a total
// which is also the default value of the input payment amount,
// and OK and Cancel buttons.
?>
Ejemplo n.º 3
0
    echo "<table align=\"center\" width=\"350px\">";
    $items = $_SESSION["items"];
    for ($i = 0; $i < count($items); $i++) {
        $result = mysqli_query($db, "SELECT itemName FROM Items WHERE itemId=\"" . $items[$i] . "\";");
        $row = mysqli_fetch_assoc($result);
        echo "<tr> <td>" . $row['itemName'] . "</td></tr>";
    }
    echo "<tr><td id=\"price\"><hr/>price: " . $_SESSION["price"] . " fresh dollars</td></tr></table>";
}
?>

</head>
<body>

	<div class="login_container">

		<h1>receipt</h1>
		<br/>

		<?php 
generate_receipt();
?>

	</div>

<script>	
	document.getElementById("signup_username").focus();
</script>
</body>
</html>