*/ global $can, $m, $tab; CCanDo::checkRead(); $hors_plage = new CIntervHorsPlage(); if (!$hors_plage->canRead()) { $can->redirect(); } // Toutes les salles des blocs $listBlocs = CGroups::loadCurrent()->loadBlocs(PERM_READ); // Les salles autorisées $salle = new CSalle(); $listSalles = $salle->loadListWithPerms(PERM_READ); // Liste des Etablissements selon Permissions $etablissements = CMediusers::loadEtablissements(PERM_READ); // Chargement des prestations $prestations = CPrestation::loadCurrentList(); $operation_id = CValue::getOrSession("operation_id"); $chir_id = CAppUI::conf("dPplanningOp COperation use_session_praticien") ? CValue::getOrSession("chir_id") : CValue::get("chir_id"); $sejour_id = CValue::get("sejour_id"); $hour_urgence = CValue::get("hour_urgence"); $min_urgence = CValue::get("min_urgence"); $date_urgence = CValue::get("date_urgence"); $salle_id = CValue::get("salle_id"); $patient_id = CValue::get("pat_id"); $grossesse_id = CValue::get("grossesse_id"); $consult_related_id = CValue::get("consult_related_id"); // L'utilisateur est-il un praticien $user = $chir = CMediusers::get(); if ($chir->isPraticien() and !$chir_id) { $chir_id = $chir->user_id; }
if (CSQLDataSource::get("sae") && CModule::getActive("atih")) { $um_infos = new CUniteMedicaleInfos(); $ums = $um->loadListUm(); $group = CGroups::loadCurrent(); $where["group_id"] = " = '{$group->_id}'"; $where["mode_hospi"] = " IS NOT NULL"; $where["nb_lits"] = " IS NOT NULL"; $ums_infos = $um_infos->loadList($where); } // Récupération des ufs $order = "group_id, code"; $ufs = $uf->loadList(null, $order); } if ($use_prestation != null) { // Chargement de la prestation à ajouter/éditer $prestation = new CPrestation(); $prestation->group_id = $group->_id; $prestation->load($prestation_id); $prestation->loadRefsNotes(); // Récupération des prestations $order = "group_id, nom"; /** @var CPrestation[] $prestations */ $prestations = $prestation->loadList(null, $order); foreach ($prestations as $_prestation) { $_prestation->loadRefGroup(); $_prestation->loadRefsNotes(); } } // Création du template $smarty = new CSmartyDP(); $smarty->assign("praticiens", $praticiens);
CSejour::massCountPrestationSouhaitees(array($sejour)); foreach ($operations as $operation) { $operation->loadRefsActes(); $dossier_anesth = $operation->loadRefsConsultAnesth(); $consultation = $dossier_anesth->loadRefConsultation(); $consultation->loadRefPlageConsult(); $dossier_anesth->_date_consult = $consultation->_date; } if (CAppUI::conf("dPadmissions show_deficience")) { CDossierMedical::massCountAntecedentsByType(array($dossier_medical), "deficience"); } $list_mode_entree = array(); if (CAppUI::conf("dPplanningOp CSejour use_custom_mode_entree")) { $mode_entree = new CModeEntreeSejour(); $where = array("actif" => "= '1'"); $list_mode_entree = $mode_entree->loadGroupList($where); } $smarty = new CSmartyDP(); $smarty->assign("_sejour", $sejour); $smarty->assign("date_min", $date_min); $smarty->assign("date_max", $date_max); $smarty->assign("date_actuelle", $date_actuelle); $smarty->assign("date_demain", $date_demain); $smarty->assign("list_mode_entree", $list_mode_entree); $smarty->assign("prestations", CPrestation::loadCurrentList()); $smarty->assign("canAdmissions", CModule::getCanDo("dPadmissions")); $smarty->assign("canPatients", CModule::getCanDo("dPpatients")); $smarty->assign("canPlanningOp", CModule::getCanDo("dPplanningOp")); $smarty->assign("single_line", true); // Indique qu'on charge la ligne seulement (pour les evenements de formulaire) $smarty->display("inc_vw_admission_line.tpl");
<?php /** * $Id$ * * @category Hospi * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @link http://www.mediboard.org */ $group = CGroups::loadCurrent(); // Récupération des prestations $presta = new CPrestation(); $presta->group_id = $group->_id; $prestations = $presta->loadMatchingList("nom"); foreach ($prestations as $_prestation) { $_prestation->loadRefGroup(); $_prestation->loadRefsNotes(); } // Liste des Etablissements $etablissements = CMediusers::loadEtablissements(PERM_READ); // Création du template $smarty = new CSmartyDP(); $smarty->assign("prestations", $prestations); $smarty->assign("prestation", $presta); $smarty->assign("etablissements", $etablissements); $smarty->display("vw_prestation_standard.tpl");