本文整理汇总了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 */