return;
}
$fiches_anesthesies = array();
$formulaires = null;
global $atc_classes;
$atc_classes = array();
$datetime_min = "";
if ($period) {
    $datetime_min = CMbDT::dateTime("- {$period} HOURS");
}
// Chargement du sejour
$sejour = new CSejour();
$sejour->load($sejour_id);
$sejour->loadNDA();
$sejour->loadExtDiagnostics();
$sejour->loadRefsConsultAnesth();
$sejour->_ref_consult_anesth->loadRefConsultation();
$sejour->canRead();
// Chargement des affectations
$sejour->loadRefCurrAffectation()->loadRefLit();
foreach ($sejour->loadRefsAffectations() as $_affectation) {
    $_affectation->loadRefLit();
}
// Chargement des tâches
foreach ($sejour->loadRefsTasks() as $_task) {
    $_task->loadRefPrescriptionLineElement();
    $_task->setDateAndAuthor();
    $_task->loadRefAuthor();
    $_task->loadRefAuthorRealise();
}
// Chargement des opérations
 * @version    $Revision$
 */
$only_sejour = CValue::get("only_sejour", 0);
$with_patient = CValue::get("with_patient", 0);
$operation_id = CValue::get("operation_id", 0);
$sejour = new CSejour();
$sejour->load(CValue::get("sejour_id"));
$sejour->loadRefPatient();
$sejour->loadRefsOperations();
$sejour->canDo();
if (!$only_sejour) {
    $sejour->loadRefsConsultations();
    foreach ($sejour->_ref_consultations as $consult) {
        $consult->countDocItems();
    }
    $consult_anesth = $sejour->loadRefsConsultAnesth();
    $consult_anesth->loadRefsFwd();
    foreach ($sejour->_ref_operations as $key => $_operation) {
        if ($operation_id && $_operation->_id != $operation_id) {
            unset($sejour->_ref_operations[$key]);
            continue;
        }
        $_operation->loadRefPlageOp();
        $consult_anesth = $_operation->loadRefsConsultAnesth();
        $consult_anesth->loadRefsFwd();
    }
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("sejour", $sejour);
$smarty->assign("only_sejour", $only_sejour);