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


PHP CService::loadGroupList方法代码示例

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


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

示例1: CMediusers

$filter->_specialite = CValue::getOrSession("_specialite");
$filter->_filter_type = CValue::getOrSession("_filter_type");
$filter->_ccam_libelle = CValue::getOrSession("_ccam_libelle", "1");
$filter->_coordonnees = CValue::getOrSession("_coordonnees");
$filter->_notes = CValue::getOrSession("_notes");
$filter->_by_date = CValue::getOrSession("_by_date");
$listPrat = new CMediusers();
$listPrat = $listPrat->loadPraticiens(PERM_READ);
$listSpec = new CFunctions();
$listSpec = $listSpec->loadSpecialites(PERM_READ);
// Récupération de la liste des services
$where = array();
$where["externe"] = "= '0'";
$where["cancelled"] = "= '0'";
$service = new CService();
$services = $service->loadGroupList($where);
$yesterday = CMbDT::date("-1 day", $today);
$tomorrow = CMbDT::date("+1 day", $today);
$j2 = CMbDT::date("+2 day", $today);
$j3 = CMbDT::date("+3 day", $today);
$week_deb = CMbDT::date("last sunday", $today);
$week_fin = CMbDT::date("next sunday", $week_deb);
$week_deb = CMbDT::date("+1 day", $week_deb);
$next_week_deb = CMbDT::date("+1 day", $week_fin);
$next_week_fin = CMbDT::date("next sunday", $next_week_deb);
$yesterday_deb = "{$yesterday} 06:00:00";
$yesterday_fin = "{$yesterday} 21:00:00";
$today_deb = "{$today} 06:00:00";
$today_fin = "{$today} 21:00:00";
$tomorrow_deb = "{$tomorrow} 06:00:00";
$tomorrow_fin = "{$tomorrow} 21:00:00";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:form_print_planning.php

