$where["group_id"] = " = '" . CGroups::loadCurrent()->_id . "'"; $nb_modeles_etiquettes_operation = $modele_etiquette->countList($where); $where['object_class'] = "= 'CSejour'"; $nb_modeles_etiquettes_sejour = $modele_etiquette->countList($where); $nb_printers = 0; if (CModule::getActive("printing")) { // Chargement des imprimantes pour l'impression d'étiquettes $user_printers = CMediusers::get(); $function = $user_printers->loadRefFunction(); $nb_printers = $function->countBackRefs("printers"); } $compte_rendu = new CCompteRendu(); $salles = array(); if (!empty($list_urgences)) { $salle = new CSalle(); $salles = $salle->loadGroupList(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("praticien", $praticien); $smarty->assign("boardItem", $boardItem); $smarty->assign("date", $date); $smarty->assign("canceled", $canceled); $smarty->assign("listUrgences", $list_urgences); $smarty->assign("listDay", $list_plages); $smarty->assign("nb_canceled", $nb_canceled); $smarty->assign("board", $board); $smarty->assign("nb_printers", $nb_printers); $smarty->assign("can_create_docs", $compte_rendu->canClass()->edit); $smarty->assign("nb_modeles_etiquettes_sejour", $nb_modeles_etiquettes_sejour); $smarty->assign("nb_modeles_etiquettes_operation", $nb_modeles_etiquettes_operation);
$type = CValue::get("type", "prevue"); CView::enforceSlave(); if ($mode == "html") { $miner = new COperationWorkflow(); $miner->warnUsage(); } $blocs = CGroups::loadCurrent()->loadBlocs(); $bloc = new CBlocOperatoire(); $bloc->load($bloc_id); $where = array(); $where["stats"] = "= '1'"; if ($bloc->_id) { $where["bloc_id"] = "= '{$bloc->_id}'"; } $salle = new CSalle(); $salles = $salle->loadGroupList($where); // Récupération des plages $where = array("date" => "BETWEEN '{$deblist} 00:00:00' AND '{$finlist} 23:59:59'", "salle_id" => CSQLDataSource::prepareIn(array_keys($salles))); /** @var CPlageOp[] $plages */ $plages = array(); /** @var COperation[] $operations */ $operations = array(); /** @var int $nb_interv */ $nb_interv = 1; if ($type == "prevue") { $plage = new CPlageOp(); $order = "date, salle_id, debut, chir_id"; $plages = $plage->loadList($where, $order); CStoredObject::massLoadFwdRef($plages, "chir_id"); CStoredObject::massLoadFwdRef($plages, "spec_id"); // Récupération des interventions