<?php /** * $Id$ * * @package Mediboard * @subpackage SSR * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $activite = new CActiviteCdARR(); $activite->code = CValue::getOrSession("code"); $activite->type = CValue::getOrSession("type"); // Pagination $current = CValue::getOrSession("current", 0); $step = 20; $type_activite = new CTypeActiviteCdARR(); $listTypes = $type_activite->loadList(null, "code"); $where = array(); if ($activite->type) { $where["type"] = "= '{$activite->type}'"; } $limit = "{$current}, {$step}"; $order = "type, code"; /** @var CActiviteCdARR[] $listActivites */ $listActivites = $activite->seek($activite->code, $where, $limit, true); $total = $activite->_totalSeek; // Détail du chargement foreach ($listActivites as $_activite) {
/** * Charge l'activité CdARR associée * * @return CActiviteCdARR */ function loadRefActiviteCdARR() { $activite = CActiviteCdARR::get($this->code_activite_cdarr); $this->_view = $activite->_view; return $this->_ref_activite_cdarr = $activite; }
<?php /** * $Id$ * * @package Mediboard * @subpackage SSR * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $needle = CValue::post("code_activite_cdarr", CValue::post("code_cdarr", CValue::post("code"))); if (!$needle) { $needle = "%"; } $activite = new CActiviteCdARR(); /** @var CActiviteCdARR[] $activites */ $activites = $activite->seek($needle, null, 300); foreach ($activites as $_activite) { $_activite->loadRefTypeActivite(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("activites", $activites); $smarty->assign("needle", $needle); $smarty->assign("nodebug", true); $smarty->display("inc_do_cdarr_autocomplete.tpl");
/** * Chargement de l'activité associée * * @return CActiviteCdARR */ function loadRefActiviteCdARR() { $activite = CActiviteCdARR::get($this->code); $activite->loadRefTypeActivite(); return $this->_ref_activite_cdarr = $activite; }
<?php /** * $Id$ * * @package Mediboard * @subpackage SSR * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $code = CValue::get("code"); $activite = CActiviteCdARR::get($code); if (!$activite->code) { CAppUI::stepMessage(UI_MSG_ERROR, "Activité CdARR '{$code}' non trouvée"); return; } $activite->loadRefsElementsByCat(); $activite->loadRefsAllExecutants(); // Création du template $smarty = new CSmartyDP(); $smarty->assign("activite", $activite); $smarty->display("vw_activite_srr_stats.tpl");
/** * Ajout d'un chapitre d'un acte de rééducation * * @param DOMNode $elParent Node * @param CRHS $mbRhs RHS * * @return void */ function addChapitreActeReeducation(DOMNode $elParent, CRHS $mbRhs) { $totauxType = $mbRhs->countTypeActivite(); foreach ($totauxType as $mnemonique => $_total_type) { if (!$_total_type) { continue; } $chapitreActeReeducation = $this->addElement($elParent, "chapitreActeReeducation"); $this->addAttribute($chapitreActeReeducation, "mnemonique", strtolower($mnemonique)); $this->addElement($chapitreActeReeducation, "duree", $_total_type); $this->addElement($chapitreActeReeducation, "commentaire", CActiviteCdARR::get($mnemonique)->libelle); } }