コード例 #1
0
}
/** @var COperation[] $interventions */
$operation = new COperation();
if (!$interv_with_no_codes) {
    $where[] = "LENGTH(codes_ccam) > 0";
}
$interventions = $operation->loadList($where, null, null, null, $ljoin);
$totals["interventions"] = count($interventions);
$where = array();
if (!$all_prats) {
    //$where["executant_id"] = "= '$user->_id'";
    $where["code_activite"] = $user->_is_anesth ? "= '4'" : "!= '4'";
}
CStoredObject::massCountBackRefs($interventions, "actes_ccam", $where);
// Préparation des interventions
CDatedCodeCCAM::$cache_layers = Cache::INNER_OUTER;
foreach ($interventions as $key => $_interv) {
    $_interv->loadExtCodesCCAM();
}
foreach ($interventions as $key => $_interv) {
    $codes_ccam = $_interv->_ext_codes_ccam;
    // Nombre d'acte cotés par le praticien et réinitialisation du count pour le cache
    $nb_actes_ccam = $_interv->_count["actes_ccam"];
    $_interv->_count["actes_ccam"] = null;
    // Aucun acte prévu ou coté
    if (!count($codes_ccam) && !$_interv->_count_actes) {
        continue;
    }
    // Actes prévus restant en suspend
    $activites = CMbArray::pluck($codes_ccam, "activites");
    $nbCodes = 0;