本文整理匯總了PHP中CPatient::loadIds方法的典型用法代碼示例。如果您正苦於以下問題:PHP CPatient::loadIds方法的具體用法?PHP CPatient::loadIds怎麽用?PHP CPatient::loadIds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CPatient
的用法示例。
在下文中一共展示了CPatient::loadIds方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: count
if ($all_prats && !$date_min) {
$limit = "{$start}, {$step}";
/** @var CPatient[] $patients */
$patients = $patient->loadList(null, $order, $limit);
$patient_count = count($patients);
$patient_total = $patient->countList();
} else {
$ljoin_consult = array("consultation" => "consultation.patient_id = patients.patient_id", "plageconsult" => "plageconsult.plageconsult_id = consultation.plageconsult_id");
$where_consult = array();
if (!$all_prats) {
$where_consult["plageconsult.chir_id"] = $ds->prepareIn($praticien_id);
}
if ($date_min) {
$where_consult["plageconsult.date"] = $ds->prepare(">= ?", $date_min);
}
$patient_ids_consult = $patient->loadIds($where_consult, $order, null, "patients.patient_id", $ljoin_consult);
$ljoin_sejour = array("sejour" => "sejour.patient_id = patients.patient_id");
$where_sejour = array();
if (!$all_prats) {
$where_sejour["sejour.praticien_id"] = $ds->prepareIn($praticien_id);
}
if ($date_min) {
$where_sejour["sejour.sortie"] = $ds->prepare(">= ?", $date_min);
}
$patient_ids_sejour = $patient->loadIds($where_sejour, $order, null, "patients.patient_id", $ljoin_sejour);
$patient_ids = array_merge($patient_ids_consult, $patient_ids_sejour);
$patient_ids = array_unique($patient_ids);
$patient_total = count($patient_ids);
$patient_ids = array_slice($patient_ids, $start, $step);
$where = array("patient_id" => $patient->getDS()->prepareIn($patient_ids));
/** @var CPatient[] $patients */