$_ref_object = $sejour; if (!$contexte) { $contexte = "pmsi"; } } if ($prescription_id) { $prescription = new CPrescription(); $prescription->load($prescription_id); $prescription->loadRefObject(); $_ref_object = $prescription->_ref_object; if (!$contexte) { $contexte = $user->isPraticien() ? "prescription" : "pharmacie"; } } $favoris = new CSearchThesaurusEntry(); $favoris_sans_cibles = new CSearchThesaurusEntry(); $targets = new CSearchTargetEntry(); $actes_ccam = array(); $diags_cim = array(); $results = array(); $tab_favoris = array(); $date = CMbDT::date("-1 month"); $types = array(); $group = CGroups::loadCurrent(); if (CAppUI::conf("search active_handler active_handler_search_types", $group)) { $types = explode("|", CAppUI::conf("search active_handler active_handler_search_types", $group)); } $test_search = new CSearch(); $test_search->testConnection($group); // On récupère les favoris if ($_ref_object instanceof CSejour) {
<?php /** * $Id$ * * @category Search * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @link http://www.mediboard.org */ $date = CMbDT::date("-1 month"); $user = CMediusers::get(); $user->loadRefFunction()->loadRefGroup(); $entry = new CSearchThesaurusEntry(); $entry->user_id = "{$user->_id}"; $thesaurus = $entry->loadMatchingList(); foreach ($thesaurus as $_thesaurus) { /** @var $_thesaurus CSearchThesaurusEntry */ $_thesaurus->loadRefsTargets(); } $types = array(); $group = CGroups::loadCurrent(); if (CAppUI::conf("search active_handler active_handler_search_types", $group)) { $types = explode("|", CAppUI::conf("search active_handler active_handler_search_types", $group)); } $log = new CSearchLog(); $log->testConnection($group); $contextes = $log->loadContextes(); // Création du template $smarty = new CSmartyDP();
/** * $Id$ * * @category Search * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @link http://www.mediboard.org */ CCanDo::checkRead(); $thesaurus_entry_id = CValue::get("thesaurus_entry", null); $search_agregation = CValue::get("search_agregation", null); $search_body = CValue::get("search_body", null); $search_user_id = CValue::get("search_user_id", null); $search_types = CValue::get("search_types", null); $search_contexte = CValue::get("search_contexte", null); $thesaurus_entry = new CSearchThesaurusEntry(); if ($thesaurus_entry_id) { $thesaurus_entry->load($thesaurus_entry_id); $search_types = explode("|", $thesaurus_entry->types); $thesaurus_entry->loadRefsTargets(); foreach ($thesaurus_entry->_atc_targets as $_target) { foreach ($_target->_ref_target as $_atc) { $object = new CMedicamentClasseATC(); $_target->_libelle = $object->getLibelle($_target->object_id); } } } else { $thesaurus_entry->agregation = $search_agregation; $thesaurus_entry->entry = $search_body; $thesaurus_entry->user_id = $search_user_id; $thesaurus_entry->types = is_array($search_types) ? implode(" ", $search_types) : explode(" ", $thesaurus_entry->types);
<?php /** * $Id$ * * @category Search * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @link http://www.mediboard.org */ $user = CMediusers::get(); $user->loadRefFunction()->loadRefGroup(); $start = (int) CValue::get("start_thesaurus", 0); $choose = CValue::get("_choose"); $entry = new CSearchThesaurusEntry(); $ds = $entry->getDS(); $where = array(); $types = array(); $group = CGroups::loadCurrent(); if (CAppUI::conf("search active_handler active_handler_search_types", $group)) { $types = explode("|", CAppUI::conf("search active_handler active_handler_search_types", $group)); } $contextes = CValue::get("contextes"); $contextes = $contextes ? $contextes : CSearchLog::loadContextes(); $where["contextes"] = $entry->_spec->ds->prepareIn($contextes); if ($choose) { $select_choose = explode(" ", $choose); $chaine = " = {$select_choose['1']}"; $data = $ds->prepare($chaine); switch ($select_choose[0]) {