$type_checklist = $type == "reveil" ? "ouverture_sspi" : "ouverture_preop";
 $type_close = $type == "reveil" ? "fermeture_sspi" : "fermeture_preop";
 if ($require_check_list) {
     list($check_list_not_validated, $daily_check_list_types, $daily_check_lists) = CDailyCheckList::getCheckLists($bloc, $date, $type_checklist);
     if ($check_list_not_validated == 0) {
         $require_check_list = false;
     }
 }
 if ($require_check_list_close) {
     list($check_list_not_validated_close, $daily_check_list_types_close, $daily_check_lists_close) = CDailyCheckList::getCheckLists($bloc, $date, $type_close);
     if ($check_list_not_validated_close == 0) {
         $require_check_list_close = false;
     }
 }
 $date_close_checklist = CDailyCheckList::getDateLastChecklist($bloc, $type_close);
 $date_open_checklist = CDailyCheckList::getDateLastChecklist($bloc, $type_checklist);
 if ($require_check_list) {
     // Chargement de la liste du personnel pour le reveil
     if (CModule::getActive("dPpersonnel")) {
         $type_personnel = array("reveil");
         if (count($daily_check_list_types)) {
             $type_personnel = array();
             foreach ($daily_check_list_types as $check_list_type) {
                 $validateurs = explode("|", $check_list_type->type_validateur);
                 foreach ($validateurs as $validateur) {
                     $type_personnel[] = $validateur;
                 }
             }
         }
         $personnel = new CPersonnel();
         $personnels = $personnel->loadListPers(array_unique(array_values($type_personnel)));
Esempio n. 2
0
    }
}
$date_last_checklist = null;
if ($salle->cheklist_man) {
    $date_last_checklist = CDailyCheckList::getDateLastChecklist($salle, "ouverture_salle");
}
// Checklist_fermeture bloc
$date_close_checklist = null;
$currUser = CMediusers::get();
$require_check_list = CAppUI::conf("dPsalleOp CDailyCheckList active", $group) && $date >= CMbDT::date() && !$currUser->isPraticien() ? 1 : 0;
if ($require_check_list) {
    list($check_list_not_validated, $daily_check_list_types, $daily_check_lists) = CDailyCheckList::getCheckLists($salle, $date, "fermeture_salle");
    if ($check_list_not_validated == 0) {
        $require_check_list = false;
    }
    $date_close_checklist = CDailyCheckList::getDateLastChecklist($salle, "fermeture_salle");
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("default_salle_id", $default_salle_id);
$smarty->assign("group_id", $group_id);
$smarty->assign("vueReduite", false);
$smarty->assign("salle", $salle);
$smarty->assign("hide_finished", $hide_finished);
$smarty->assign("praticien_id", null);
$smarty->assign("listBlocs", $listBlocs);
$smarty->assign("listAnesths", $listAnesths);
$smarty->assign("date", $date);
$smarty->assign("operation_id", $operation_id);
$smarty->assign("date_last_checklist", $date_last_checklist);
$smarty->assign("require_check_list_close", $require_check_list);