$plage->date = $date; $plages = $plage->loadMatchingList(); $style = "color:black;\n font-size:1.3em;\n text-shadow: 0 0 10px white;"; $style .= $nb_conges ? "text-decoration: line-through;" : null; // add prat to the calendar $planning->addDayLabel($i, "<span style=\"{$style}\">" . CMbString::htmlEntities($_user->_view) . "</span>", null, "#" . $_user->_color, "ObjectTooltip.createEx(this, '" . $_user->_guid . "');", false, array("user_id" => $user_id)); // if no conges or we want to hide plage if ($nb_conges && $hide_in_conge) { $i++; continue; } $plage = new CPlageconsult(); $plage->chir_id = $user_id; $plage->date = $date; /** @var CPlageconsult[] $plages */ $plages = $plage->loadMatchingList(); foreach ($plages as $_plage) { // range $range = new CPlanningRange($_plage->_guid, $i . " " . $_plage->debut, CMbDT::minutesRelative($_plage->debut, $_plage->fin), $_plage->libelle, $_plage->color); $range->type = "plageconsult"; $planning->addRange($range); //colors $color = "#cfc"; if ($_plage->remplacant_id && $_plage->remplacant_id != $chirSel) { // Je suis remplacé par un autre médecin $color = "#FAA"; } if ($_plage->remplacant_id && $_plage->remplacant_id == $chirSel) { // Je remplace un autre médecin $color = "#FDA"; }
} $canUserSel->needsEdit(array("chirSel" => 0)); if ($consult->_id) { $date = $consult->_ref_plageconsult->date; CValue::setSession("date", $date); } // Récupération des plages de consultation du jour et chargement des références $plage = new CPlageconsult(); $plage->chir_id = $userSel->_id; $plage->date = $date; if ($plageconsult_id && $boardItem) { $plage->plageconsult_id = $plageconsult_id; } $order = "debut"; /** @var CPlageconsult[] $listPlage */ $listPlage = $plage->loadMatchingList($order); CMbObject::massCountBackRefs($listPlage, "notes"); foreach ($listPlage as $_plage) { $_plage->_ref_chir =& $userSel; $consultations = $_plage->loadRefsConsultations(false, !$vue && $withClosed); $_plage->loadRefsNotes(); // Mass preloading CStoredObject::massLoadFwdRef($consultations, "patient_id"); CStoredObject::massLoadFwdRef($consultations, "sejour_id"); CStoredObject::massLoadFwdRef($consultations, "categorie_id"); CMbObject::massCountDocItems($consultations); /** @var CConsultAnesth[] $dossiers */ $dossiers = CStoredObject::massLoadBackRefs($consultations, "consult_anesth"); $count = CMbObject::massCountDocItems($dossiers); foreach ($consultations as $_consultation) { $_consultation->loadRefPatient();
$modele = new CCompteRendu(); $modele->object_class = "CConsultation"; $modele->type = "header"; $modele->function_id = $_praticien->_ref_function->_id; $modeles["func"] = $modele->countMatchingList(); $modele = new CCompteRendu(); $modele->object_class = "CConsultation"; $modele->type = "header"; $modele->group_id = $_praticien->_ref_function->_ref_group->_id; $modeles["group"] = $modele->countMatchingList(); $criteres["level2"]["modele_comps"][$_praticien->_id] = array_sum($modeles) ? true : false; $details["level2"]["modele_comps"][$_praticien->_id] = $modeles; // Days Patients $patient_count = 0; $plage = new CPlageconsult(); $plage->date = CMbDT::date(); $plage->chir_id = $_praticien->_id; /** @var CPlageconsult $_plage */ foreach ($plage->loadMatchingList() as $_plage) { $patient_count += $_plage->countPatients(); } $criteres["level2"]["patient_count"][$_praticien->_id] = $patient_count; } // Création du template $smarty = new CSmartyDP(); $smarty->assign("utypes", CUser::$types); $smarty->assign("user", $user); $smarty->assign("praticiens", $praticiens); $smarty->assign("criteres", $criteres); $smarty->assign("details", $details); $smarty->display("check_params.tpl");