本文整理汇总了PHP中CConsultation::loadListWithPerms方法的典型用法代码示例。如果您正苦于以下问题:PHP CConsultation::loadListWithPerms方法的具体用法?PHP CConsultation::loadListWithPerms怎么用?PHP CConsultation::loadListWithPerms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConsultation
的用法示例。
在下文中一共展示了CConsultation::loadListWithPerms方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CConsultation
CCanDo::checkRead();
$consult_id = CValue::get("consult_id");
$group_id = CGroups::loadCurrent()->_id;
$consult = new CConsultation();
$consult->load($consult_id);
$consult->loadRefPlageConsult();
// next consultations
$dateW = $consult->_ref_plageconsult->date;
$whereN = array();
$ljoin = array();
$ljoin["plageconsult"] = "plageconsult.plageconsult_id = consultation.plageconsult_id";
$whereN["patient_id"] = " = '{$consult->patient_id}'";
$whereN["plageconsult.date"] = " >= '{$dateW}'";
$whereN["heure"] = " >= '{$consult->heure}'";
/** @var CConsultation[] $consults */
$consults = $consult->loadListWithPerms(PERM_READ, $whereN, null, null, null, $ljoin);
foreach ($consults as $_consult) {
$_consult->loadRefPraticien()->loadRefFunction();
$_consult->loadRefSejour();
}
// sejours
$where = array();
$where[] = "'{$consult->_date}' BETWEEN DATE(entree) AND DATE(sortie)";
$where["sejour.type"] = "!= 'consult'";
$where["sejour.group_id"] = "= '{$group_id}'";
$where["sejour.patient_id"] = "= '{$consult->patient_id}'";
/** @var CSejour[] $sejours */
$sejour = new CSejour();
$sejours = $sejour->loadListWithPerms(PERM_READ, $where);
CMbObject::massLoadFwdRef($sejours, "praticien_id");
foreach ($sejours as $_sejour) {
示例2: array
if ($multiple_edit) {
$plage_temp = $consultation_temp->_ref_plageconsult;
$where_next = array();
$ljoin_next = array();
$limit = CAppUI::pref("NbConsultMultiple");
$date_ref = CAppUI::pref("today_ref_consult_multiple") ? CMbDT::date() : $plage_temp->date;
$ljoin_next["plageconsult"] = "plageconsult.plageconsult_id = consultation.plageconsult_id";
$where_next["consultation.patient_id"] = "= '{$consultation_temp->patient_id}'";
$where_next["consultation.annule"] = "= '0'";
//only not cancelled
$where_next["consultation.chrono"] = "< '48'";
//only not finished and not arrived
$where_next["plageconsult.date"] = ">= '{$date_ref}'";
$where_next[$consultation_temp->_spec->key] = "!= '{$consultation_id}'";
/** @var $_consult CConsultation */
foreach ($consultation_temp->loadListWithPerms(PERM_READ, $where_next, "date", $limit, null, $ljoin_next) as $_consult) {
$consultation_temp->loadRefPlageConsult()->loadRefChir();
$_consult->loadRefElementPrescription();
$consultation_ids[] = array($_consult->plageconsult_id, $_consult->_id, $_consult->_ref_plageconsult->date, $_consult->heure, $_consult->_ref_chir->_id, utf8_encode($_consult->_ref_chir->_view), $_consult->annule, $_consult->rques, $_consult->element_prescription_id, utf8_encode($_consult->_ref_element_prescription->libelle));
}
}
}
if ($heure && !$consultation_id) {
$consultation_ids[] = array($plageconsult_id, null, $date, $heure, $chir_id, "chir", 0, null, null, null);
}
//functions
$function = new CFunctions();
$listFunctions = $function->loadSpecialites(PERM_EDIT);
// Récupération des plages de consultation disponibles
$plage = new CPlageconsult();
$where = array();