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); $smarty->assign("yaxes_count", $yaxes_count); $smarty->assign("consult_anesth", $consult_anesth);
<?php /** * $Id$ * * @package Mediboard * @subpackage Patients * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkAdmin(); $group = CGroups::loadCurrent(); $graphs = CSupervisionGraph::getAllFor($group); $timed_data = CSupervisionTimedData::getAllFor($group); $timed_pictures = CSupervisionTimedPicture::getAllFor($group); $instant_data = CSupervisionInstantData::getAllFor($group); $packs = CSupervisionGraphPack::getAllFor($group, true); foreach ($graphs as $_graph) { $_axes = $_graph->loadRefsAxes(); foreach ($_axes as $_axis) { $_axis->loadBackRefs("series"); } } $smarty = new CSmartyDP(); $smarty->assign("graphs", $graphs); $smarty->assign("packs", $packs); $smarty->assign("timed_data", $timed_data); $smarty->assign("timed_pictures", $timed_pictures); $smarty->assign("instant_data", $instant_data); $smarty->display("inc_list_supervision_graph.tpl");