$service_id = "none"; } $configs = CConfigService::getAllFor($service_id); if (!$nb_decalage) { $nb_decalage = $configs["Nombre postes avant"]; } if (!$without_check_date && !($object_id && $object_class) && !$chapitre) { // Si la date actuelle est inférieure a l'heure affichée sur le plan de soins, on affiche le plan de soins de la veille $datetime_limit = CMbDT::dateTime($configs["Poste 1"] . ":00:00"); if (CMbDT::dateTime() < $datetime_limit) { $date = CMbDT::date("- 1 DAY"); } else { $date = CMbDT::date(); } } $prescription->loadJourOp($date); $composition_dossier = array(); $bornes_composition_dossier = array(); $count_composition_dossier = array(); $tabHours = CAdministration::getTimingPlanSoins($date, $configs); foreach ($tabHours as $_key_date => $_period_date) { foreach ($_period_date as $_key_periode => $_period_dates) { $count_composition_dossier[$_key_date][$_key_periode] = $planif_manuelle ? 3 : 2; $first_date = reset(array_keys($_period_dates)); $first_time = reset(reset($_period_dates)); $last_date = end(array_keys($_period_dates)); $last_time = end(end($_period_dates)); $composition_dossier[] = "{$_key_date}-{$_key_periode}"; $bornes_composition_dossier["{$_key_date}-{$_key_periode}"]["min"] = "{$first_date} {$first_time}:00:00"; $bornes_composition_dossier["{$_key_date}-{$_key_periode}"]["max"] = "{$last_date} {$last_time}:00:00"; foreach ($_period_dates as $_key_real_date => $_period_hours) {