当前位置: 首页>>代码示例>>PHP>>正文


PHP CMbObject::massLoadBackRefs方法代码示例

本文整理汇总了PHP中CMbObject::massLoadBackRefs方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbObject::massLoadBackRefs方法的具体用法?PHP CMbObject::massLoadBackRefs怎么用?PHP CMbObject::massLoadBackRefs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMbObject的用法示例。


在下文中一共展示了CMbObject::massLoadBackRefs方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

CCanDo::checkRead();
$date = CValue::get("date", CMbDT::date());
$group = CGroups::loadCurrent();
$date_min = CMbDT::date("-" . CAppUI::conf("maternite CGrossesse min_check_terme", $group) . " DAYS", $date);
$date_max = CMbDT::date("+" . CAppUI::conf("maternite CGrossesse max_check_terme", $group) . " DAYS", $date);
$where = array();
$ljoin = array();
$where["terme_prevu"] = "BETWEEN '{$date_min}' AND '{$date_max}'";
$where["group_id"] = " = '{$group->_id}' ";
$ljoin["patients"] = "patients.patient_id = grossesse.parturiente_id";
$grossesse = new CGrossesse();
/** @var CStoredObject[] $grossesses */
$grossesses = $grossesse->loadGroupList($where, "terme_prevu ASC, nom ASC", null, null, $ljoin);
CMbObject::massLoadFwdRef($grossesses, "parturiente_id");
CMbObject::massCountBackRefs($grossesses, "sejours");
$consultations = CMbObject::massLoadBackRefs($grossesses, "consultations");
CMbObject::massLoadFwdRef($consultations, "plageconsult_id");
/** @var CGrossesse[] $grossesses */
foreach ($grossesses as $_grossesse) {
    $_grossesse->loadRefParturiente();
    $_grossesse->countRefSejours();
    $_grossesse->loadRefsConsultations(true);
    foreach ($_grossesse->_ref_consultations as $_consult) {
        $_consult->loadRefPlageConsult();
    }
}
$smarty = new CSmartyDP();
$smarty->assign("grossesses", $grossesses);
$smarty->assign("date", $date);
$smarty->assign("date_min", $date_min);
$smarty->assign("date_max", $date_max);
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:ajax_tdb_grossesses.php

示例2: CSejour

 */
CCanDo::checkRead();
$date = CValue::get("date", CMbDT::date());
$group = CGroups::loadCurrent();
$sejour = new CSejour();
$where = array();
$where["sejour.grossesse_id"] = "IS NOT NULL";
$where["sejour.entree"] = "<= '{$date} 23:59:59' ";
$where["sejour.sortie"] = ">= '{$date} 00:00:00' ";
$where["sejour.group_id"] = " = '{$group->_id}' ";
$order = "sejour.entree DESC";
/** @var CSejour[] $listSejours */
$listSejours = $sejour->loadList($where, $order, null, null, null);
$grossesses = CMbObject::massLoadFwdRef($listSejours, "grossesse_id");
CMbObject::massLoadFwdRef($grossesses, "parturiente_id");
$naissances = CMbObject::massLoadBackRefs($grossesses, "naissances");
$sejours_enfant = CMbObject::massLoadFwdRef($naissances, "sejour_enfant_id");
CMbObject::massLoadFwdRef($sejours_enfant, "patient_id");
foreach ($listSejours as $_sejour) {
    $grossesse = $_sejour->loadRefGrossesse();
    $grossesse->loadRefParturiente();
    $naissances = $grossesse->loadRefsNaissances();
    $grossesse->_ref_sejour = $_sejour;
    $grossesse->loadRefLastOperation();
    foreach ($naissances as $_naissance) {
        $_naissance->loadRefSejourEnfant()->loadRefPatient();
        $_naissance->loadRefOperation();
    }
    $_sejour->loadRefCurrAffectation($date . " " . CMbDT::time());
    $grossesse->getDateAccouchement();
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:ajax_tdb_hospitalisations.php

示例3: array

            $plageConsult->loadFillRate();
            if ($details) {
                $plageConsult->loadRefsConsultations();
            }
        }
        $plagesConsult[$date] = $plagesPerDayConsult;
    }
    if (in_array("interv", $export)) {
        $where = array();
        $where[] = "chir_id = '{$prat_id}' OR anesth_id = '{$prat_id}'";
        $where["date"] = "= '{$date}'";
        $where["salle_id"] = CSQLDataSource::prepareIn(array_keys($listSalles));
        $plagesPerDayOp = $plageOp->loadList($where);
        $salles = CMbObject::massLoadFwdRef($plagesPerDayOp, "salle_id");
        CMbObject::massLoadFwdRef($salles, "bloc_id");
        CMbObject::massLoadBackRefs($plagesPerDayOp, "operations");
        foreach ($plagesPerDayOp as $key => $plage) {
            $plage->loadRefSalle();
            $plage->_ref_salle->loadRefBloc();
            $plage->_ref_salle->_ref_bloc->loadRefGroup();
            if ($details) {
                $plage->loadRefsOperations();
            }
            $plage->multicountOperations();
            $plagesOp[$plage->salle_id][$date] = $plagesPerDayOp[$key];
        }
    }
}
// Création du calendrier
$v = new CMbCalendar("Planning");
// Création des évènements plages de consultation
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:export_ical.php

示例4: array

