// Récupération des services
$service = new CService();
$where = array();
$where["group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$where["cancelled"] = "= '0'";
$order = "nom";
$listServices = $service->loadListWithPerms(PERM_READ, $where, $order);
foreach ($listServices as $_service) {
    $_service->loadRefUFSoins();
}
if (CModule::getActive("maternite")) {
    $sejour->loadRefGrossesse();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("sejours_collision", $patient->getSejoursCollisions());
$smarty->assign("urgInstalled", CModule::getInstalled("dPurgences"));
$smarty->assign("isPrescriptionInstalled", CModule::getActive("dPprescription"));
$smarty->assign("heure_sortie_ambu", $heure_sortie_ambu);
$smarty->assign("heure_sortie_autre", $heure_sortie_autre);
$smarty->assign("heure_entree_veille", $heure_entree_veille);
$smarty->assign("heure_entree_jour", $heure_entree_jour);
$smarty->assign("hours", $hours);
$smarty->assign("mins", $mins);
$smarty->assign("hours_duree", $hours_duree);
$smarty->assign("hours_urgence", $hours_urgence);
$smarty->assign("mins_duree", $mins_duree);
$smarty->assign("ufs", CUniteFonctionnelle::getUFs());
$smarty->assign("sejour", $sejour);
$smarty->assign("op", new COperation());
$smarty->assign("praticien", $praticien);