*/ $mode_operation = CValue::get("mode_operation", 0); $sejour_id = CValue::get("sejour_id", 0); $patient_id = CValue::get("patient_id", 0); // Liste des Etablissements selon Permissions $etablissements = new CMediusers(); $etablissements = $etablissements->loadEtablissements(PERM_READ); // Chargement des prestations $prestations = CPrestation::loadCurrentList(); $sejour = new CSejour(); $praticien = new CMediusers(); if ($sejour_id) { $sejour->load($sejour_id); $sejour->loadRefsFwd(); $praticien =& $sejour->_ref_praticien; $praticien->canDo(); $patient =& $sejour->_ref_patient; $patient->loadRefsSejours(); $sejours =& $patient->_ref_sejours; } else { $patient = new CPatient(); $patient->load($patient_id); $patient->loadRefsSejours(); $sejours =& $patient->_ref_sejours; } $sejour->makeDatesOperations(); $sejour->loadNDA(); $sejour->loadRefCurrAffectation()->loadRefService(); $patient->loadRefsFwd(); $patient->loadRefsCorrespondants(); $patient->loadRefsCorrespondantsPatient();
} } else { if ($consult->_id && $consult->patient_id) { $consult->loadRefPlageConsult(); if ($prat_id !== $consult->_ref_plageconsult->chir_id) { $consult = new CConsultation(); $selConsult = null; CValue::setSession("selConsult"); } } } // On charge le praticien $userSel = new CMediusers(); $userSel->load($prat_id); $userSel->loadRefFunction(); $canUserSel = $userSel->canDo(); if (!$consult->_id) { if ($current_m == "dPurgences") { CAppUI::setMsg("Vous devez selectionner une consultation", UI_MSG_ALERT); CAppUI::redirect("m=urgences&tab=0"); } $smarty = new CSmartyDP(); $smarty->assign("consult", $consult); $smarty->assign("current_m", $current_m); $smarty->assign("date", $date); $smarty->assign("vue", $vue); $smarty->assign("userSel", $userSel); $smarty->display("../../dPcabinet/templates/edit_consultation.tpl"); CApp::rip(); } $consult->canDo()->needsEdit(array("selConsult" => null));
* @category Dossier patient * @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(); $object_class = CView::get("object_class", "str"); $object_id = CView::get("object_id", "num pos"); $patient_id = CView::get("patient_id", "num pos"); $praticien_id = CView::get("praticien_id", "num pos"); CView::checkin(); $object = new $object_class(); $object->load($object_id); $object->countDocItems(); $user = CMediusers::get(); // Praticien concerné if (!$user->isPraticien() && $praticien_id) { $user = new CMediusers(); $user->load($praticien_id); } $user->loadRefFunction(); $user->_ref_function->loadRefGroup(); $user->canDo(); $compte_rendu = new CCompteRendu(); $smarty = new CSmartyDP(); $smarty->assign("object", $object); $smarty->assign("praticien", $user); $smarty->assign("patient_id", $patient_id); $smarty->display("inc_widget_count_documents.tpl");