<?php include "../../../myDatabase1.php"; $registrationNo = $_GET['registrationNo']; $ro = new database1(); echo "<br><Br><br>"; echo "<font color=blue><b>PhilHealth Package</b></font>: " . number_format($ro->selectNow("package", "price", "description", $ro->selectNow("registrationDetails", "package", "registrationNo", $registrationNo)), 2); echo "<Br>"; echo "<font color=green><b>Total PhilHealth Covered</b></font>: " . number_format($ro->getTotal_paidVia($registrationNo, "phic"), 2); $descrepancy = $ro->selectNow("package", "price", "description", $ro->selectNow("registrationDetails", "package", "registrationNo", $registrationNo)) - $ro->getTotal_paidVia($registrationNo, "phic"); echo "<br>"; echo "<font color=red><b>Descrepancy:</b></font> " . number_format($descrepancy, 2); echo "<br><br>"; $misc = $ro->getTotal("cashUnpaid", "MISCELLANEOUS", $registrationNo); $nsCharges = $ro->getTotal("cashUnpaid", "NURSING-CHARGES", $registrationNo); $medicine = $ro->getTotal("cashUnpaid", "MEDICINE", $registrationNo); $supplies = $ro->getTotal("cashUnpaid", "SUPPLIES", $registrationNo); if ($descrepancy > $misc) { echo "MISCELLANEOUS: " . number_format($ro->getTotal("cashUnpaid", "MISCELLANEOUS", $registrationNo), 2); } else { if ($descrepancy > $nsCharges) { echo "NURSING-CHARGES: " . number_format($ro->getTotal("cashUnpaid", "NURSING-CHARGES", $registrationNo), 2); } else { if ($descrepancy > $medicine) { echo "MEDICINE: " . number_format($ro->getTotal("cashUnpaid", "MEDICINE", $registrationNo), 2); } else { if ($descrepancy > $supplies) { echo "SUPPLIES: " . number_format($ro->getTotal("cashUnpaid", "SUPPLIES", $registrationNo), 2); } else { } }
$inventoryFrom = $_GET['inventoryFrom']; $room = $_GET['room']; $quantity = $_GET['quantity']; $remarks = $_GET['remarks']; $ro = new database1(); $ro->getPHIClimit_setter($ro->selectNow("registrationDetails", "casetype", "registrationNo", $registrationNo)); $ro->getPatientProfile($registrationNo); // kunin ang data ng patient //$totalPrice = $sellingPrice * $quantity; //kunin ang total price //selectNow($table,$cols,$identifier,$identifierData) //$ro->selectNow("inventory","phic","inventoryCode",$chargesCode); // ttgnan kung cover ba ng philhealth ung medicine //number_format($ro->getCurrentPHIC_check($registrationNo,"MEDICINE") - $ro->getPHIClimit_medicine(),2) if ($quantity == 0) { $ro->getBack("Zero is not Allowed"); } else { $remainingLimit = $ro->getPHIClimit_suppliesOnly() - $ro->getTotal("phic", "SUPPLIES", $registrationNo); if ($ro->selectNow("inventory", "phic", "inventoryCode", $chargesCode) == "yes" && $ro->getPatientRecord_phic() == "YES") { //cover at pasok pa sa phic limit ng meds //$totalPrice = (($sellingPrice * 0.15) + $sellingPrice) * $quantity; //phic price $totalPrice = $sellingPrice * $quantity; // cashPrice muna for temporary if ($remainingLimit >= $totalPrice) { //cover lahat //check autoDispense???? if ($ro->selectNow("inventory", "autoDispense", "inventoryCode", $chargesCode) == "yes") { $currentQTY = $ro->selectNow("inventory", "quantity", "inventoryCode", $chargesCode); // current qty ng meds/sup sa inventory $newQTY = $currentQTY - $quantity; // less sa inventory as in qty after ibawas ung desired qty ng user $ro->editNow("inventory", "inventoryCode", $chargesCode, "quantity", $newQTY); // update qty sa database
<?php include "../../../myDatabase1.php"; $registrationNo = $_GET['registrationNo']; $ro = new database1(); //echo $registrationNo; $ro->getPatientProfile($registrationNo); $totalPHIC = $ro->getTotal("phic", "MEDICINE", $registrationNo) + $ro->getTotal("phic", "SUPPLIES", $registrationNo) + $ro->getTotal("phic", "LABORATORY", $registrationNo) + $ro->getTotal("phic", "RADIOLOGY", $registrationNo) + $ro->getTotal("phic", "ECG", $registrationNo) + $ro->getTotal("phic", "NURSING-CHARGES", $registrationNo) + $ro->getTotal("phic", "MISCELLANEOUS", $registrationNo) + $ro->getTotal("phic", "OTHERS", $registrationNo) + $ro->getTotal("phic", "OR/DR/ER FEE", $registrationNo) + $ro->getTotal("phic", "Room And Board", $registrationNo) + $ro->getTotal("phic", "PROFESSIONAL FEE", $registrationNo); $ro->coconutTableStart(); $ro->coconutTableRowStart(); $ro->coconutTableHeader("Category"); $ro->coconutTableHeader("PhilHealth"); $ro->coconutTableRowStop(); $ro->coconutTableRowStart(); $ro->coconutTableData("MEDICINE"); $ro->coconutTableData(number_format($ro->getTotal("phic", "MEDICINE", $registrationNo), 2)); $ro->coconutTableRowStop(); $ro->coconutTableRowStart(); $ro->coconutTableData("SUPPLIES"); $ro->coconutTableData(number_format($ro->getTotal("phic", "SUPPLIES", $registrationNo), 2)); $ro->coconutTableRowStop(); $ro->coconutTableRowStart(); $ro->coconutTableData("LABORATORY"); $ro->coconutTableData(number_format($ro->getTotal("phic", "LABORATORY", $registrationNo), 2)); $ro->coconutTableRowStop(); $ro->coconutTableRowStart(); $ro->coconutTableData("RADIOLOGY"); $ro->coconutTableData(number_format($ro->getTotal("phic", "RADIOLOGY", $registrationNo), 2)); $ro->coconutTableRowStop(); $ro->coconutTableRowStart(); $ro->coconutTableData("ECG");