$where["annule"] = "= '0'";
$where[] = "service.urgence = '1' OR service.radiologie = '1'";
$where["service.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$where["emplacement.plan_x"] = "IS NOT NULL";
$chambres_urgences = $chambre->loadList($where, null, null, "chambre_id", $ljoin);
$where = array();
$where["annule"] = "= '0'";
$where["service.uhcd"] = "= '1'";
$where["service.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$where["emplacement.plan_x"] = "IS NOT NULL";
$chambres_uhcd = $chambre->loadList($where, null, null, "chambre_id", $ljoin);
$_chambres = $chambres_urgences;
foreach ($chambres_uhcd as $_chambre_uhcd) {
    $_chambres[$_chambre_uhcd->_id] = $_chambre_uhcd;
}
$lits = CMbObject::massLoadBackRefs($_chambres, "lits");
$conf_nb_colonnes = CAppUI::conf("dPhospi nb_colonnes_vue_topologique");
$grille = array("urgence" => array_fill(0, $conf_nb_colonnes, array_fill(0, $conf_nb_colonnes, 0)), "uhcd" => array_fill(0, $conf_nb_colonnes, array_fill(0, $conf_nb_colonnes, 0)));
$listSejours = array("uhcd" => array(), "urgence" => array());
$ljoin = array();
$ljoin["rpu"] = "rpu.sejour_id = sejour.sejour_id";
$where = array();
$where["sejour.entree"] = " BETWEEN '{$date_before}' AND '{$date_after}'";
$where["sejour.sortie_reelle"] = "IS NULL";
$where["sejour.annule"] = " = '0'";
$where["sejour.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$temp = "";
if (CAppUI::conf("dPurgences create_affectation")) {
    $ljoin["affectation"] = "affectation.sejour_id = sejour.sejour_id";
    $ljoin["service"] = "service.service_id = affectation.service_id";
    $ljoin["lit"] = "lit.lit_id = affectation.lit_id";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_placement_patients.php

示例5: CCompteRendu

 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkAdmin();
$limit = CValue::get("limit", "100");
$compte_rendu = new CCompteRendu();
$where = array();
$where["factory"] = "IS NULL";
$compte_rendus = $compte_rendu->loadList($where, null, $limit);
$count = count($compte_rendus);
$errors = 0;
$msgs = array();
CMbObject::massLoadBackRefs($compte_rendus, "files");
foreach ($compte_rendus as $_compte_rendu) {
    $file = $_compte_rendu->loadFile();
    $file_content = $file->_file_path && file_exists($file->_file_path) ? file_get_contents($file->_file_path) : "";
    if ($file_content === "") {
        $_compte_rendu->factory = "none";
    } else {
        $_compte_rendu->factory = strpos($file_content, "/Creator (DOMPDF)") !== false ? "CDomPDFConverter" : "CWkHtmlToPDFConverter";
    }
    if ($msg = $_compte_rendu->store()) {
        $msgs[] = $msg;
        $errors++;
    }
}
CAppUI::stepAjax("{$errors} erreurs sur {$count} compte-rendus");
foreach ($msgs as $_msg) {
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_apply_factory.php

示例6: CTechnicien

// Technicien et plateau
$technicien = new CTechnicien();
$plateau = new CPlateauTechnique();
if ($technicien->_id = $bilan->technicien_id) {
    $technicien->loadMatchingObject();
    /** @var CPlateauTechnique $plateau */
    $plateau = $technicien->loadRefPlateau();
    $plateau->loadRefsEquipements();
    $plateau->loadRefsTechniciens();
}
// Chargement de tous les plateaux et des equipements et techniciens associés
$plateau_tech = new CPlateauTechnique();
$plateau_tech->group_id = CGroups::loadCurrent()->_id;
/** @var CPlateauTechnique[] $plateaux */
$plateaux = $plateau_tech->loadMatchingList();
CMbObject::massLoadBackRefs($plateaux, "equipements", "nom ASC");
foreach ($plateaux as $_plateau) {
    $_plateau->loadRefsEquipements();
}
// Chargement des executants en fonction des category de prescription
$executants = array();
$reeducateurs = array();
$selected_cat = "";
$user = CMediusers::get();
$func_cats = CStoredObject::massLoadBackRefs($categories, "functions_category");
CStoredObject::massLoadFwdRef($func_cats, "function_id");
foreach ($categories as $_category) {
    // Chargement des associations pour chaque catégorie
    $associations[$_category->_id] = $_category->loadBackRefs("functions_category");
    // Parcours des associations trouvées et chargement des utilisateurs
    /** @var CFunctionCategoryPrescription $_association */
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_activites_sejour.php

示例7: CService

 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCAnDo::checkRead();
$action = CValue::get("action", "mapService");
$lit_id = CValue::get("lit_id");
$group_id = CGroups::loadCurrent()->_id;
$service = new CService();
$where = array();
$where["group_id"] = "= '{$group_id}'";
$where["cancelled"] = "= '0'";
$where["secteur_id"] = "IS NULL";
$order = "externe, nom";
$all_services = $service->loadList($where, $order);
unset($where["secteur_id"]);
$services_allowed = $service->loadListWithPerms(PERM_READ, $where, $order);
$where = array();
$where["group_id"] = "= '{$group_id}'";
$secteur = new CSecteur();
$secteurs = $secteur->loadList($where, "nom");
CMbObject::massLoadBackRefs($secteurs, "services");
foreach ($secteurs as $_secteur) {
    $_secteur->loadRefsServices();
}
$smarty = new CSmartyDP();
$smarty->assign("all_services", $all_services);
$smarty->assign("services_allowed", $services_allowed);
$smarty->assign("secteurs", $secteurs);
$smarty->assign("action", $action);
$smarty->assign("lit_id", $lit_id);
$smarty->display("inc_select_service.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_select_service.php


注:本文中的CMbObject::massLoadBackRefs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。