本文整理匯總了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];