$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; } } */ $last_line = end($lines);