<?php include "../../../myDatabase2.php"; $itemNo = $_GET['itemNo']; $countItem = count($itemNo); $registrationNo = $_GET['registrationNo']; $username = $_GET['username']; $ro = new database2(); for ($x = 0; $x < $countItem; $x++) { $ro->editNow("room", "Description", $ro->selectNow("patientCharges", "chargesCode", "itemNo", $itemNo[$x]), "status", "Vacant"); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "status", "Discharged"); } $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "dateUnregistered", date("Y-m-d")); $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "timeUnregistered", $ro->getSynapseTime()); $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh", $username); $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "unregisteredBy", $username); $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh_date", date("Y-m-d") . "@" . $ro->getSynapseTime()); echo "<center><br><Br><Br><font color=red>Patient Discharged</font>";
<?php include "../../../myDatabase2.php"; $itemNo = $_GET['itemNo']; $countItem = count($itemNo); $registrationNo = $_GET['registrationNo']; $mode = $_GET['mode']; $ro = new database2(); if ($mode == "cash2company1") { for ($x = 0; $x < $countItem; $x++) { $ro->getPatientChargesToEdit($itemNo[$x]); $totalTransfer = $ro->selectNow("patientCharges", "company1", "itemNo", $itemNo[$x]) + $ro->patientCharges_cashUnpaid(); $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "company1", $totalTransfer); $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "cashUnpaid", 0); } } else { if ($mode == "company1_to_cash") { for ($x = 0; $x < $countItem; $x++) { $ro->getPatientChargesToEdit($itemNo[$x]); $totalTransfer = $ro->selectNow("patientCharges", "company1", "itemNo", $itemNo[$x]) + $ro->patientCharges_cashUnpaid(); $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "cashUnpaid", $totalTransfer); $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "company1", 0); } } else { if ($mode == "company2company1") { for ($x = 0; $x < $countItem; $x++) { $ro->getPatientChargesToEdit($itemNo[$x]); $totalTransfer = $ro->selectNow("patientCharges", "company1", "itemNo", $itemNo[$x]) + $ro->patientCharges_company(); $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "company1", $totalTransfer); $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "company", 0); }
$cashLimit = $_GET['cashLimit']; $hmoLimit = $_GET['hmoLimit']; $incrementalCost = $_GET['incrementalCost']; $package = $_GET['package']; $pinNo = $_GET['pinNo']; $seniorNo = $_GET['seniorNo']; if (isset($_GET['CashLIMIT'])) { $CashLIMIT = $_GET['CashLIMIT']; } else { } $ro = new database2(); $ro->getPatientProfile($registrationNo); //if($ro->selectNow("registeredUser","module","username",$username) == "CASHIER" && $discount > $ro->getReportInformation("cashierDisc") ) { //$ro->getBack("Sorry,You put a discount that is higher to your allowable discount which is".$ro->getReportInformation("cashierDisc")); //}else { $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "incrementalCost", $incrementalCost); //} $ro->editCompleteName($patientNo, $lastname . " " . $firstname . " " . $middlename); $ro->editLastName($patientNo, $lastname); $ro->editFirstName($patientNo, $firstname); $ro->editMiddleName($patientNo, $middlename); $ro->editAge($patientNo, $age); $ro->editCivilStatus($patientNo, $civilStatus); $ro->editBirthDate($patientNo, $birthdate); $ro->editContactNo($patientNo, $contactNo); $ro->editSenior($patientNo, $senior); $ro->editPHIC($patientNo, $PhilHealth); //$ro->editCompany($patientNo,$company); //$ro->editTimeRegistered($patientNo,$timeRegistered); //$ro->editDateRegistered($patientNo,$dateRegistered); $ro->editAddress($patientNo, $address);