$selOp->loadRefSejour()->loadRefPatient(); $selOp->_ref_sejour->_ref_patient->loadRefDossierMedical(); $selOp->_ref_sejour->_ref_patient->loadRefLatestConstantes(); $blood_salvage = new CBloodSalvage(); $blood_salvage->operation_id = $op; $blood_salvage->loadMatchingObject(); $timing["_recuperation_start"] = array(); $max_add_minutes = CAppUI::conf("dPsalleOp max_add_minutes"); foreach ($timing as $key => $value) { for ($i = -CAppUI::conf("dPsalleOp max_sub_minutes"); $i < $max_add_minutes && $blood_salvage->{$key} !== null; $i++) { $timing[$key][] = CMbDT::time("{$i} minutes", $blood_salvage->{$key}); } } } /* * Liste des cell saver. */ $cell_saver = new CCellSaver(); $list_cell_saver = $cell_saver->loadList(); $smarty = new CSmartyDP(); $smarty->assign("blood_salvage", $blood_salvage); $smarty->assign("salle", $salle); $smarty->assign("selOp", $selOp); $smarty->assign("date", $date); $smarty->assign("modif_operation", $modif_operation); $smarty->assign("totaltime", "00:00:00"); $smarty->assign("anticoagulant_list", $anticoagulant_list); $smarty->assign("timing", $timing); $smarty->assign("list_cell_saver", $list_cell_saver); $smarty->assign("inLivretTherapeutique", $inLivretTherapeutique); $smarty->display("inc_bloodSalvage.tpl");
CCanDo::checkRead(); $mean_fields = array("age", "wash_volume", "saved_volume", "transfused_volume", "hgb_pocket", "hgb_patient"); $possible_filters = array_merge(array('chir_id', 'anesth_id', 'codes_ccam', 'code_asa', 'cell_saver_id'), $mean_fields); $filters = CValue::getOrSession('filters', array()); $months_count = CValue::getOrSession('months_count', 12); $months_relative = CValue::getOrSession('months_relative', 0); $comparison = CValue::getOrSession('comparison', $possible_filters); $comparison_left = CValue::getOrSession('comparison_left'); $comparison_right = CValue::getOrSession('comparison_right'); $mode = CValue::get('mode'); foreach ($possible_filters as $n) { if (!isset($filters[$n])) { $filters[$n] = null; } } $cell_saver = new CCellSaver(); $cell_savers = $cell_saver->loadList(null, "marque, modele"); $user = new CMediusers(); $user->load(CAppUI::$instance->user_id); $mediuser = new CMediusers(); $fields = array("anesth_id" => $mediuser->loadListFromType(array('Anesthésiste')), "chir_id" => $mediuser->loadListFromType(array('Chirurgien'), $user->isAnesth() ? null : PERM_READ), "codes_asa" => range(1, 5), "cell_saver_id" => $cell_savers); $smarty = new CSmartyDP(); // Filter $smarty->assign('filters', $filters); $smarty->assign('months_relative', $months_relative); $smarty->assign('months_count', $months_count); $smarty->assign('mode', $mode); // Lists $smarty->assign('fields', $fields); $smarty->assign('mean_fields', $mean_fields); $smarty->display('vw_stats.tpl');
<?php /** * $Id: vw_cellSaver.php 20938 2013-11-13 11:02:47Z aurelie17 $ * * @package Mediboard * @subpackage bloodSalvage * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision: 20938 $ */ CCanDo::checkRead(); $cell_saver_id = CValue::getOrSession("cell_saver_id"); $cell_saver = new CCellSaver(); $cell_saver_list = $cell_saver->loadList(); if ($cell_saver_id) { $cell_saver = new CCellSaver(); $cell_saver->load($cell_saver_id); } $smarty = new CSmartyDP(); $smarty->assign("cell_saver_list", $cell_saver_list); $smarty->assign("cell_saver", $cell_saver); $smarty->display("vw_cellSaver.tpl");
foreach ($list_codes_ccam as $key => $ccam) { $where[] = "operations.codes_ccam LIKE '%{$ccam}%'"; $series[$key] = array('data' => array(), 'label' => $ccam); fillData($where, $ljoin, $series[$key], $dates); } } // Volume de lavage $mean_props = array("wash_volume" => "ml", "saved_volume" => "ml", "transfused_volume" => "ml", "hgb_pocket" => "", "hgb_patient" => ""); foreach ($mean_props as $_prop => $_unit) { $data[$_prop] = array('options' => array('title' => utf8_encode(CAppUI::tr("CBloodSalvage-{$_prop}") . ($_unit ? " ({$_unit})" : ""))), 'data' => array()); $series =& $data[$_prop]['series']; $series[] = array('data' => array()); computeMeanValue($where, $ljoin, $series[count($series) - 1], $dates, $_prop); } // Cell savers $cell_saver = new CCellSaver(); /*if ($filters['cell_saver_id']) { $cell_saver->cell_saver_id = $filters['cell_saver_id']; }*/ $list_cell_savers = $cell_saver->loadMatchingList("marque, modele"); if (count($list_cell_savers) == 0) { $list_cell_savers[] = null; } $data['cell_saver_id'] = array('options' => array('title' => utf8_encode('Cell saver')), 'data' => array()); $series =& $data['cell_saver_id']['series']; // array_values() to have contiguous keys foreach (array_values($list_cell_savers) as $key => $_cell_saver) { if ($_cell_saver && $_cell_saver->_id) { $where[] = "blood_salvage.cell_saver_id = {$_cell_saver->_id}"; } else { $where[] = "blood_salvage.cell_saver_id IS NULL || blood_salvage.cell_saver_id = ''";