示例#1
0
 * @package    Mediboard
 * @subpackage dPpersonnel
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision:$
 */
//CCanDo::checkRead();
$choix = CValue::get("choix", "mois");
$filter = new CPlageConge();
$filter->user_id = CValue::get("user_id", CAppUI::$user->_id);
$filter->date_debut = CValue::get("date_debut", CMbDT::date());
// Tableau des jours fériés sur 2 ans, car
// en mode semaine : 31 décembre - 1 janvier
$bank_holidays = array_merge(CMbDate::getHolidays($filter->date_debut), CMbDate::getHolidays(CMbDT::transform("+1 YEAR", $filter->date_debut, "%Y-%m-%d")));
$mediuser = new CMediusers();
$mediusers = $mediuser->loadListFromType();
if (!$filter->date_debut) {
    $filter->date_debut = Date("Y-m-d");
}
// Si la date rentrée par l'utilisateur est un lundi,
// on calcule le dimanche d'avant et on rajoute un jour.
$tab_start = array();
if ($choix == "semaine") {
    $last_sunday = CMbDT::transform('last sunday', $filter->date_debut, '%Y-%m-%d');
    $last_monday = CMbDT::transform('+1 day', $last_sunday, '%Y-%m-%d');
    $debut_periode = $last_monday;
    $fin_periode = CMbDT::transform('+6 day', $debut_periode, '%Y-%m-%d');
} elseif ($choix == "annee") {
    list($year, $m, $j) = explode("-", $filter->date_debut);
    $debut_periode = "{$year}-01-01";
    $fin_periode = "{$year}-12-31";
示例#2
0
        break;
    case "one-week":
        $from = CMbDT::date("-1 WEEK", $to);
        break;
    case "height-weeks":
        $from = CMbDT::date("-8 WEEK", $to);
        break;
    case "one-year":
        $from = CMbDT::date("-1 YEAR", $to);
        break;
    case "four-years":
        $from = CMbDT::date("-4 YEARS", $to);
        break;
    case "twenty-years":
        $from = CMbDT::date("-20 YEARS", $to);
        break;
    default:
        $from = CMbDT::date("-1 DAY", $to);
}
$graph = graphUserLog($from, $to, $interval, $user_id);
// Chargement des utilisateurs
$user = new CMediusers();
$users = $user->loadListFromType();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("graph", $graph);
$smarty->assign("date", $date);
$smarty->assign("user_id", $user_id);
$smarty->assign("users", $users);
$smarty->assign("interval", $interval);
$smarty->display("vw_user_logs.tpl");
示例#3
0
<?php

/**
 * $Id: $
 *
 * @package    Mediboard
 * @subpackage Cabinet
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: $
 */
$devenir_dentaire_id = CValue::get("devenir_dentaire_id");
// Liste des étudiants
$etudiant = new CMediusers();
$etudiants = $etudiant->loadListFromType(array("Dentiste"), PERM_READ);
$devenir_dentaire = new CDevenirDentaire();
$devenir_dentaire->load($devenir_dentaire_id);
$actes_dentaires = $devenir_dentaire->loadRefsActesDentaires();
foreach ($actes_dentaires as $_acte_dentaire) {
    $devenir_dentaire->_total_ICR += $_acte_dentaire->ICR;
    $devenir_dentaire->_max_ICR = max($devenir_dentaire->_max_ICR, $_acte_dentaire->ICR);
}
// Calcul de :
// - ICR réalisé
// - ICR moyen
// - ICR max déjà réalisé
$icr_base = CAppUI::conf("aphmOdonto icr_base");
$ds = CSQLDataSource::get("std");
$etudiants_calcul_icr = array();
foreach ($etudiants as $_etudiant) {
    $_etudiant->loadRefFunction();
示例#4
0
    $order->updateFormFields();
    $order->loadRefsFwd();
    $order->loadRefAddress();
    $order->updateCounts();
    if ($order->object_class) {
        $order->_ref_object->updateFormFields();
        $order->_ref_object->loadRefsFwd();
    }
    foreach ($order->_ref_order_items as $_item) {
        if ($_item->septic) {
            $order->_septic = true;
        }
        if ($_item->lot_id) {
            $_item->loadRefLot();
            $order->_has_lot_numbers = true;
        }
        if ($order->object_id) {
            $_item->_ref_dmi = CDMI::getFromProduct($_item->loadReference()->loadRefProduct());
        }
    }
}
$pharmacien = new CMediusers();
$pharmaciens = $pharmacien->loadListFromType(array("Pharmacien"));
if (count($pharmaciens)) {
    $pharmacien = reset($pharmaciens);
}
// Smarty template
$smarty = new CSmartyDP();
$smarty->assign('order', $order);
$smarty->assign('pharmacien', $pharmacien);
$smarty->display('vw_order_form.tpl');
示例#5
0
 /**
  * Load users
  *
  * @param string $type Type
  *
  * @return CMediusers[]
  */
 function loadRefsUsers($type = null)
 {
     $user = new CMediusers();
     if (!$type) {
         $where = array("function_id" => "= '{$this->function_id}'", "actif" => "= '1'");
         $ljoin = array("users" => "`users`.`user_id` = `users_mediboard`.`user_id`");
         $order = "`users`.`user_last_name`, `users`.`user_first_name`";
         return $this->_ref_users = $user->loadList($where, $order, null, null, $ljoin);
     }
     return $this->_ref_users = $user->loadListFromType($type, PERM_READ, $this->function_id);
 }
