/** * $Id: inc_edit_planning.php 22873 2014-04-22 07:51:07Z mytto $ * * @package Mediboard * @subpackage dPbloc * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision: 22873 $ */ $plageop_id = CValue::getOrSession("plageop_id"); $date = CValue::getOrSession("date", CMbDT::date()); $bloc_id = CValue::get("bloc_id"); // Informations sur la plage demandée $plagesel = new CPlageOp(); $plagesel->load($plageop_id); $plagesel->loadRefSalle(); $listBlocs = CGroups::loadCurrent()->loadBlocs(PERM_READ, null, "nom"); //curent bloc if $bloc_id $bloc = new CBlocOperatoire(); $bloc->load($bloc_id); $listSalles = $bloc->loadRefsSalles(); $arrKeySalle = array_keys($listSalles); // cleanup listBlocs foreach ($listBlocs as $key => $curr_bloc) { $salles = $curr_bloc->loadRefsSalles(); foreach ($salles as $id => $_salle) { if (count($arrKeySalle) && !in_array($id, $arrKeySalle)) { unset($salles[$id]); continue; } }
<?php /** * $Id$ * * @category Cabinet * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ * @link http://www.mediboard.org */ CCanDo::checkRead(); $plage_id = CValue::get("plage_id"); $object = new CPlageOp(); $object->load($plage_id); $object->loadRefsNotes(); $object->loadRefChir()->loadRefFunction(); $object->loadRefAnesth()->loadRefFunction(); $object->loadRefSpec(); $object->loadRefsOperations(); $object->loadRefSalle(); foreach ($object->_ref_operations as $_op) { $_op->loadRefPatient()->loadRefPhotoIdentite(); } // smarty $smarty = new CSmartyDP(); $smarty->assign("object", $object); $smarty->display("inc_vw_plageop.tpl");
$order = "date, debut"; $plage = new CPlageOp(); $listPlages = array(); foreach ($blocs as $_bloc) { $where["salle_id"] = CSQLDataSource::prepareIn(array_keys($_bloc->_ref_salles)); $listPlages[$_bloc->_id] = $plage->loadList($where, $order); if (!count($listPlages[$_bloc->_id])) { unset($listPlages[$_bloc->_id]); } } $time = explode(":", $curr_op_time); $nb_secondes = $time[0] * 3600 + $time[1] * 60; $_plage = new CPlageOp(); foreach ($listPlages as &$_bloc) { foreach ($_bloc as &$_plage) { $_plage->loadRefSalle(); $_plage->multicountOperations($nb_secondes, false); $_plage->loadRefsNotes(); $_plage->loadRefSpec(1); } } // Heures d'admission $config = CAppUI::conf("dPplanningOp CSejour"); $hours = range($config["heure_deb"], $config["heure_fin"]); $mins = range(0, 59, $config["min_intervalle"]); $heure_entree_veille = $config["heure_entree_veille"]; $heure_entree_jour = $config["heure_entree_jour"]; // Horaire souhaité $config = CAppUI::conf("dPplanningOp COperation"); $list_hours_voulu = range(7, 20); $list_minutes_voulu = range(0, 59, $config["min_intervalle"]);
<?php /** * $Id$ * * @package Mediboard * @subpackage PlanningOp * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $chir_id = CValue::get("chir_id"); $plageop = new CPlageOp(); $plageop->load(CValue::get("plageop_id")); $plageop->loadRefSalle(); $where = array("chir_id" => "= '{$chir_id}'"); $plageop->loadRefsOperations(false, null, true, null, $where); $plageop->guessHoraireVoulu(); $rank_validated = array(); $rank_not_validated = array(); $_op = new COperation(); $_last_op = null; foreach ($plageop->_ref_operations as $_op) { $_op->loadRefChir()->loadRefFunction(); $_op->loadRefSejour()->loadRefPatient()->loadRefDossierMedical()->countAllergies(); $_op->loadExtCodesCCAM(); if ($_op->_horaire_voulu) { $_last_op = $_op; } }