$sejour_id = CValue::get("sejour_id");
$date = CValue::get("date");
$default_tab = CValue::get("default_tab", CMedicament::getBase() == "vidal" ? "prescription_sejour" : "dossier_traitement" . (CAppUI::conf("soins Other vue_condensee_dossier_soins", CGroups::loadCurrent()) ? "_compact" : ""));
$popup = CValue::get("popup", 0);
$modal = CValue::get("modal", 0);
$operation_id = CValue::get("operation_id");
$mode_pharma = CValue::get("mode_pharma", 0);
$sejour = new CSejour();
$sejour->load($sejour_id);
if (CModule::getActive("dPprescription")) {
    CPrescription::$_load_lite = true;
}
$sejour->loadRefGrossesse();
$sejour->loadRefPraticien();
$prescription_sejour = $sejour->loadRefPrescriptionSejour();
$sejour->loadJourOp($date);
$prescription_sejour->loadJourOp($date);
$prescription_sejour->loadRefCurrentPraticien();
$prescription_sejour->loadLinesElementImportant();
$patient = $sejour->loadRefPatient();
$patient->countINS();
$patient->loadRefsNotes();
$sejour->loadRefsOperations();
$sejour->loadRefCurrAffectation();
$dossier_medical_sejour = $sejour->loadRefDossierMedical();
if ($dossier_medical_sejour->_id) {
    $dossier_medical_sejour->loadRefsAllergies();
    $dossier_medical_sejour->loadRefsAntecedents();
    $dossier_medical_sejour->countAntecedents(false);
    $dossier_medical_sejour->countAllergies();
}