本文整理汇总了PHP中CPatient::countMultipleList方法的典型用法代码示例。如果您正苦于以下问题:PHP CPatient::countMultipleList方法的具体用法?PHP CPatient::countMultipleList怎么用?PHP CPatient::countMultipleList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPatient
的用法示例。
在下文中一共展示了CPatient::countMultipleList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
$merge_patient = CValue::getOrSession("_merge_patient");
$number_day = CValue::getOrSession("_number_day", 8);
$number_day = $number_day ?: 8;
if ($number_day > 31) {
$number_day = 31;
} elseif ($number_day < 0) {
$number_day = 0;
}
$now = CValue::getOrSession("_date_end", CMbDT::date());
$before = CMbDT::date("-{$number_day} DAYS", $now);
CValue::setSession("_number_day", $number_day);
CValue::setSession("_date_end", $now);
CValue::setSession("_merge_patient", $merge_patient);
$patient = new CPatient();
$count_patient = $patient->countList();
$count_status = $patient->countMultipleList(array("status" => "IS NOT NULL"), null, "status", null, array("status"));
$patient_link = new CPatientLink();
$count_status[] = array("total" => $patient_link->countList(), "status" => "DPOT");
//répartition total
$series = CPatientStateTools::createGraphPie($count_status);
foreach ($series["datum"] as $_k => $_serie) {
$series["datum"][$_k]["percent"] = $series["count"] > 0 ? round($_serie["data"] / $series["count"] * 100) : 0;
}
//Répartition par journée
$values = array();
$ids = array();
if ($merge_patient) {
$results = CPatientStateTools::getPatientMergeByDate($before, $now);
for ($i = $number_day; $i >= 0; $i--) {
$values["merged"][CMbDT::date("-{$i} DAYS", $now)] = 0;
}