$patient->loadRefsCorrespondantsPatient(); $correspondantsMedicaux = array(); if ($patient->_ref_medecin_traitant->_id) { $correspondantsMedicaux["traitant"] = $patient->_ref_medecin_traitant; } foreach ($patient->_ref_medecins_correspondants as $correspondant) { $correspondantsMedicaux["correspondants"][] = $correspondant->_ref_medecin; } $medecin_adresse_par = ""; if ($sejour->adresse_par_prat_id && $sejour->adresse_par_prat_id != $patient->_ref_medecin_traitant->_id) { $medecin_adresse_par = new CMedecin(); $medecin_adresse_par->load($sejour->adresse_par_prat_id); } // Chargement des etablissements externes $etab = new CEtabExterne(); $count_etab_externe = $etab->countList(); $sejours =& $patient->_ref_sejours; $config = CAppUI::conf("dPplanningOp CSejour"); $hours = range($config["heure_deb"], $config["heure_fin"]); $mins = range(0, 59, $config["min_intervalle"]); $config = CAppUI::conf("dPplanningOp COperation"); $hours_duree = array("deb" => $config["duree_deb"], "fin" => $config["duree_fin"]); $hours_urgence = array("deb" => $config["hour_urgence_deb"], "fin" => $config["hour_urgence_fin"]); $mins_duree = $config["min_intervalle"]; $config = CAppUI::conf("dPplanningOp CSejour"); $heure_sortie_ambu = $config["heure_sortie_ambu"]; $heure_sortie_autre = $config["heure_sortie_autre"]; $heure_entree_veille = $config["heure_entree_veille"]; $heure_entree_jour = $config["heure_entree_jour"]; // Récupération de la liste des services $where = array();