本文整理汇总了PHP中CMediusers::loadAll方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::loadAll方法的具体用法?PHP CMediusers::loadAll怎么用?PHP CMediusers::loadAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMediusers
的用法示例。
在下文中一共展示了CMediusers::loadAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CMediusers
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
CApp::setMemoryLimit("512M");
$ds = CSQLDataSource::get("std");
$function_id = CValue::get("function_id");
$chir_ids = CValue::get("chir_ids");
$date = CValue::get("date", CMbDT::date());
// Praticiens sélectionnés
$user = new CMediusers();
$praticiens = array();
if ($function_id) {
$praticiens = CConsultation::loadPraticiens(PERM_EDIT, $function_id);
}
if ($chir_ids) {
$praticiens = $user->loadAll(explode("-", $chir_ids));
}
//plages de consultation
$where = array();
$where["chir_id"] = CSQLDataSource::prepareIn(array_keys($praticiens));
$where["date"] = " = '{$date}'";
$Pconsultation = new CPlageconsult();
$Pconsultations = $Pconsultation->loadList($where, array("debut"));
$nbConsultations = 0;
$consultations = array();
$resumes_patient = array();
/** @var $Pconsultations CPlageConsult[] */
foreach ($Pconsultations as $_plage_consult) {
$_plage_consult->loadRefsConsultations(false, false);
$_plage_consult->loadRefChir();
$_plage_consult->countPatients();
示例2: getActiveTherapeutes
/**
* Find all therapeutes having planned events
*
* @param date $min Minimal date to start from
* @param date $max Maximal date to stop to
*
* @return array[CMediusers]
*/
static function getActiveTherapeutes($min, $max)
{
$max = CMbDT::date("+1 DAY", $max);
$query = "SELECT DISTINCT therapeute_id FROM `evenement_ssr` \r\n WHERE debut BETWEEN '{$min}' AND '{$max}'";
$that = new self();
$ds = $that->_spec->ds;
$therapeute_ids = $ds->loadColumn($query);
$therapeute = new CMediusers();
return $therapeute->loadAll($therapeute_ids);
}
示例3: loadRefsAllExecutants
/**
* Charge les exécutants de cet activité et fournit le nombre d'occurences par exécutants
*
* @return CMediusers[]
*
* @see self::_count_actes_by_executant
*/
function loadRefsAllExecutants()
{
// Comptage par executant
$query = "SELECT therapeute_id, COUNT(*)\r\n FROM `acte_cdarr` \r\n LEFT JOIN `evenement_ssr` ON `evenement_ssr`.`evenement_ssr_id` = `acte_cdarr`.`evenement_ssr_id`\r\n WHERE `code` = '{$this->code}'\r\n GROUP BY `therapeute_id`";
$acte = new CActeCdARR();
$ds = $acte->getDS();
$counts = $ds->loadHashList($query);
arsort($counts);
// Chargement des executants
$user = new CMediusers();
/** @var CMediusers[] $executants */
$executants = $user->loadAll(array_keys($counts));
foreach ($executants as $_executant) {
$_executant->loadRefFunction();
}
// Valeurs de retour
$this->_count_actes_by_executant = $counts;
return $this->_ref_all_executants = $executants;
}