示例2: loadServicesUHCDRPU

 /**
  * Charge les services d'UHCD et d'urgence de l'établissement courant
  *
  * @return CService[]
  */
 static function loadServicesUHCDRPU()
 {
     $where = array();
     $clause = "uhcd = '1' OR urgence = '1'";
     $where[] = $clause;
     $where["cancelled"] = " = '0'";
     $service = new CService();
     /** @var CService[] $services */
     $services = $service->loadGroupList($where);
     foreach ($services as $_service) {
         $_service->loadRefsChambres();
         foreach ($_service->_ref_chambres as $_chambre) {
             $_chambre->loadRefsLits();
         }
     }
     return $services;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CService.class.php

示例3: CMediusers

$sans_anesth = CValue::getOrSession("sans_anesth", 0);
// Sélection du praticien
$mediuser = CMediusers::get();
$listPrat = $mediuser->loadPraticiens(PERM_EDIT);
foreach ($listPrat as $_prat) {
    $_prat->loadRefFunction();
}
$selPrat = CValue::getOrSession("selPrat", $mediuser->isPraticien() ? $mediuser->user_id : null);
$selPraticien = new CMediusers();
$selPraticien->load($selPrat);
$group = CGroups::loadCurrent();
if ($selPraticien->isAnesth()) {
    // Selection des différentes interventions de la journée par service
    $count_ops = array("ambu" => 0, "comp" => 0, "hors_plage" => 0);
    $service = new CService();
    $services = $service->loadGroupList();
    $interv = new COperation();
    $order = "operations.chir_id, operations.time_operation";
    $ljoin = array("plagesop" => "plagesop.plageop_id = operations.plageop_id", "sejour" => "sejour.sejour_id = operations.sejour_id", "affectation" => "affectation.sejour_id = sejour.sejour_id\r\n      AND '{$date}' BETWEEN DATE(affectation.entree)\r\n      AND DATE(affectation.sortie)", "lit" => "lit.lit_id = affectation.lit_id", "chambre" => "chambre.chambre_id = lit.chambre_id", "service" => "service.service_id = chambre.service_id");
    $where_anesth = "operations.anesth_id = '{$selPraticien->_id}' OR plagesop.anesth_id = '{$selPraticien->_id}'";
    if ($sans_anesth) {
        $where_anesth .= " OR operations.anesth_id IS NULL OR plagesop.anesth_id IS NULL";
    }
    $whereAmbu = array("operations.date" => "= '{$date}'", "sejour.type" => "= 'ambu'", "sejour.group_id" => "= '{$group->_id}'");
    $whereAmbu[] = $where_anesth;
    if (!$canceled) {
        $whereAmbu["operations.annulee"] = " = '0'";
    }
    $whereHospi = array("operations.date" => "= '{$date}'", "sejour.type" => "= 'comp'", "sejour.group_id" => "= '{$group->_id}'");
    $whereHospi[] = $where_anesth;
    if (!$canceled) {
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_idx_planning.php

示例4: graphPatParService

/**
 * Affichage du graphique de la réparition des patients par service
 *
 * @param date   $debut         Début de la période
 * @param date   $fin           Fin de la période
 * @param int    $prat_id       Filtre sur un praticien
 * @param int    $service_id    Filtre sur un service
 * @param string $type_adm      Filtre sur le type d'admission
 * @param int    $func_id       Filtre sur un cabinet
 * @param int    $discipline_id Filtre sur une discipline
 * @param int    $septique      Filtre sur les patients septiques
 * @param string $type_data     Choix du type de données
 *
 * @return array
 */
function graphPatParService($debut = null, $fin = null, $prat_id = 0, $service_id = 0, $type_adm = "", $func_id = 0, $discipline_id = 0, $septique = 0, $type_data = "prevue")
{
    if (!$debut) {
        $debut = CMbDT::date("-1 YEAR");
    }
    if (!$fin) {
        $fin = CMbDT::date();
    }
    $group_id = CGroups::loadCurrent()->_id;
    $prat = new CMediusers();
    $prat->load($prat_id);
    $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);
    }
    $where = array();
    if ($service_id) {
        $where["service_id"] = "= '{$service_id}'";
    }
    $service = new CService();
    $services = $service->loadGroupList($where);
    $sejour = new CSejour();
    $listHospis = array(1 => "Hospi complètes + ambu") + $sejour->_specs["type"]->_locales;
    $total = 0;
    $series = array();
    // Patients placés
    foreach ($services as $service) {
        $serie = array('data' => array(), 'label' => utf8_encode($service->nom));
        $query = "SELECT COUNT(DISTINCT sejour.sejour_id) AS total, service.nom AS nom,\r\n      DATE_FORMAT(affectation.entree, '%m/%Y') AS mois,\r\n      DATE_FORMAT(affectation.entree, '%Y%m') AS orderitem\r\n      FROM sejour\r\n      LEFT JOIN users_mediboard ON sejour.praticien_id = users_mediboard.user_id\r\n      LEFT JOIN affectation ON sejour.sejour_id = affectation.sejour_id\r\n      LEFT JOIN service ON affectation.service_id = service.service_id\r\n      WHERE\r\n        sejour.annule = '0' AND\r\n        sejour.group_id = '{$group_id}' AND\r\n        affectation.entree < '{$fin} 23:59:59' AND\r\n        affectation.sortie > '{$debut} 00:00:00' AND\r\n        service.service_id = '{$service->_id}'";
        if ($type_data == "reelle") {
            $query .= "\nAND sejour.entree_reelle BETWEEN  '{$debut} 00:00:00' AND '{$fin} 23:59:59'";
        }
        if ($prat_id) {
            $query .= "\nAND sejour.praticien_id = '{$prat_id}'";
        }
        if ($discipline_id) {
            $query .= "\nAND users_mediboard.discipline_id = '{$discipline_id}'";
        }
        if ($septique) {
            $query .= "\nAND sejour.septique = '{$septique}'";
        }
        if ($type_adm) {
            if ($type_adm == 1) {
                $query .= "\nAND (sejour.type = 'comp' OR sejour.type = 'ambu')";
            } else {
                $query .= "\nAND sejour.type = '{$type_adm}'";
            }
        }
        $query .= "\nGROUP BY mois ORDER BY orderitem";
        $result = $sejour->_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;
                    break;
                }
            }
            if ($f) {
                $serie["data"][] = array(count($serie["data"]), 0);
            }
        }
        $series[] = $serie;
    }
    // Patients non placés
    if (!$service_id) {
        $serie = array('data' => array(), 'label' => utf8_encode("Non placés"));
        $query = "SELECT COUNT(DISTINCT sejour.sejour_id) AS total, 'Non placés' AS nom,\r\n      DATE_FORMAT(sejour.entree_{$type_data}, '%m/%Y') AS mois,\r\n      DATE_FORMAT(sejour.entree_{$type_data}, '%Y%m') AS orderitem\r\n      FROM sejour\r\n      LEFT JOIN users_mediboard ON sejour.praticien_id = users_mediboard.user_id\r\n      LEFT JOIN  affectation ON sejour.sejour_id = affectation.sejour_id\r\n      WHERE \r\n        sejour.annule = '0' AND\r\n        sejour.group_id = '{$group_id}' AND\r\n        sejour.entree_{$type_data} < '{$fin} 23:59:59' AND\r\n        sejour.sortie_{$type_data} > '{$debut} 00:00:00' AND\r\n\r\n        affectation.affectation_id IS NULL";
        if ($prat_id) {
            $query .= "\nAND sejour.praticien_id = '{$prat_id}'";
        }
        if ($discipline_id) {
            $query .= "\nAND users_mediboard.discipline_id = '{$discipline_id}'";
        }
        if ($septique) {
            $query .= "\nAND sejour.septique = '{$septique}'";
        }
        if ($type_adm) {
//.........这里部分代码省略.........
开发者ID:fbone,项目名称:mediboard4,代码行数:101,代码来源:graph_patparservice.php

示例5: CService

 *
 * @package    Mediboard
 * @subpackage Hospi
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 21168 $
 */
CCanDo::checkRead();
// Récupération des paramètres
$service_id = CValue::postOrSession("service_id");
//Chargement de tous les services
$service = new CService();
$where = array();
$where["group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$where["cancelled"] = "= '0'";
$services = $service->loadGroupList($where, "nom ASC");
$service_selectionne = new CService();
$where["service_id"] = " = '{$service_id}'";
$service_selectionne->loadObject($where);
$chambre = new CChambre();
$where = array();
$where["service_id"] = " = '{$service_selectionne->_id}'";
$chambres_service = $chambre->loadGroupList($where);
$ljoin = array();
$ljoin["service"] = "service.service_id = chambre.service_id";
$ljoin["emplacement"] = "emplacement.chambre_id = chambre.chambre_id";
$where = array();
$where["annule"] = "= '0'";
$where["emplacement.plan_x"] = "IS NOT NULL";
$where["emplacement.plan_y"] = "IS NOT NULL";
$where["service.service_id"] = " = '{$service_id}'";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_plan_etage.php

示例6: graphJoursParService

/**
 * Récupération du graphique d'affichage du nombre de nuits passées
 * par service
 *
 * @param string $debut         Date de début
 * @param string $fin           Date de fin
 * @param int    $prat_id       Identifiant du praticien
 * @param int    $service_id    Identifiant du service
 * @param int    $type_adm      Type d'admission
 * @param int    $discipline_id Identifiant de la discipline
 * @param int    $septique      Filtre sur les séjours septiques
 * @param string $type_data     Type de données (réèlle ou prévue)
 *
 * @return array
 */
function graphJoursParService($debut = null, $fin = null, $prat_id = 0, $service_id = 0, $type_adm = 0, $func_id = 0, $discipline_id = 0, $septique = 0, $type_data = "prevue")
{
    if (!$debut) {
        $debut = CMbDT::date("-1 YEAR");
    }
    if (!$fin) {
        $fin = CMbDT::date();
    }
    $prat = new CMediusers();
    $prat->load($prat_id);
    $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);
    }
    $where = array();
    if ($service_id) {
        $where["service_id"] = "= '{$service_id}'";
    }
    $service = new CService();
    $services = $service->loadGroupList($where);
    $sejour = new CSejour();
    $listHospis = array(1 => "Hospi complètes + ambu") + $sejour->_specs["type"]->_locales;
    $total = 0;
    $series = array();
    // Patients placés
    foreach ($services as $service) {
        $serie = array('data' => array(), 'label' => utf8_encode($service->nom));
        $curr_month = $debut;
        $result = array();
        while ($curr_month <= $fin) {
            $end_month = CMbDT::date("+1 MONTH", $curr_month);
            $end_month = CMbDT::date("-1 DAY", $end_month);
            $query = "SELECT\r\n                  SUM(DATEDIFF(\r\n                    LEAST(affectation.sortie, '{$end_month} 23:59:59'),\r\n                    GREATEST(affectation.entree, '{$curr_month} 00:00:00')\r\n                  )) AS total,\r\n                  DATE_FORMAT('{$curr_month}', '%m/%Y') AS mois,\r\n                  DATE_FORMAT('{$curr_month}', '%Y%m') AS orderitem\r\n                FROM affectation\r\n                LEFT JOIN sejour ON sejour.sejour_id = affectation.sejour_id\r\n                LEFT JOIN lit ON affectation.lit_id = lit.lit_id\r\n                LEFT JOIN chambre ON lit.chambre_id = chambre.chambre_id\r\n                LEFT JOIN service ON chambre.service_id = service.service_id\r\n                LEFT JOIN users_mediboard ON sejour.praticien_id = users_mediboard.user_id\r\n                WHERE sejour.annule = '0'\r\n                  AND affectation.sortie >= '{$curr_month} 00:00:00'\r\n                  AND affectation.entree <= '{$end_month} 23:59:59'\r\n                  AND service.service_id = '{$service->_id}'";
            if ($prat_id) {
                $query .= "\nAND sejour.praticien_id = '{$prat_id}'";
            }
            if ($discipline_id) {
                $query .= "\nAND users_mediboard.discipline_id = '{$discipline_id}'";
            }
            if ($septique) {
                $query .= "\nAND sejour.septique = '{$septique}'";
            }
            if ($type_adm) {
                if ($type_adm == 1) {
                    $query .= "\nAND (sejour.type = 'comp' OR sejour.type = 'ambu')";
                } else {
                    $query .= "\nAND sejour.type = '{$type_adm}'";
                }
            }
            $query .= "\nGROUP BY mois ORDER BY orderitem";
            $result_month = $sejour->_spec->ds->loadlist($query);
            foreach ($result_month as $curr_result) {
                $key = $curr_result["orderitem"] . $service->_id;
                if (!isset($result[$key])) {
                    $result[$key] = $curr_result;
                } else {
                    $result[$key]["total"] += $curr_result["total"];
                }
            }
            $curr_month = CMbDT::date("+1 MONTH", $curr_month);
        }
        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;
                    break;
                }
            }
            if ($f) {
                $serie["data"][] = array(count($serie["data"]), 0);
            }
        }
        $series[] = $serie;
    }
    // Patients non placés
    if (!$service_id) {
        $serie = array('data' => array(), 'label' => utf8_encode("Non placés"));
//.........这里部分代码省略.........
开发者ID:fbone,项目名称:mediboard4,代码行数:101,代码来源:graph_joursparservice.php


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