$enc_obj = new Encounter(); if ($enc_obj->loadEncounterData($pn)) { //$db->debug=1; if ($mode == 'release' && !(isset($lock) || $lock)) { $date = empty($x_date) ? date('Y-m-d') : formatDate2STD($x_date, $date_format); $time = empty($x_time) ? date('H:i:s') : convertTimeToStandard($x_time); # Check the discharge type switch ($relart) { case 8: if ($released = $enc_obj->DischargeFromDept($pn, $relart, $date, $time)) { # Reset current department //$enc_obj->ResetAllCurrentPlaces($pn,0); } break; default: $released = $enc_obj->Discharge($pn, $relart, $date, $time); } if ($released) { # If discharge note present if (!empty($info)) { $data_array['notes'] = $info; $data_array['encounter_nr'] = $pn; $data_array['date'] = $date; $data_array['time'] = $time; $data_array['personell_name'] = $encoder; $enc_obj->saveDischargeNotesFromArray($data_array); } # If patient died //$db->debug=1; if ($relart == 7) { include_once $root_path . 'include/care_api_classes/class_person.php';
$discharge = ''; if (!isset($_GET['reload'])) { echo '<meta http-equiv=Refresh content="0;url=amb_clinic_patients_discharge.php?reload=1">'; } } //discharge all selected at time if ($_POST['discharge_checked']) { $date = empty($x_date) ? date('Y-m-d') : formatDate2STD($x_date, $date_format); $time = empty($x_time) ? date('H:i:s') : convertTimeToStandard($x_time); $d_type_nr = '4'; $checkbox = $_POST['checkbox']; //from name="checkbox[]" $countCheck = count($_POST['checkbox']); for ($i = 0; $i < $countCheck; $i++) { $disch_id = $checkbox[$i]; $enc_obj->Discharge($disch_id, $d_type_nr, $date, $time); } //echo 'prakash'; $discharge = ''; if (!isset($_POST[reload])) { echo '<meta http-equiv=Refresh content="0;url=amb_clinic_patients_discharge.php?reload=1">'; } } //$test='sdadf'; $smarty->assign('LDSelectOutpatients', '</a><a href="javascript:checkUncheckAll(1)"> <input type="image" id = "checkUncheckAll" value="Select All Outpatients"></a>'); $smarty->assign('LDUnSelectOutpatients', '</a><a href="javascript:checkUncheckAll(0)"> <input type="image" id = "checkUncheckAll" src="' . $rootpath . './../../gui/img/control/blue_aqua/en/en_close2.gif"></a>'); # Assign href for bottom close button $smarty->assign('pbClose', '<a href="' . $breakfile . '"> <img border="0" src="' . $rootpath . './../../gui/img/control/blue_aqua/en/en_close2.gif"></a>');