Example #1
0
/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage PlanningOp
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$sejour_id = CValue::get("sejour_id");
$context = CValue::get("context", "all");
$relative_date = CValue::get("relative_date");
$sejour = new CSejour();
$sejour->load($sejour_id);
$prestations_j = CPrestationJournaliere::loadCurrentList($sejour->type);
$dates = array();
$prestations_p = array();
$liaisons_j = array();
$liaisons_p = array();
$date_modif = array();
CStoredObject::massLoadBackRefs($prestations_j, "items", "rank");
foreach ($prestations_j as $_prestation) {
    $items = $_prestation->loadRefsItems();
    CStoredObject::massLoadBackRefs($items, "sous_items", "nom");
    foreach ($items as $_item) {
        $_item->loadRefsSousItems();
    }
}
$sejour->loadRefPrescriptionSejour();
$sejour->loadRefCurrAffectation();
            continue;
        }
        if (!$show_cancelled) {
            if (!$_op->annulee) {
                $operations_by_salle[$salle_id][$_op->_id] = $_op;
            }
        } else {
            $operations_by_salle[$salle_id][$_op->_id] = $_op;
        }
    }
}
// Ajout des événements (opérations)
$can_edit = CCanDo::edit();
$diff_hour_urgence = CAppUI::conf("reservation diff_hour_urgence");
//prestations
$prestations_journalieres = CPrestationJournaliere::loadCurrentList();
$prestation_id = CAppUI::pref("prestation_id_hospi");
if ($show_operations) {
    /** @var $_operation COperation */
    foreach ($operations_by_salle as $salle_id => $_operations) {
        $i = array_search($salle_id, $salles_ids);
        foreach ($_operations as $_operation) {
            //CSQLDataSource::$trace = true;
            //en plage & non validé, skip
            if ($_operation->plageop_id && !$_operation->rank) {
                continue;
            }
            $_operation->_ref_salle = $salles[$_operation->salle_id];
            $workflow = $_operation->loadRefWorkflow();
            $sejour = $_operation->loadRefSejour();
            $chir = $_operation->loadRefChir();
Example #3
0
            $where["affectation.sortie"] = "BETWEEN '{$limit1}' AND '{$limit2}'";
            if (isset($where["sejour.entree"])) {
                unset($where["sejour.entree"]);
            }
            if (isset($whereNP["sejour.entree"])) {
                unset($whereNP["sejour.entree"]);
            }
            $where["sejour.sortie"] = "= affectation.sortie";
            $whereNP["sejour.sortie"] = "BETWEEN '{$limit1}' AND '{$limit2}'";
        }
        $_liste["place"] = $affectation->countList($where, null, $ljoin);
        $_liste["non_place"] = $sejour->countList($whereNP, null, $ljoinNP);
    }
}
$smarty = new CSmartyDP();
$smarty->assign("presents", $presents);
$smarty->assign("presentsNP", $presentsNP);
$smarty->assign("mouvements", $mouvements);
$smarty->assign("dep_entrants", $dep_entrants);
$smarty->assign("dep_sortants", $dep_sortants);
$smarty->assign("praticiens", $praticiens);
$smarty->assign("praticien_id", $praticien_id);
$smarty->assign("type_hospi", $type_hospi);
$smarty->assign("vue", $vue);
$smarty->assign("date", $date);
$smarty->assign("mode", $mode);
$smarty->assign("hour_instantane", $hour_instantane);
$smarty->assign("isImedsInstalled", CModule::getActive("dPImeds") && CImeds::getTagCIDC(CGroups::loadCurrent()));
$smarty->assign("prestations_journalieres", CPrestationJournaliere::loadCurrentList());
$smarty->assign("prestation_id", $prestation_id);
$smarty->display("edit_sorties.tpl");