本文整理汇总了PHP中CConsultation::getDS方法的典型用法代码示例。如果您正苦于以下问题:PHP CConsultation::getDS方法的具体用法?PHP CConsultation::getDS怎么用?PHP CConsultation::getDS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConsultation
的用法示例。
在下文中一共展示了CConsultation::getDS方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
* @version $Revision$
*/
CCanDo::checkRead();
$consultation_id = CValue::get("consultation_id");
$consultations = array();
$consultation = new CConsultation();
$consultation->load($consultation_id);
$consultation->loadRefsFwd();
$date = $consultation->_ref_plageconsult->date;
$prat = $consultation->_ref_plageconsult->_ref_chir;
$prat->loadRefs();
$patient = $consultation->_ref_patient;
$patient->loadRefs();
$prat->loadRefFunction();
$chir_ids = array_keys($prat->_ref_function->loadRefsUsers());
$ds = $consultation->getDS();
// nexts rdvs for the same function
$ljoin = array("plageconsult" => "plageconsult.plageconsult_id = consultation.plageconsult_id");
$where = array();
$where["date"] = ">= '{$date}' ";
$where["patient_id"] = " = '{$consultation->patient_id}' ";
$where[] = "plageconsult.chir_id " . $ds->prepareIn($chir_ids) . " OR plageconsult.remplacant_id " . $ds->prepareIn($chir_ids);
$where["annule"] = " != '1' ";
$where[$consultation->_spec->key] = " != '{$consultation->_id}'";
/** @var CConsultation[] $consultations */
$consultations = $consultation->loadList($where, "date ASC, heure ASC", null, null, $ljoin);
foreach ($consultations as $_consult) {
$_consult->_ref_patient = $consultation->_ref_patient;
$_consult->loadRefPraticien()->loadRefFunction();
$_consult->_ref_plageconsult->loadRefRemplacant();
}