本文整理汇总了PHP中CPatient::massLoadBackRefs方法的典型用法代码示例。如果您正苦于以下问题:PHP CPatient::massLoadBackRefs方法的具体用法?PHP CPatient::massLoadBackRefs怎么用?PHP CPatient::massLoadBackRefs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPatient
的用法示例。
在下文中一共展示了CPatient::massLoadBackRefs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$patient_links = $patient_link->loadList(null, null, "{$page}, 30");
$patient_ids1 = CMbArray::pluck($patient_links, "patient_id1");
$patient_ids2 = CMbArray::pluck($patient_links, "patient_id2");
$where = array("patient_id" => CSQLDataSource::prepareIn(array_merge($patient_ids1, $patient_ids2)));
$patients = $patient->loadList($where);
} else {
$patients = $patient->loadList($where, "nom, prenom", "{$page}, 30", null, $leftjoin);
}
CPatient::massLoadIPP($patients);
/** @var CPatientState $patients_state */
$patients_state = CPatient::massLoadBackRefs($patients, "patient_state", "datetime DESC");
$mediusers = CPatientState::massLoadFwdRef($patients_state, "mediuser_id");
/** @var CPatientLink[] $link1 */
$link1 = CPatient::massLoadBackRefs($patients, "patient_link1");
/** @var CPatientLink[] $link2 */
$link2 = CPatient::massLoadBackRefs($patients, "patient_link2");
$patient_link1 = CPatientLink::massLoadFwdRef($link1, "patient_id2");
$patient_link2 = CPatientLink::massLoadFwdRef($link2, "patient_id1");
$patient_link = $patient_link1 + $patient_link2;
CPatient::massLoadIPP($patient_link);
foreach ($link1 as $_link1) {
$_link1->_ref_patient_doubloon = $patient_link[$_link1->patient_id2];
}
foreach ($link2 as $_link2) {
$_link2->_ref_patient_doubloon = $patient_link[$_link2->patient_id1];
}
foreach ($patients_state as $_patient_state) {
/** @var CPatient $patient */
$patient = $patients[$_patient_state->patient_id];
$_patient_state->_ref_patient = $patient;
$_patient_state->_ref_mediuser = $mediusers[$_patient_state->mediuser_id];