Exemple #1
0
$planning->guid = $mediuser->_guid;
$planning->hour_min = "07";
$planning->hour_max = "20";
$planning->pauses = array("07", "12", "19");
$hours = CPlageconsult::$hours;
$plageConsult = new CPlageconsult();
$plageOp = new CPlageOp();
$plagesConsult = array();
$plagesOp = array();
$hours_stop = CPlageconsult::$hours_stop;
$hours_start = CPlageconsult::$hours_start;
$where = array();
$where["chir_id"] = "= '{$chirSel}'";
$last_day = CMbDT::date("+7 day", $debut);
//plages consult
$plagesConsult = $plageConsult->loadForDays($chirSel, $debut, $last_day);
$color = "#BFB";
foreach ($plagesConsult as $_consult) {
    $_consult->loadFillRate();
    $_consult->countPatients();
    $_consult->loadRefChir();
    $class = null;
    if ($_consult->pour_tiers) {
        $class = "pour_tiers";
    }
    if (CModule::getActive("3333tel")) {
        C3333TelTools::checkPlagesConsult($_consult, $_consult->_ref_chir->function_id);
    }
    ajoutEvent($planning, $_consult, $_consult->date, $_consult->libelle, $color, "consultation", $class);
}
// plages op
Exemple #2
0
             if ($replaced_by->_id) {
                 $event = new CPlanningEvent($_conge->_guid, $first_day);
                 $event->title = "<strong>" . ($_conge->_view ? $_conge->_view : "Congés");
                 if ($function_id) {
                     $event->title .= " (" . $_prat->_shortview . ")";
                 }
                 $event->title .= $replaced_by ? " remplacé par " . $replaced_by->_view . "</strong> " : null;
                 $calendar->days[$first_day][$_conge->_guid] = $event;
             }
             $first_day = CMbDT::date("+1 DAY", $first_day);
         }
     }
 }
 // plages consult
 $plage = new CPlageconsult();
 $plages_c = $plage->loadForDays($_prat->_id, $calendar->date_min, $calendar->date_max);
 foreach ($plages_c as $_plage) {
     $_plage->loadRefsConsultations(false);
     $count = count($_plage->_ref_consultations);
     $_plage->loadFillRate();
     $event = new CPlanningEvent($_plage->_guid, $_plage->date . " {$_plage->debut}", CMbDT::minutesRelative($_plage->date . " " . $_plage->debut, $_plage->date . " " . $_plage->fin), null, "#" . $_plage->color);
     $title = $_plage->libelle ? $_plage->libelle : CAppUI::tr($_plage->_class);
     $event->title = $_plage->locked ? "<img src=\"images/icons/lock.png\" style='max-height: 1em;' alt=\"\" />" : null;
     $event->title .= "<strong>" . CMbDT::format($_plage->debut, "%H:%M") . " - " . CMbDT::format($_plage->fin, "%H:%M") . "</strong> {$count} " . CAppUI::tr("CConsultation");
     $event->title .= $count > 1 ? "s" : null;
     $event->title .= "<small>";
     $event->title .= "<br/>{$title}";
     if ($function_id) {
         $event->title .= " - " . $_prat->_shortview . "";
     }
     $event->title .= "<br/> Durée cumulée : ";