示例#6
0
CCanDo::checkRead();
$mean_fields = array("age", "wash_volume", "saved_volume", "transfused_volume", "hgb_pocket", "hgb_patient");
$possible_filters = array_merge(array('chir_id', 'anesth_id', 'codes_ccam', 'code_asa', 'cell_saver_id'), $mean_fields);
$filters = CValue::getOrSession('filters', array());
$months_count = CValue::getOrSession('months_count', 12);
$months_relative = CValue::getOrSession('months_relative', 0);
$comparison = CValue::getOrSession('comparison', $possible_filters);
$comparison_left = CValue::getOrSession('comparison_left');
$comparison_right = CValue::getOrSession('comparison_right');
$mode = CValue::get('mode');
foreach ($possible_filters as $n) {
    if (!isset($filters[$n])) {
        $filters[$n] = null;
    }
}
$cell_saver = new CCellSaver();
$cell_savers = $cell_saver->loadList(null, "marque, modele");
$user = new CMediusers();
$user->load(CAppUI::$instance->user_id);
$mediuser = new CMediusers();
$fields = array("anesth_id" => $mediuser->loadListFromType(array('Anesthésiste')), "chir_id" => $mediuser->loadListFromType(array('Chirurgien'), $user->isAnesth() ? null : PERM_READ), "codes_asa" => range(1, 5), "cell_saver_id" => $cell_savers);
$smarty = new CSmartyDP();
// Filter
$smarty->assign('filters', $filters);
$smarty->assign('months_relative', $months_relative);
$smarty->assign('months_count', $months_count);
$smarty->assign('mode', $mode);
// Lists
$smarty->assign('fields', $fields);
$smarty->assign('mean_fields', $mean_fields);
$smarty->display('vw_stats.tpl');
 *
 * @package    Mediboard
 * @subpackage dPpersonnel
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision:$
 */
