Пример #1
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage PlanningOp
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
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");
Пример #2
0
if (!$show_cancelled) {
    $where["operations.annulee"] = " != '1'";
}
//$where["operations.plageop_id"] = "IS NULL";
if ($bloc_id) {
    $ljoin["sallesbloc"] = "sallesbloc.salle_id = operations.salle_id";
    $ljoin["bloc_operatoire"] = "bloc_operatoire.bloc_operatoire_id = sallesbloc.bloc_id";
    $where["operations.salle_id"] = CSQLDataSource::prepareIn($salles_ids);
    $where["sallesbloc.bloc_id"] = "= '{$bloc_id}'";
}
$praticien = new CMediusers();
$praticiens = $praticien->loadPraticiens();
$where["operations.chir_id"] = CSQLDataSource::prepareIn(array_keys($praticiens), $praticien_id);
/** @var COperation[] $operations */
$operations = $operation->loadListWithPerms(PERM_READ, $where, null, null, "operations.operation_id", $ljoin);
$nbIntervHorsPlage = CIntervHorsPlage::countForDates($date_planning, null, array($praticien_id));
$prats = CStoredObject::massLoadFwdRef($operations, "chir_id");
CStoredObject::massLoadFwdRef($prats, "function_id");
CStoredObject::massLoadFwdRef($operations, "plageop_id");
CStoredObject::massLoadFwdRef($operations, "salle_id");
CStoredObject::massLoadFwdRef($operations, "anesth_id");
CStoredObject::massLoadFwdRef($operations, "chir_2_id");
CStoredObject::massLoadFwdRef($operations, "chir_3_id");
CStoredObject::massLoadFwdRef($operations, "chir_4_id");
CStoredObject::massLoadBackRefs($operations, "workflow");
$sejours = CStoredObject::massLoadFwdRef($operations, "sejour_id");
$affectations = CStoredObject::massLoadBackRefs($sejours, "affectations");
CStoredObject::massLoadFwdRef($affectations, "lit_id");
$patients = CStoredObject::massLoadFwdRef($sejours, "patient_id");
$dossiers = CStoredObject::massLoadBackRefs($patients, "dossier_medical");
CDossierMedical::massCountAllergies($dossiers);
Пример #3
0
 * $Id$
 *  
 * @category Bloc
 * @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();
$date_start = CValue::get("date", CMbDT::date());
$date_end = CValue::get("end", $date_start);
$chir_id = CValue::get("chir_id");
$chir = new CMediusers();
$chirs = array();
if ($chir_id) {
    $chir->load($chir_id);
    $chir->loadRefFunction();
    $chirs[] = $chir_id;
}
$listHorsPlage = CIntervHorsPlage::getForDates($date_start, $date_end, $chirs);
foreach ($listHorsPlage as $_operation) {
    $_operation->loadRefPraticien()->loadRefFunction();
    $_operation->loadRefPatient()->loadRefPhotoIdentite();
}
// smarty
$smarty = new CSmartyDP();
$smarty->assign("chir", $chir);
$smarty->assign("date", $date_start);
$smarty->assign("objects", $listHorsPlage);
$smarty->display("inc_vw_horsplage.tpl");
Пример #4
0
$where["plagesop.date"] = "BETWEEN '{$date}' AND '{$fin}'";
if ($bloc->_id) {
    $salles = $bloc->loadRefsSalles();
    $where["plagesop.salle_id"] = CSQLDataSource::prepareIn(array_keys($salles));
}
$where["operations.annulee"] = "= '0'";
$where["operations.rank"] = "= '0'";
$order = "plagesop.date, plagesop.chir_id";
/** @var COperation[] $listNonValidees */
$listNonValidees = $operation->loadList($where, $order, null, null, $ljoin);
foreach ($listNonValidees as $_operation) {
    $_operation->loadRefPlageOp();
    $_operation->loadExtCodesCCAM();
    $_operation->loadRefPraticien()->loadRefFunction();
    $_operation->loadRefPatient();
}
$listHorsPlage = CIntervHorsPlage::getForDates($date, $fin, null, array_keys($bloc->_ref_salles));
foreach ($listHorsPlage as $_operation) {
    $_operation->loadRefPlageOp();
    $_operation->loadExtCodesCCAM();
    $_operation->loadRefPraticien()->loadRefFunction();
    $_operation->loadRefPatient();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("blocs", $blocs);
$smarty->assign("nbAlertes", $nbAlertes);
$smarty->assign("listNonValidees", $listNonValidees);
$smarty->assign("listHorsPlage", $listHorsPlage);
$smarty->assign("edit_mode", $edit_mode);
$smarty->display("vw_alertes.tpl");
Пример #5
0
 * @version    $Revision: 21802 $
 */
$user = CMediusers::get();
$module = CModule::getInstalled(basename(dirname(__FILE__)));
$module->registerTab("vw_idx_planning", TAB_EDIT);
// Possibilité de planifier des séjours
$module->registerTab("vw_edit_sejour", TAB_READ);
//$sejour = new CSejour();
//if ($sejour->canDo()->read) {
//  $module->registerTab("vw_edit_sejour", TAB_READ);
//}
// Possibilité de planifier des interventions
$module->registerTab("vw_edit_planning", TAB_EDIT);
//$interv = new COperation();
//if ($interv->canDo()->read) {
//  $module->registerTab("vw_edit_planning", TAB_READ);
//}
// Possibilité de planifier des interventions hors plage
$hors_plage = new CIntervHorsPlage();
if ($hors_plage->canDo()->read) {
    $module->registerTab("vw_edit_urgence", TAB_READ);
}
$module->registerTab("vw_protocoles", TAB_EDIT);
$module->registerTab("vw_edit_typeanesth", TAB_ADMIN);
$module->registerTab("vw_idx_colors", TAB_ADMIN);
$module->registerTab("vw_sectorisations", TAB_ADMIN);
// Droit d'acces a l'onglet seulement si on est praticien ou admin
if (($user->isPraticien() || $user->isFromType(array("Administrator"))) && CAppUI::conf("dPsalleOp CActeCCAM tarif")) {
    $module->registerTab("vw_edit_compta", TAB_EDIT);
}
$module->registerTab("vw_parametrage", TAB_ADMIN);