本文整理汇总了PHP中CMediusers::loadRefDiscipline方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::loadRefDiscipline方法的具体用法?PHP CMediusers::loadRefDiscipline怎么用?PHP CMediusers::loadRefDiscipline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMediusers
的用法示例。
在下文中一共展示了CMediusers::loadRefDiscipline方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkModificateur
/**
* Vérification du modificateur
*
* @param int $code code de l'acte
* @param string $heure heure d'exécution
*
* @return array|void
*/
function checkModificateur($code, $heure)
{
$keys = array("A", "E", "P", "S", "U", "7", "J");
if (!in_array($code, $keys)) {
return null;
}
$patient = $this->loadRefPatient();
$this->loadRefPraticien();
$discipline = $this->_ref_praticien->loadRefDiscipline();
// Il faut une date complête pour la comparaison
$date_ref = CMbDT::date();
$date = "{$date_ref} {$heure}";
switch ($code) {
case "A":
return $patient->_annees < 4 || $patient->_annees >= 80;
break;
case "E":
return $patient->_annees < 5;
break;
case "P":
return in_array($discipline->text, array("MEDECINE GENERALE", "PEDIATRIE")) && ($date > "{$date_ref} 20:00:00" && $date <= "{$date_ref} 23:59:59" || $date > "{$date_ref} 06:00:00" && $date < "{$date_ref} 08:00:00");
break;
case "S":
return in_array($discipline->text, array("MEDECINE GENERALE", "PEDIATRIE")) && ($date >= "{$date_ref} 00:00:01" && $date < "{$date_ref} 06:00:00");
break;
case "U":
$date_tomorrow = CMbDT::date("+1 day", $date_ref) . " 08:00:00";
return !in_array($discipline->text, array("MEDECINE GENERALE", "PEDIATRIE")) && ($date > "{$date_ref} 20:00:00" && $date < $date_tomorrow);
break;
case "7":
return CAppUI::pref('precode_modificateur_7');
break;
case "J":
return CAppUI::pref('precode_modificateur_J') && $this->_class == 'COperation';
}
return null;
}
示例2: CMediusers
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";
$ds = CSQLDataSource::get("std");
$result = $ds->loadList($query);
$total_interventions = 0;
$duree_totale_intervs = 0;
$nb_interv_intervs = 0;
$duree_totale_occupation = 0;
$nb_interv_occupation = 0;
foreach ($result as $praticien) {
$prat = new CMediusers();
$prat->load($praticien["user_id"]);
$prat->loadRefFunction();
$prat->loadRefDiscipline();
$tableau[$praticien["user_id"]]["user"] = $prat;
$total_interventions += $praticien["nbInterv"];
$tableau[$praticien["user_id"]]["total_interventions"] = $praticien["nbInterv"];
$tableau[$praticien["user_id"]]["duree_totale_intervs"] = 0;
$tableau[$praticien["user_id"]]["duree_moyenne_intervs"] = 0;
$tableau[$praticien["user_id"]]["nb_interv_intervs"] = 0;
$tableau[$praticien["user_id"]]["duree_totale_occupation"] = 0;
$tableau[$praticien["user_id"]]["duree_moyenne_occupation"] = 0;
$tableau[$praticien["user_id"]]["nb_interv_occupation"] = 0;
}
// Durée d'intervention
$query = "SELECT COUNT(*) AS nbInterv,\n SUM(TIME_TO_SEC(operations.fin_op)-TIME_TO_SEC(operations.debut_op)) AS duree_totale,\n 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 operations.debut_op IS NOT NULL\n AND operations.fin_op IS NOT NULL\n AND operations.debut_op < operations.fin_op\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}'";
}