CCanDo::checkEdit();
if (!($plageop_id = CValue::getOrSession("plageop_id"))) {
    CAppUI::setMsg("Vous devez choisir une plage opératoire", UI_MSG_WARNING);
    CAppUI::redirect("m=dPbloc&tab=vw_edit_planning");
}
// Infos sur la plage opératoire
$plage = new CPlageOp();
$plage->load($plageop_id);
if (!$plage->temps_inter_op) {
    $plage->temps_inter_op = "00:00:00";
}
// liste des anesthesistes
$mediuser = new CMediusers();
$listAnesth = $mediuser->loadListFromType(array("Anesthésiste"));
// Chargement du personnel
$listPers = $plage->loadPersonnelDisponible(null, true);
$affectations_plage = $plage->_ref_affectations_personnel;
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("affectations_plage", $affectations_plage);
$smarty->assign("listPers", $listPers);
$smarty->assign("listAnesth", $listAnesth);
$smarty->assign("plage", $plage);
$smarty->display("inc_view_personnel_plage.tpl");
示例#8
0
    $fiche->loadRefsFwd();
    $fiche->loadRefItems();
    foreach ($listCategories as $keyCat => $_categorie) {
        foreach ($fiche->_ref_items as $keyItem => $_item) {
            if ($_item->ei_categorie_id == $keyCat) {
                if (!isset($catFiche[$_categorie->nom])) {
                    $catFiche[$_categorie->nom] = array();
                }
                $catFiche[$_categorie->nom][] = $_item;
            }
        }
    }
}
$user = new CMediusers();
/** @var CMediusers[] $listUsersTermine */
$listUsersTermine = $user->loadListFromType();
// Chargement de la liste des Chef de services / utilisateur
$module = CModule::getInstalled("dPqualite");
$perm = new CPermModule();
/** @var CMediusers[] $listUsersEdit */
$listUsersEdit = $user->loadListFromType(null, PERM_READ);
foreach ($listUsersEdit as $keyUser => $_user) {
    if (!$perm->getInfoModule("permission", $module->mod_id, PERM_EDIT, $keyUser)) {
        unset($listUsersEdit[$keyUser]);
    }
}
/** @var CEiItem[] $items */
$items = array();
if ($evenements) {
    $where = array();
    $where["ei_categorie_id"] = " = '{$evenements}'";
//blocs
$bloc = new CBlocOperatoire();
$bloc->type = "obst";
$bloc->group_id = $group->_id;
/** @var CBlocOperatoire[] $blocs */
$blocs = $bloc->loadMatchingList();
$salles = array();
foreach ($blocs as $_bloc) {
    $salles = $_bloc->loadRefsSalles();
    foreach ($salles as $_salle) {
        $salles[$_salle->_id] = $_salle->_id;
    }
}
// anesth
$anesth = new CMediusers();
$anesths = $anesth->loadListFromType(array("Anesthésiste"), PERM_READ);
/** @var COperation[] $ops */
$ops = $op->loadList($where, "date DESC, time_operation", null, null, $ljoin);
CMbObject::massLoadFwdRef($ops, "sejour_id");
CMbObject::massLoadFwdRef($ops, "anesth_id");
$chirs = CMbObject::massLoadFwdRef($ops, "chir_id");
CMbObject::massLoadFwdRef($chirs, "function_id");
foreach ($ops as $_op) {
    $_op->loadRefChir()->loadRefFunction();
    $_op->loadRefAnesth();
    $_op->loadRefSalle();
    $_op->loadRefPlageOp();
    $sejour = $_op->loadRefSejour();
    $sejour->loadRefCurrAffectation();
    $grossesse = $sejour->loadRefGrossesse();
    $grossesse->loadRefsNaissances();
示例#10
0
$offline = CValue::get("offline", false);
$hour = CMbDT::time(null);
$board = CValue::get("board", 1);
$boardItem = CValue::get("boardItem", 1);
$consult = new CConsultation();
$nb_anesth = 0;
$cabinets = CMediusers::loadFonctions(PERM_EDIT, null, "cabinet");
if ($mode_urgence) {
    $group = CGroups::loadCurrent();
    $cabinet_id = $group->service_urgences_id;
}
// Récupération de la liste des praticiens
$praticiens = array();
$cabinet = new CFunctions();
if ($mode_maternite) {
    $praticiens = $mediuser->loadListFromType(array("Sage Femme"));
} elseif ($cabinet_id) {
    $praticiens = CConsultation::loadPraticiens(PERM_EDIT, $cabinet_id, null, true);
    $cabinet->load($cabinet_id);
}
// Praticiens disponibles ?
$all_prats = $praticiens;
if ($consult->_id) {
    $date = $consult->_ref_plageconsult->date;
    CValue::setSession("date", $date);
}
// Récupération des plages de consultation du jour et chargement des références
$listPlages = array();
$heure_limit_matin = CAppUI::conf("dPcabinet CPlageconsult hour_limit_matin");
foreach ($praticiens as $prat) {
    if ($prat->_user_type == 4) {
<?php

/**
 * $Id$
 *  
 * @category dPurgences
 * @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();
$keywords = CValue::get("ide_responsable_id_view");
$group = CGroups::loadCurrent();
if ($keywords == "") {
    $keywords = "%%";
}
$mediuser = new CMediusers();
$matches = $mediuser->loadListFromType(array("Infirmière"), PERM_READ, $group->service_urgences_id, $keywords, true, true);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("keywords", $keywords);
$smarty->assign("matches", $matches);
$smarty->display("inc_autocomplete_ide_responsable.tpl");