echo "Laboratory: allocate2insurance(" . $new_bill_number . ", {$labtest_nr}," . $_POST['insurance'] . ");"; } if ($debug) { echo "labtest nr." . $labtest_nr . "<br>"; } if ($debug) { echo "billnumber: {$new_bill_number}<br>"; } //if ($debug) echo "labtest nr.: ".$_POST['insurance_'.$labtest_nr]."<br>"; if ($debug) { echo "insurance: " . $_POST['insurance'] . "<br>"; } $bill_obj->StoreLaboratoryItemToBill($pid, $labtest_nr, $batch_nr, $new_bill_number, $_POST['insurance_' . $labtest_nr], $_GET['unit_price']); $bill_obj->UpdateBillNumberNewLaboratory($labtest_nr, $new_bill_number); if ($_POST['insurance'] != -1) { $insurance_obj->allocateLaboratoryItemsToinsurance($new_bill_number, $labtest_nr, $_POST['showprice_' . $labtest_nr], $_POST['insurance']); } } elseif ($_POST['modelab_' . $labtest_nr] == 'delete') { $deletecounter++; //Hmm, lets kick this one out! $bill_obj->DeleteNewLaboratory($labtest_nr, 'Disabled by billing officer'); } } elseif (strstr($x, "moderad_")) { if ($debug) { echo "looking for rad ...<br>"; } $radtest_nr = substr(strrchr($x, "_"), 1); $dosageNew = $_POST['dosage_' . $radtest_nr]; $timesPerDayNew = $_POST['times_per_day_' . $radtest_nr]; $daysNew = $_POST['days_' . $radtest_nr]; $result = $bill_obj->GetNewQuotation_Radiology($encounter_nr, $in_outpatient);