* @version $Revision$ */ CCanDo::checkRead(); $operation_id = CValue::get("operation_id"); $interv = new COperation(); $interv->load($operation_id); $interv->loadRefSejour()->loadRefPatient()->loadRefLatestConstantes(); $interv->loadRefPlageOp(); $interv->_ref_sejour->_ref_patient->loadRefDossierMedical(); $consult_anesth = $interv->loadRefsConsultAnesth(); $group = CGroups::loadCurrent(); $pack = $interv->loadRefGraphPack(); list($graphs, $yaxes_count, $time_min, $time_max, $time_debut_op_iso, $time_fin_op_iso) = CObservationResultSet::buildGraphs($interv, $pack->_id); $time_debut_op = CMbDate::toUTCTimestamp($time_debut_op_iso); $time_fin_op = CMbDate::toUTCTimestamp($time_fin_op_iso); $evenements = CObservationResultSet::buildEventsGrid($interv, $time_debut_op_iso, $time_fin_op_iso, $time_min, $time_max); $now = 100 * (CMbDate::toUTCTimestamp(CMbDT::dateTime()) - $time_min) / ($time_max - $time_min); $graph_packs = CSupervisionGraphPack::getAllFor($group); $concentrators = null; if (CModule::getActive("patientMonitoring")) { $concentrator = new CMonitoringConcentrator(); $concentrators = $concentrator->loadList(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("pack", $pack); $smarty->assign("interv", $interv); $smarty->assign("graphs", $graphs); $smarty->assign("evenements", $evenements); $smarty->assign("time_debut_op", $time_debut_op); $smarty->assign("time_fin_op", $time_fin_op);