Esempio n. 1
0
     }
     break;
 case 'close_ward':
     if ($ward_obj->hasPatient($ward_nr)) {
         header("location:nursing-station-noclose.php" . URL_REDIRECT_APPEND . "&ward_id={$ward_id}&ward_nr={$ward_nr}");
         exit;
     } else {
         switch ($close_type) {
             case 'temporary':
                 $ward_obj->closeWardTemporary($ward_nr);
                 break;
             case 'nonreversible':
                 $ward_obj->closeWardNonReversible($ward_nr);
                 break;
             case 're_open':
                 $ward_obj->reOpenWard($ward_nr);
         }
         header("location:nursing-station-info.php" . URL_REDIRECT_APPEND);
         exit;
     }
 default:
     if ($wards =& $ward_obj->getAllActiveWards()) {
         # Count wards
         $rows = $wards->RecordCount();
         if ($rows == 1) {
             # If only one ward, fetch the ward
             $ward = $wards->FetchRow();
             # globalize ward values
             extract($ward);
             # Get ward�s active rooms info
             $rooms =& $ward_obj->getAllActiveRoomsInfo($ward['nr']);