当前位置: 首页>>代码示例>>PHP>>正文


PHP CMediusers::loadList方法代码示例

本文整理汇总了PHP中CMediusers::loadList方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::loadList方法的具体用法?PHP CMediusers::loadList怎么用?PHP CMediusers::loadList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMediusers的用法示例。


在下文中一共展示了CMediusers::loadList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CConsultation

    $prats = $user->loadPraticiens(PERM_READ);
    $where["plageconsult.chir_id"] = CSQLDataSource::prepareIn(array_keys($prats));
} else {
    $where["plageconsult.chir_id"] = "= '{$user->_id}'";
}
/* @var CConsultation[] $consultations*/
$consultation = new CConsultation();
$consultations = $consultation->loadList($where, null, null, null, $ljoin);
$totals["consultations"] = count($consultations);
/** @var CPlageConsult[] $plages */
$plages = CStoredObject::massLoadFwdRef($consultations, "plageconsult_id");
CStoredObject::massLoadFwdRef($consultations, "sejour_id");
CStoredObject::massLoadFwdRef($consultations, "patient_id");
// Pré-chargement des users
$where = array("user_id" => CSQLDataSource::prepareIn(CMbArray::pluck($plages, "chir_id")));
$user->loadList($where);
/** @var CMediusers[] $chirs */
$chirs = CStoredObject::massLoadFwdRef($plages, "chir_id");
CStoredObject::massLoadFwdRef($chirs, "function_id");
CStoredObject::massLoadBackRefs($consultations, "actes_ccam");
foreach ($consultations as $key => $_consult) {
    // Chargemement des codes CCAM
    $_consult->loadExtCodesCCAM();
    $codes_ccam = $_consult->_ext_codes_ccam;
    // Nombre d'acte cotés par le praticien et réinitialisation du count pour le cache
    $nb_actes_ccam = count($_consult->loadRefsActesCCAM());
    // Aucun acte prévu ou coté
    if (!count($codes_ccam) && !$_consult->_count_actes) {
        $_consult->loadRefSejour();
        $_consult->loadRefPraticien()->loadRefFunction();
        $_consult->loadRefPatient();
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:ajax_list_interv_non_cotees.php

示例2: explode

 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkEdit();
$sejour_id = CValue::get("sejour_id");
$operation_id = CValue::get("operation_id");
$operateur_ids = CValue::get("operateur_ids");
if (!is_array($operateur_ids)) {
    $operateur_ids = explode("-", $operateur_ids);
    CMbArray::removeValue("", $operateur_ids);
}
if (count($operateur_ids)) {
    $operateur = new CMediusers();
    $where = array("user_id" => "IN(" . implode(",", $operateur_ids) . ")");
    $operateurs = $operateur->loadList($where);
} else {
    $operateurs = array();
}
$poses = array();
if ($operation_id) {
    $interv = new COperation();
    $interv->load($operation_id);
    $poses = $interv->loadRefsPosesDispVasc(true);
} elseif ($sejour_id) {
    $sejour = new CSejour();
    $sejour->load($sejour_id);
    $poses = $sejour->loadRefsPosesDispVasc(true);
}
// Création du template
$smarty = new CSmartyDP();
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:ajax_list_pose_disp_vasc.php

示例3: CMediusers

/**
 * $Id: httpreq_temps_prepa.php 24959 2014-09-25 10:13:26Z rhum1 $
 *
 * @package    Mediboard
 * @subpackage dPstats
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 24959 $
 */
date_default_timezone_set("UTC");
CCanDo::checkEdit();
$intervalle = CValue::get("intervalle", "none");
// Liste des Praticiens
$user = new CMediusers();
/** @var CMediusers[] $listPrats */
$listPrats = $user->loadList();
// Initialisation des variables
$preparation = array();
$result = array();
// Vide la table contenant les données
$ds = CSQLDataSource::get("std");
$ds->exec("TRUNCATE `temps_prepa`");
$ds->error();
foreach ($listPrats as $_prat) {
    //Récupération des opérations par chirurgien
    $sql = "SELECT operations.plageop_id,TIME_TO_SEC(entree_salle) AS sec_entree, " . "\nTIME_TO_SEC(sortie_salle) AS sec_sortie" . "\nFROM operations" . "\nINNER JOIN plagesop" . "\nON operations.plageop_id = plagesop.plageop_id" . "\nWHERE operations.chir_id = '{$_prat->user_id}'" . "\nAND annulee = '0'" . "\nAND entree_salle IS NOT NULL" . "\nAND sortie_salle IS NOT NULL";
    switch ($intervalle) {
        case "month":
            $sql .= "\nAND plagesop.date BETWEEN '" . CMbDT::date("-1 month") . "' AND '" . CMbDT::date() . "'";
            break;
        case "6month":
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:httpreq_temps_prepa.php

示例4: CFunctions

// les plannings sinon laisser son prat_id pour afficher son planning perso
if ($praticien->isFromType(array("Anesthésiste")) && !$filter->_planning_perso) {
    $filter->_prat_id = null;
}
// Filtre sur les praticiens ou les spécialités
$function = new CFunctions();
$functions = array();
$praticiens = array();
// Aucun filtre de séléctionné : tous les éléments auxquels on a le droit
if (!$filter->_specialite && !$filter->_prat_id) {
    if (!$user->isFromType(array("Anesthésiste")) && !$praticien->isFromType(array("Anesthésiste"))) {
        $functions = $function->loadListWithPerms(PERM_READ);
        $praticiens = $user->loadPraticiens();
    } else {
        $functions = $function->loadList();
        $praticiens = $praticien->loadList();
    }
} elseif ($filter->_specialite) {
    // Filtre sur la specialité : la spec et ses chirs primaires et secondaires
    $function->load($filter->_specialite);
    $function->loadBackRefs("users");
    $function->loadBackRefs("secondary_functions");
    $functions[$function->_id] = $function;
    $praticiens = $function->_back["users"];
    /** @var CSecondaryFunction $sec_func */
    foreach ($function->_back["secondary_functions"] as $sec_func) {
        if (!isset($praticiens[$sec_func->user_id])) {
            $sec_func->loadRefUser();
            $praticiens[$sec_func->user_id] = $sec_func->_ref_user;
        }
    }
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:view_planning.php

示例5: array

CCanDo::checkRead();
CApp::setTimeLimit(240);
CApp::setMemoryLimit("1024M");
$plannings = array();
// Chargement de la liste des kines
$date = CValue::get("date", CMbDT::date());
$sunday = CMbDT::date("next sunday", CMbDT::date("- 1 DAY", $date));
$monday = CMbDT::date("-6 days", $sunday);
$where = array();
$where["debut"] = "BETWEEN '{$monday} 00:00:00' and '{$sunday} 23:59:59'";
$mediuser = new CMediusers();
$ljoin = array();
$ljoin["evenement_ssr"] = "evenement_ssr.therapeute_id = users_mediboard.user_id";
$where["evenement_ssr.evenement_ssr_id"] = "IS NOT NULL";
$group = "users_mediboard.user_id";
$kines = $mediuser->loadList($where, null, null, $group, $ljoin);
CPrescriptionLine::$_load_for_delete = true;
// Parcours des kines et chargement du planning
foreach ($kines as $_kine) {
    $args_planning = array();
    $args_planning["kine_id"] = $_kine->_id;
    $args_planning["surveillance"] = 0;
    $args_planning["large"] = 1;
    $args_planning["print"] = 1;
    $args_planning["height"] = 600;
    $args_planning["date"] = $date;
    // Chargement du planning de technicien
    $plannings[$_kine->_id]["technicien"] = CApp::fetch("ssr", "ajax_planning_technicien", $args_planning);
    // Chargement du planning de surveillance
    $args_planning["surveillance"] = 1;
    $plannings[$_kine->_id]["surveillance"] = CApp::fetch("ssr", "ajax_planning_technicien", $args_planning);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:offline_plannings_techniciens.php

示例6: array

    $where = array();
    $where["affectation_uf.uf_id"] = "= '" . $affectation->_ref_uf_medicale->_id . "'";
    $where[] = "object_class = 'CMediusers' OR object_class = 'CFunctions'";
    $aff_ufs = new CAffectationUniteFonctionnelle();
    $affs = $aff_ufs->loadList($where);
    foreach ($affs as $_aff) {
        if ($_aff->object_class == "CMediusers") {
            $users[$_aff->object_id] = $_aff->object_id;
        } else {
            $function_med[$_aff->object_id] = $_aff->object_id;
        }
    }
    $where = array();
    $where["actif"] = "= '1'";
    $where[] = "user_id " . CSQLDataSource::prepareIn(array_keys($users)) . "OR function_id " . CSQLDataSource::prepareIn(array_keys($function_med));
    $praticiens = $user->loadList($where);
} else {
    $praticiens = $user->loadPraticiens(PERM_EDIT, $function->_id);
}
foreach ($praticiens as $prat) {
    $prat->loadRefFunction();
    foreach ($auf->loadListFor($prat) as $_auf) {
        $uf = $_auf->loadRefUniteFonctionnelle();
        $ufs_medicale[$uf->_id] = $uf;
    }
}
$ufs_medicale = array_reverse($ufs_medicale);
$ufs_soins = array_reverse($ufs_soins);
$ufs_hebergement = array_reverse($ufs_hebergement);
// Création du template
$smarty = new CSmartyDP();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_vw_association_uf.php

示例7: loadListFromType

 /**
  * Chargement de la liste des utilisateurs à partir de leur type
  *
  * @param array  $user_types  Tableau des types d'utilisateur
  * @param int    $permType    Niveau de permission
  * @param int    $function_id Filtre sur une fonction spécifique
  * @param string $name        Filtre sur un nom d'utilisateur
  * @param bool   $actif       Filtre sur les utilisateurs actifs
  * @param bool   $secondary   Inclut les fonctions secondaires dans le filtre sur les fonctions
  * @param bool   $reverse     Utilise les types en inclusion ou en exclusion
  *
  * @return CMediusers[]
  */
 function loadListFromType($user_types = null, $permType = PERM_READ, $function_id = null, $name = null, $actif = true, $secondary = false, $reverse = false)
 {
     $where = array();
     $ljoin = array();
     if ($actif) {
         $where["users_mediboard.actif"] = "= '1'";
     }
     // Filters on users values
     $ljoin["users"] = "`users`.`user_id` = `users_mediboard`.`user_id`";
     if ($name) {
         $where["users.user_last_name"] = "LIKE '{$name}%'";
     }
     $ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
     $ljoin["secondary_function"] = "secondary_function.user_id = users_mediboard.user_id";
     $ljoin[] = "functions_mediboard AS sec_fnc_mb ON sec_fnc_mb.function_id = secondary_function.function_id";
     if ($function_id) {
         if ($secondary) {
             $where[] = "'{$function_id}' IN (users_mediboard.function_id, secondary_function.function_id)";
         } else {
             $where["users_mediboard.function_id"] = "= '{$function_id}'";
         }
     }
     // Filter on current group or users in secondaries functions
     $group = CGroups::loadCurrent();
     $where[] = "functions_mediboard.group_id = '{$group->_id}' OR sec_fnc_mb.group_id = '{$group->_id}'";
     // Filter on user type
     if (is_array($user_types)) {
         $utypes_flip = array_flip(CUser::$types);
         foreach ($user_types as &$_type) {
             $_type = $utypes_flip[$_type];
         }
         $where["users.user_type"] = $reverse ? CSQLDataSource::prepareNotIn($user_types) : CSQLDataSource::prepareIn($user_types);
     }
     $order = "`users`.`user_last_name`, `users`.`user_first_name`";
     $group_by = array("user_id");
     // Get all users
     $mediuser = new CMediusers();
     /** @var CMediusers[] $mediusers */
     $mediusers = $mediuser->loadList($where, $order, null, $group_by, $ljoin);
     // Mass fonction standard preloading
     self::massLoadFwdRef($mediusers, "function_id");
     self::massCountBackRefs($mediusers, "secondary_functions");
     // Filter a posteriori to unable mass preloading of function
     self::filterByPerm($mediusers, $permType);
     // Associate cached function
     foreach ($mediusers as $_mediuser) {
         $_mediuser->loadRefFunction();
     }
     return $mediusers;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:63,代码来源:CMediusers.class.php

示例8: CMediusers

$mediuser = new CMediusers();
$ljoin = array();
$ljoin["users"] = "users.user_id = users_mediboard.user_id";
$ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
$where = array();
$where["users_mediboard.actif"] = "= '1'";
$where["functions_mediboard.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
if ($interv) {
    $last_space = strrpos($interv, " ");
    $last_name = substr($interv, 0, $last_space);
    $where[] = "users.user_last_name = '{$last_name}'\n  OR users.user_last_name = '{$last_name}'";
}
$limit = "{$current}, {$step}";
$order = "users.user_last_name ASC, users.user_first_name ASC";
$total = $mediuser->countList($where, null, $ljoin);
/** @var CMediusers[] $mediusers */
$mediusers = $mediuser->loadList($where, $order, $limit, null, $ljoin);
foreach ($mediusers as $_mediuser) {
    $_mediuser->loadRefFunction();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("mediuser", $mediuser);
$smarty->assign("intervenants", $intervenants);
$smarty->assign("interv", $interv);
$smarty->assign("mediusers", $mediusers);
$smarty->assign("current", $current);
$smarty->assign("step", $step);
$smarty->assign("total", $total);
$smarty->assign("exclude_without_code", $exclude_without_code);
$smarty->display("edit_codes_intervenants.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:edit_codes_intervenants.php

示例9: graphPraticienDiscipline

/**
 * Récupération du graphique du nombre d'interventions par praticien
 *
 * @param string $debut         Date de début
 * @param string $fin           Date de fin
 * @param int    $prat_id       Identifiant du praticien
 * @param int    $salle_id      Identifiant de la salle
 * @param int    $bloc_id       Identifiant du bloc
 * @param int    $func_id       Identifiant du cabinet
 * @param int    $discipline_id Identifiant de la discipline
 * @param string $codeCCAM      Code CCAM
 * @param string $type_hospi    Type d'hospitalisation
 * @param bool   $hors_plage    Prise en compte des hors plage
 *
 * @return array
 */
function graphPraticienDiscipline($debut = null, $fin = null, $prat_id = 0, $salle_id = 0, $bloc_id = 0, $func_id = 0, $discipline_id = 0, $codeCCAM = "", $type_hospi = "", $hors_plage = true)
{
    if (!$debut) {
        $debut = CMbDT::date("-1 YEAR");
    }
    if (!$fin) {
        $fin = CMbDT::date();
    }
    $discipline = new CDiscipline();
    $discipline->load($discipline_id);
    $ticks = array();
    $serie_total = array('label' => 'Total', 'data' => array(), 'markers' => array('show' => true), 'bars' => array('show' => false));
    for ($i = $debut; $i <= $fin; $i = CMbDT::date("+1 MONTH", $i)) {
        $ticks[] = array(count($ticks), CMbDT::transform("+0 DAY", $i, "%m/%Y"));
        $serie_total['data'][] = array(count($serie_total['data']), 0);
    }
    $user = new CMediusers();
    $ljoin = array("users" => "users.user_id = users_mediboard.user_id", "functions_mediboard" => "functions_mediboard.function_id = users_mediboard.function_id");
    $where = array("functions_mediboard.group_id" => "= '" . CGroups::loadCurrent()->_id . "'");
    if ($discipline_id) {
        $where["users_mediboard.discipline_id"] = " = '{$discipline_id}'";
    }
    if ($prat_id) {
        $where["users_mediboard.user_id"] = " = '{$prat_id}'";
    }
    $user_types = array("Chirurgien", "Anesthésiste", "Médecin");
    $utypes_flip = array_flip(CUser::$types);
    if (is_array($user_types)) {
        foreach ($user_types as $key => $value) {
            $user_types[$key] = $utypes_flip[$value];
        }
        $where["users.user_type"] = CSQLDataSource::prepareIn($user_types);
    }
    $order = "`users`.`user_last_name`, `users`.`user_first_name`";
    $users = $user->loadList($where, $order, null, null, $ljoin);
    // Gestion du hors plage
    $where_hors_plage = !$hors_plage ? "AND operations.plageop_id IS NOT NULL" : "";
    $total = 0;
    $series = array();
    foreach ($users as $user) {
        $serie = array('data' => array(), 'label' => utf8_encode($user->_view));
        $query = "SELECT COUNT(operations.operation_id) AS total,\r\n      DATE_FORMAT(operations.date, '%m/%Y') AS mois,\r\n      DATE_FORMAT(operations.date, '%Y%m') AS orderitem,\r\n      users_mediboard.user_id\r\n      FROM operations\r\n      INNER JOIN sallesbloc ON operations.salle_id = sallesbloc.salle_id\r\n      LEFT JOIN sejour ON operations.sejour_id = sejour.sejour_id\r\n      LEFT JOIN users_mediboard ON operations.chir_id = users_mediboard.user_id\r\n      LEFT JOIN users ON users_mediboard.user_id = users.user_id\r\n      WHERE operations.annulee = '0'\r\n      AND operations.date BETWEEN '{$debut}' AND '{$fin}'\r\n      {$where_hors_plage}\r\n      AND sejour.group_id = '" . CGroups::loadCurrent()->_id . "'\r\n      AND users_mediboard.user_id = '{$user->_id}'";
        if ($type_hospi) {
            $query .= "\nAND sejour.type = '{$type_hospi}'";
        }
        if ($discipline_id) {
            $query .= "\nAND users_mediboard.discipline_id = '{$discipline_id}'";
        }
        if ($codeCCAM) {
            $query .= "\nAND operations.codes_ccam LIKE '%{$codeCCAM}%'";
        }
        if ($salle_id) {
            $query .= "\nAND sallesbloc.salle_id = '{$salle_id}'";
        } elseif ($bloc_id) {
            $query .= "\nAND sallesbloc.bloc_id = '{$bloc_id}'";
        }
        $query .= "\nGROUP BY mois ORDER BY orderitem";
        $result = $user->_spec->ds->loadlist($query);
        foreach ($ticks as $i => $tick) {
            $f = true;
            foreach ($result as $r) {
                if ($tick[1] == $r["mois"]) {
                    $serie['data'][] = array($i, $r["total"]);
                    $serie_total["data"][$i][1] += $r["total"];
                    $total += $r['total'];
                    $f = false;
                }
            }
            if ($f) {
                $serie["data"][] = array(count($serie["data"]), 0);
            }
        }
        $series[] = $serie;
    }
    $series[] = $serie_total;
    $title = "Nombre d'interventions par praticien";
    $subtitle = "{$total} opérations";
    if ($discipline_id) {
        $subtitle .= " - {$discipline->_view}";
    }
    if ($codeCCAM) {
        $subtitle .= " - CCAM : {$codeCCAM}";
    }
    if ($type_hospi) {
//.........这里部分代码省略.........
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:101,代码来源:graph_pratdiscipline.php

示例10: graphOccupationSalle

/**
 * Récupération du graphique de l'occupation de salle de bloc
 *
 * @param string $debut         Date de début
 * @param string $fin           Date de fin
 * @param int    $prat_id       Identifiant du praticien
 * @param int    $salle_id      Identifiant de la salle
 * @param int    $bloc_id       Identifiant du bloc
 * @param int    $discipline_id Identifiant de la discipline
 * @param string $codeCCAM      Code CCAM
 * @param string $type_hospi    Type d'hospitalisation
 * @param bool   $hors_plage    Pris en compte du hors plage
 * @param string $type_duree    Type de durée (jours / mois)
 *
 * @return array
 */
function graphOccupationSalle($debut = null, $fin = null, $prat_id = 0, $salle_id = 0, $bloc_id = 0, $func_id = 0, $discipline_id = null, $codeCCAM = "", $type_hospi = "", $hors_plage = true, $type_duree = "MONTH")
{
    $ds = CSQLDataSource::get("std");
    if ($type_duree == "MONTH") {
        $type_duree_fr = "mois";
        $date_format = "%m/%Y";
        $order_key = "%Y%m";
    } else {
        $type_duree_fr = "jour";
        $date_format = "%d/%m/%Y";
        $order_key = "%Y%m%d";
    }
    if (!$debut) {
        $debut = CMbDT::date("-1 YEAR");
    }
    if (!$fin) {
        $fin = CMbDT::date();
    }
    $prat = new CMediusers();
    $prat->load($prat_id);
    $salle = new CSalle();
    $salle->load($salle_id);
    $bloc = new CBlocOperatoire();
    $bloc->load($bloc_id);
    $discipline = new CDiscipline();
    $discipline->load($discipline_id);
    $ticks = array();
    for ($i = $debut; $i <= $fin; $i = CMbDT::date("+1 {$type_duree}", $i)) {
        $ticks[] = array(count($ticks), CMbDT::transform("+0 DAY", $i, $date_format));
    }
    $salles = CSalle::getSallesStats($salle_id, $bloc_id);
    $user = new CMediusers();
    // Chargement des praticiens
    $where = array();
    $where["users_mediboard.actif"] = "= '1'";
    if ($discipline->_id) {
        $where["users_mediboard.discipline_id"] = "= '{$discipline->_id}'";
    }
    // Filter on user type
    $utypes_flip = array_flip(CUser::$types);
    $user_types = array("Chirurgien", "Anesthésiste", "Médecin", "Dentiste");
    foreach ($user_types as &$_type) {
        $_type = $utypes_flip[$_type];
    }
    $where["users.user_type"] = CSQLDataSource::prepareIn($user_types);
    $ljoin = array("users" => "users.user_id = users_mediboard.user_id");
    $order = "users_mediboard.function_id, users_mediboard.discipline_id, users.user_last_name, users.user_first_name";
    $listPrats = $user->loadList($where, $order, null, null, $ljoin);
    $seriesMoy = array();
    $seriesTot = array();
    $totalMoy = 0;
    $totalTot = 0;
    // Gestion du hors plage
    $where_hors_plage = !$hors_plage ? "AND operations.plageop_id IS NOT NULL" : "";
    // First serie : Interv
    $serieMoy = $serieTot = array('data' => array(), 'label' => utf8_encode("Intervention"));
    $query = "SELECT COUNT(*) AS nbInterv,\r\n    SUM(TIME_TO_SEC(operations.fin_op)-TIME_TO_SEC(operations.debut_op)) AS duree_total,\r\n    DATE_FORMAT(operations.date, '{$date_format}') AS {$type_duree_fr},\r\n    DATE_FORMAT(operations.date, '{$order_key}') AS orderitem\r\n    FROM operations\r\n    LEFT JOIN sejour ON operations.sejour_id = sejour.sejour_id\r\n    LEFT JOIN plagesop ON operations.plageop_id = plagesop.plageop_id\r\n    LEFT JOIN users_mediboard ON operations.chir_id = users_mediboard.user_id\r\n    LEFT JOIN users ON operations.chir_id = users.user_id\r\n    WHERE operations.annulee = '0'\r\n    AND operations.date BETWEEN '{$debut}' AND '{$fin}'\r\n    {$where_hors_plage}\r\n    AND operations.debut_op IS NOT NULL\r\n    AND operations.fin_op IS NOT NULL\r\n    AND operations.debut_op < operations.fin_op\r\n    AND sejour.group_id = '" . CGroups::loadCurrent()->_id . "'\r\n    AND operations.salle_id " . CSQLDataSource::prepareIn(array_keys($salles)) . "\r\n    AND users.user_id " . CSQLDataSource::prepareIn(array_keys($listPrats), $prat_id);
    if ($type_hospi) {
        $query .= "\nAND sejour.type = '{$type_hospi}'";
    }
    if ($discipline_id) {
        $query .= "\nAND users_mediboard.discipline_id = '{$discipline_id}'";
    }
    if ($codeCCAM) {
        $query .= "\nAND operations.codes_ccam LIKE '%{$codeCCAM}%'";
    }
    $query .= "\nGROUP BY {$type_duree_fr} ORDER BY orderitem";
    $result = $ds->loadList($query);
    foreach ($ticks as $i => $tick) {
        $f = true;
        foreach ($result as $j => $r) {
            if ($tick[1] == $r["{$type_duree_fr}"]) {
                $nb_interv = $r["nbInterv"];
                $serieMoy['data'][] = array($i, $r["duree_total"] / (60 * $nb_interv));
                $totalMoy += $r["duree_total"] / (60 * $nb_interv);
                $serieTot['data'][] = array($i, $r["duree_total"] / (60 * 60));
                $totalTot += $r["duree_total"] / (60 * 60);
                $f = false;
            }
        }
        if ($f) {
            $serieMoy["data"][] = array(count($serieMoy["data"]), 0);
            $serieTot["data"][] = array(count($serieTot["data"]), 0);
        }
//.........这里部分代码省略.........
开发者ID:fbone,项目名称:mediboard4,代码行数:101,代码来源:graph_occupation_salle_total.php

示例11: loadRefsUsers

 /**
  * 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);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:18,代码来源:CFunctions.class.php

示例12: CMediusers

$date = CValue::getOrSession("date", CMbDT::date());
$group_id = CGroups::loadCurrent()->_id;
$user = CMediusers::get();
$prat_id = CValue::getOrSession("praticien_id");
$function_id = CValue::get("function_id");
if (!$prat_id && !$function_id) {
    $prat_id = $user->_id;
}
$prat = new CMediusers();
$where = array();
if ($function_id) {
    $where["function_id"] = " = '{$function_id}'";
} else {
    $where["user_id"] = " = '{$prat_id}'";
}
$prats = $prat->loadList($where);
$function = new CFunctions();
$function->load($function_id);
$ds = $function->getDS();
$calendar = new CPlanningMonth($date);
$calendar->title = htmlentities(CMbDT::format($date, "%B %Y"));
foreach ($prats as $_prat) {
    // plages de congés (si mode prat)
    if (!$function_id && CModule::getActive("dPpersonnel")) {
        $plage_cong = new CPlageConge();
        $plages_cong = $plage_cong->loadListForRange($_prat->_id, $calendar->date_min, $calendar->date_max);
        foreach ($plages_cong as $_conge) {
            $first_day = $_conge->date_debut;
            $last_day = $_conge->date_fin;
            $replaced_by = new CMediusers();
            $replaced_by->load($_conge->replacer_id);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_vw_month.php

示例13: CMediusers

 if (!$sejour->_id) {
     CAppUI::stepAjax("Le sejour n'a pas été retrouvé dans Mediboard par le NDA : '{$NDA}'", UI_MSG_WARNING);
     $results["count_nda_nt"]++;
     continue;
 }
 // Traitement du praticien responsable de l'intervention
 $mediuser = new CMediusers();
 $where = array("users_mediboard.adeli" => "= '{$ADELI}'", "functions_mediboard.group_id" => "= '{$group_id}'");
 $ljoin = array("functions_mediboard" => "functions_mediboard.function_id = users_mediboard.function_id");
 $count = $mediuser->countList($where, null, $ljoin);
 if ($count == 0) {
     CAppUI::stepAjax("L'utilisateur '{$ADELI}' n'a pas été retrouvé dans Mediboard", UI_MSG_WARNING);
     $results["count_erreur"]++;
     continue;
 } elseif ($count > 1) {
     $mediusers = $mediuser->loadList($where, null, null, null, $ljoin);
     $list_view = implode(", ", CMbArray::pluck($mediusers, "_view"));
     CAppUI::stepAjax("Plusieurs utilisateurs correspondent à cette recherche (ADELI = {$ADELI}): %s", UI_MSG_WARNING, $list_view);
     $results["count_erreur"]++;
     continue;
 }
 $mediuser->loadObject($where, null, null, $ljoin);
 // Traitement de la date/heure début, et durée de l'opération
 $date_op = CMbDT::date($date_debut);
 $time_op = CMbDT::time($date_debut);
 $temps_op = CMbDT::subTime(CMbDT::time($date_debut), CMbDT::time($date_fin));
 // Recherche de la salle
 $salle = new CSalle();
 $where = array("nom" => "= '{$nom_salle}'", "bloc_id" => CSQLDataSource::prepareIn(array_keys($blocs)));
 if (!$salle->loadObject($where)) {
     CAppUI::stepAjax("La salle '{$nom_salle}' n'a pas été retrouvée dans Mediboard", UI_MSG_WARNING);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:add_operation_csv.php

示例14: CMediusers

$user = new CMediusers();
$where = array();
$where["users_mediboard.actif"] = "= '1'";
if ($discipline->_id) {
    $where["users_mediboard.discipline_id"] = "= '{$discipline->_id}'";
}
// Filter on user type
$utypes_flip = array_flip(CUser::$types);
$user_types = array("Chirurgien", "Anesthésiste", "Médecin", "Dentiste");
foreach ($user_types as &$_type) {
    $_type = $utypes_flip[$_type];
}
$where["users.user_type"] = CSQLDataSource::prepareIn($user_types);
$ljoin = array("users" => "users.user_id = users_mediboard.user_id");
$order = "users_mediboard.function_id, users_mediboard.discipline_id, users.user_last_name, users.user_first_name";
$listPrats = $user->loadList($where, $order, null, null, $ljoin);
// Gestion du hors plage
$where_hors_plage = !$hors_plage ? "AND operations.plageop_id IS NOT NULL" : "";
// Nombre totaux d'interventions
$tableau = array();
$query = "SELECT COUNT(*) AS nbInterv, users.user_id\n  FROM operations\n  LEFT JOIN sejour ON operations.sejour_id = sejour.sejour_id\n  LEFT JOIN users_mediboard ON operations.chir_id = users_mediboard.user_id\n  LEFT JOIN users ON operations.chir_id = users.user_id\n  WHERE operations.annulee = '0'\n  AND operations.date BETWEEN '{$debut}' AND '{$fin}'\n  {$where_hors_plage}\n  AND sejour.group_id = '" . CGroups::loadCurrent()->_id . "'\n  AND operations.salle_id " . CSQLDataSource::prepareIn(array_keys($salles)) . "\n  AND users.user_id " . CSQLDataSource::prepareIn(array_keys($listPrats));
if ($type_hospi) {
    $query .= "\nAND sejour.type = '{$type_hospi}'";
}
if ($discipline_id) {
    $query .= "\nAND users_mediboard.discipline_id = '{$discipline_id}'";
}
if ($codeCCAM) {
    $query .= "\nAND operations.codes_ccam LIKE '%{$codeCCAM}%'";
}
$query .= "\nGROUP BY users.user_id ORDER BY users.user_last_name, users.user_first_name";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:print_tab_occupation_salle.php

示例15: isset

$dossiers_medicaux_shared = CAppUI::conf("dPetablissement dossiers_medicaux_shared");
if (!$stats) {
    $index = isset($where["object_id"]) ? "object_id" : null;
    /** @var CUserLog[] $list */
    $list = $log->loadList($where, "date DESC", "{$start}, 100", null, null, $index);
    // Sort by id with PHP cuz dumbass MySQL won't limit rowscan before sorting
    // even though `date` is explicit as first intention sorter AND obvious index in most cases
    // Tends to be a known limitation
    array_multisort(CMbArray::pluck($list, "_id"), SORT_DESC, $list);
    $list_count = $log->countList($where, null, null, $index);
    $group_id = CGroups::loadCurrent()->_id;
    $users = CStoredObject::massLoadFwdRef($list, "user_id");
    CStoredObject::massLoadFwdRef($list, "object_id");
    // Mass loading des mediusers et des fonctions
    $mediuser = new CMediusers();
    $mediusers = $mediuser->loadList(array("user_id" => CSQLDataSource::prepareIn(array_keys($users))));
    CStoredObject::massLoadFwdRef($mediusers, "function_id");
    foreach ($list as $_log) {
        $_log->loadRefUser();
        $function = isset($mediusers[$_log->user_id]) ? $mediusers[$_log->user_id]->loadRefFunction() : $_log->_ref_user->loadRefMediuser()->loadRefFunction();
        if (!$is_admin && !$dossiers_medicaux_shared && $function->group_id != $group_id) {
            unset($list[$_log->_id]);
            continue;
        }
        $target = $_log->loadTargetObject();
        $_log->getOldValues();
    }
}
if ($csv) {
    ob_clean();
    $date = CMbDT::dateTime();
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:view_history.php


注:本文中的CMediusers::loadList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。