$_consultation->loadRefPraticien()->loadRefFunction(); $_consultation->canEdit(); } } // Affichage de l'autocomplete des éléments de prescription $display_elt = false; if (CModule::getActive("dPprescription")) { $consult->loadRefElementPrescription(); if ($consult->_id) { $task = $consult->loadRefTask(); if (!$task->_id || !$task->prescription_line_element_id) { $display_elt = true; } } else { if (!$line_element_id) { $elt = new CElementPrescription(); $elt->consultation = 1; if ($elt->countMatchingList()) { $display_elt = true; } } } } $consult->loadPosition(); // Création du template $smarty = new CSmartyDP(); $smarty->assign("listCat", $listCat); $smarty->assign("categories", $categories); $smarty->assign("plageConsult", $plageConsult); $smarty->assign("consult", $consult); $smarty->assign("following_consultations", $following_consultations);
* @version $Revision$ */ CCanDo::checkRead(); $libelle = CValue::post("libelle"); // Recuperation de la fonction de l'utilisateur courant $function_id = CMediusers::get()->function_id; // Recherche des elements que l'utilisateur courant a le droit de prescrire // (executant de la categorie et categorie prescritible par executant) $ljoin = array(); $ljoin["category_prescription"] = "category_prescription.category_prescription_id = element_prescription.category_prescription_id"; $ljoin["function_category_prescription"] = "function_category_prescription.category_prescription_id = category_prescription.category_prescription_id"; $where = array(); $where["element_prescription.libelle"] = " LIKE '%{$libelle}%'"; $where["category_prescription.prescription_executant"] = " = '1'"; $where["function_category_prescription.function_category_prescription_id"] = " IS NOT NULL"; $where["function_category_prescription.function_id"] = " = '{$function_id}'"; $element = new CElementPrescription(); /** @var CElementPrescription[] $elements */ $elements = $element->loadList($where, null, null, null, $ljoin); CStoredObject::massLoadFwdRef($elements, "category_prescription_id"); // Chargement de la categorie des elements foreach ($elements as $_element) { $_element->loadRefCategory(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("elements", $elements); $smarty->assign("libelle", $libelle); $smarty->assign("category_id", ""); $smarty->assign("nodebug", true); $smarty->display("../../dPprescription/templates/httpreq_do_element_autocomplete.tpl");
$ljoin["prescription_line_element"] = "prescription_line_element.prescription_id = prescription.prescription_id"; $where = array(); $where["prescription.prescription_id"] = "IS NOT NULL"; $where["prescription_line_element.element_prescription_id"] = " = '{$element_id}'"; $where["sejour.type"] = "= 'ssr'"; $where["sejour.sejour_id"] = " <> '{$sejour_id}'"; $where["sejour.annule"] = " = '0'"; $sejours = CSejour::loadListForDate($date, $where, "entree", null, "sejour_id", $ljoin); foreach ($sejours as $_sejour) { /* @var CSejour $_sejour*/ $patient = $_sejour->loadRefPatient(); $patient->loadIPP(); $_sejour->loadRefPraticien(); $bilan = $_sejour->loadRefBilanSSR(); $bilan->loadRefPraticienDemandeur(); $bilan->loadRefKineReferent(); // Détail du séjour $_sejour->checkDaysRelative($date); $_sejour->loadNDA(); $_sejour->loadRefsNotes(); // Chargement du lit $_sejour->loadRefCurrAffectation()->loadRefLit(); } $element = new CElementPrescription(); $element->load($element_id); $smarty = new CSmartyDP(); $smarty->assign("sejours", $sejours); $smarty->assign("date", $date); $smarty->assign("_sejours_guids", $_sejours_guids); $smarty->assign("element", $element); $smarty->display("vw_patients_seance_collective.tpl");
/** * $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(); $category_id = CValue::get("category_id"); $element_prescription_id = CValue::get("element_prescription_id"); $prescription_id = CValue::get("prescription_id"); // Chargement de la ligne selectionnée $element = new CElementPrescription(); $element->load($element_prescription_id); // Chargement de toutes les lignes de la categorie $line = new CPrescriptionLineElement(); $ljoin["element_prescription"] = "prescription_line_element.element_prescription_id = element_prescription.element_prescription_id"; $where["prescription_id"] = " = '{$prescription_id}'"; $where["element_prescription.category_prescription_id"] = " = '{$category_id}'"; $lines = $line->loadList($where, null, null, null, $ljoin); $warning = false; /* foreach($lines as $_line){ if ($element_prescription_id == $_line->element_prescription_id){ $warning = true; } } */