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


PHP CApp::fetch方法代码示例

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


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

示例1: CMediusers

$end = CMbDT::date("next sunday", $start);
$muser = new CMediusers();
$musers = $muser->loadProfessionnelDeSanteByPref(PERM_READ, $function_id);
$function = new CFunctions();
$function->load($function_id);
echo "<h1>" . $function->_view . " (" . CMbDT::format($start, CAppUI::conf('longdate')) . " - " . CMbDT::format($end, CAppUI::conf('longdate')) . ")</h1>";
$pconsult = new CPlageconsult();
$ds = $pconsult->getDS();
$where = array();
$where[] = "chir_id " . $ds->prepareIn(array_keys($musers)) . " OR remplacant_id " . $ds->prepareIn(array_keys($musers));
$where["date"] = " BETWEEN '{$start}' AND '{$end}' ";
/** @var CPlageconsult[] $pconsults */
$pconsults = $pconsult->loadList($where, "date", null, "chir_id");
$pconsults_by_date_and_prat = array();
if (!count($pconsults)) {
    echo "<div class='small-info'>Les praticiens de ce cabinet n'ont pas de plages de consultations sur cette période</div>";
    CApp::rip();
}
foreach ($pconsults as $_pc) {
    $chir_id = CValue::get("chir_id", $_pc->chir_id);
    $_pc->loadRefChir();
    $_pc->loadRefRemplacant();
    echo "<h2>";
    echo $_pc->_ref_chir->_view;
    if ($_pc->remplacant_id) {
        echo "remplacé par : " . $_pc->_ref_remplacant->_view;
    }
    echo "</h2>";
    echo CApp::fetch("dPcabinet", "inc_plage_selector_weekly");
    echo "<hr class=\"pagebreak\">";
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:print_planning_function.php

示例2: foreach

    if (count($cstes)) {
        CStoredObject::massLoadFwdRef($cstes, "user_id");
        foreach ($cstes as $_cste) {
            $_cste->loadRefUser();
        }
        $smarty_cstes->assign("constantes_medicales_grid", CConstantesMedicales::buildGrid($cstes, false));
        $smarty_cstes->assign("sejour", $_sejour);
        $patients_offline[$patient->_guid]["constantes"] = $smarty_cstes->fetch("print_constantes.tpl", '', '', 0);
    }
    // Plan de soins
    $page_break = 0;
    if (count($patients_offline[$patient->_guid]["transmissions"]) || count($patients_offline[$patient->_guid]["observations"]) || count($patients_offline[$patient->_guid]["consultations"]) || $patients_offline[$patient->_guid]["constantes"]) {
        $page_break = 1;
    }
    $params = array("sejours_ids" => $_sejour->_id, "date" => $date, "hours_before" => "2", "hours_after" => "2", "empty_lines" => "2", "dialog" => 1, "mode_lite" => 1, "page_break" => $page_break);
    $patients_offline[$patient->_guid]["plan_soins"] = CApp::fetch("soins", "offline_plan_soins", $params);
    // Pour IE9 qui a des soucis avec les espaces entre une fermeture et une ouverture de td
    $patients_offline[$patient->_guid]["plan_soins"] = preg_replace('/>\\s+<(t[dh])/mi', "><\\1", $patients_offline[$patient->_guid]["plan_soins"]);
}
if ($service_id != "urgence") {
    if ($service_id == "NP") {
        array_multisort(CMbArray::pluck($patients_offline, "sejour", "_ref_patient", "nom"), SORT_ASC, $patients_offline);
    } else {
        array_multisort(CMbArray::pluck($patients_offline, "sejour", "_ref_curr_affectation", "_ref_lit", "_view"), SORT_ASC, $patients_offline);
    }
}
$smarty = new CSmartyDP();
$smarty->assign("date", $date);
$smarty->assign("service", $service);
$smarty->assign("service_id", $service_id);
$smarty->assign("patients_offline", $patients_offline);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:offline_sejours_lite.php

示例3: array

$ljoin = array();
$ljoin["evenement_ssr"] = "evenement_ssr.therapeute_id = users_mediboard.user_id";
$where["evenement_ssr.evenement_ssr_id"] = "IS NOT NULL";
$group = "users_mediboard.user_id";
$kines = $mediuser->loadList($where, null, null, $group, $ljoin);
CPrescriptionLine::$_load_for_delete = true;
// Parcours des kines et chargement du planning
foreach ($kines as $_kine) {
    $args_planning = array();
    $args_planning["kine_id"] = $_kine->_id;
    $args_planning["surveillance"] = 0;
    $args_planning["large"] = 1;
    $args_planning["print"] = 1;
    $args_planning["height"] = 600;
    $args_planning["date"] = $date;
    // Chargement du planning de technicien
    $plannings[$_kine->_id]["technicien"] = CApp::fetch("ssr", "ajax_planning_technicien", $args_planning);
    // Chargement du planning de surveillance
    $args_planning["surveillance"] = 1;
    $plannings[$_kine->_id]["surveillance"] = CApp::fetch("ssr", "ajax_planning_technicien", $args_planning);
}
$monday = CMbDT::date("last monday", CMbDT::date("+1 day", $date));
$sunday = CMbDT::date("next sunday", CMbDT::date("-1 DAY", $date));
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("plannings", $plannings);
$smarty->assign("kines", $kines);
$smarty->assign("date", $date);
$smarty->assign("monday", $monday);
$smarty->assign("sunday", $sunday);
$smarty->display("offline_plannings_techniciens.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:offline_plannings_techniciens.php

示例4: CSejour

$sejours_ids = CValue::get("sejours_ids");
// Chargement des séjours
$sejour = new CSejour();
$where = array();
$where["sejour_id"] = "IN ({$sejours_ids})";
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where);
$result = "";
CMbObject::massLoadFwdRef($sejours, "patient_id");
foreach ($sejours as $_sejour) {
    $_sejour->loadRefPatient();
}
// Tri par nom de patient
$sorter_nom = CMbArray::pluck($sejours, "_ref_patient", "nom");
$sorter_prenom = CMbArray::pluck($sejours, "_ref_patient", "prenom");
array_multisort($sorter_nom, SORT_ASC, $sorter_prenom, SORT_ASC, $sejours);
$last_sejour = end($sejours);
foreach ($sejours as $_sejour) {
    $_operation = $_sejour->loadRefLastOperation();
    if (!$_operation->_id) {
        continue;
    }
    $consult_anesth = $_operation->loadRefsConsultAnesth();
    if ($consult_anesth->_id) {
        $result .= CApp::fetch("dPcabinet", "print_fiche", array("dossier_anesth_id" => $consult_anesth->_id, "offline" => 1, "multi" => 1));
        if ($_sejour->_id != $last_sejour->_id) {
            $result .= "<hr style=\"border: none; page-break-after: always;\" />";
        }
    }
}
echo $result != "" ? $result : "<h1>" . CAppUI::tr("CConsultAnesth.none") . "</h1>";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:print_fiches_anesth.php

示例5: CSenderFTP

/**
 * Read FTP files
 *  
 * @category FTP
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html 
 * @version  SVN: $Id:$ 
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$sender_ftp_id = CValue::get("sender_ftp_id");
$sender_ftp = new CSenderFTP();
$senders_ftp = array();
if ($sender_ftp_id) {
    $sender_ftp->load($sender_ftp_id);
    $sender_ftp->loadRefsExchangesSources();
    $senders_ftp[] = $sender_ftp->actif ? $sender_ftp : array();
} else {
    // Chargement de la liste des expéditeurs d'intégration
    $where = array();
    $where["actif"] = " = '1'";
    $senders_ftp = $sender_ftp->loadList($where);
    foreach ($senders_ftp as $_sender_ftp) {
        $_sender_ftp->loadRefsExchangesSources();
    }
}
foreach ($senders_ftp as $_sender_ftp) {
    echo CApp::fetch("ftp", "ajax_dispatch_files", array("sender_ftp_guid" => $_sender_ftp->_guid));
}
开发者ID:fbone,项目名称:mediboard4,代码行数:30,代码来源:ajax_read_ftp_files.php

示例6: array

$plannings = array();
$equipements = array();
$plateau = new CPlateauTechnique();
$plateau->group_id = CGroups::loadCurrent()->_id;
/** @var CPlateauTechnique[] $plateaux */
$plateaux = $plateau->loadMatchingList();
foreach ($plateaux as $_plateau) {
    $_plateau->loadRefsEquipements();
    foreach ($_plateau->_ref_equipements as $_equipement) {
        if (!$_equipement->visualisable) {
            unset($_plateau->_ref_equipements[$_equipement->_id]);
            continue;
        }
        $equipements[$_equipement->_id] = $_equipement;
        $args_planning = array();
        $args_planning["equipement_id"] = $_equipement->_id;
        $args_planning["date"] = $date;
        $plannings[$_equipement->_id] = CApp::fetch("ssr", "ajax_planning_equipement", $args_planning);
    }
}
$monday = CMbDT::date("last monday", CMbDT::date("+1 day", $date));
$sunday = CMbDT::date("next sunday", CMbDT::date("-1 DAY", $date));
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("plannings", $plannings);
$smarty->assign("plateaux", $plateaux);
$smarty->assign("equipements", $equipements);
$smarty->assign("date", $date);
$smarty->assign("monday", $monday);
$smarty->assign("sunday", $sunday);
$smarty->display("offline_plannings_equipements.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:offline_plannings_equipements.php

示例7: CGrossesse

 * @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::checkRead();
$date = CView::request("date", "date default|" . CMbDT::date());
CView::checkin();
$date_max = CMbDT::date("+2 month", $date);
$group = CGroups::loadCurrent();
$grossesse = new CGrossesse();
$where = array();
$where["terme_prevu"] = "BETWEEN '{$date}' AND '{$date_max}'";
$where["group_id"] = "= '{$group->_id}'";
$grossesses = $grossesse->loadList($where);
$sejours = CStoredObject::massLoadBackRefs($grossesses, "sejours", "entree_prevue DESC");
CStoredObject::massLoadBackRefs($sejours, "operations", "date ASC");
$fiches_anesth = array();
$params = array("dossier_anesth_id" => "", "operation_id" => "", "offline" => 1, "print" => 1, "pdf" => 0);
/** @var CGrossesse $_grossesse */
foreach ($grossesses as $_grossesse) {
    foreach ($_grossesse->loadRefsConsultations() as $_consult) {
        foreach ($_consult->loadRefsDossiersAnesth() as $_dossier_anesth) {
            $params["dossier_anesth_id"] = $_dossier_anesth->_id;
            $fiches_anesth[$_dossier_anesth->_id] = CApp::fetch("dPcabinet", "print_fiche", $params);
        }
    }
}
$smarty = new CSmartyDP();
$smarty->assign("fiches_anesth", $fiches_anesth);
$smarty->display("offline_print_fiches.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:offline_print_fiches.php

示例8: foreach

    $_sejour->loadRefsConsultAnesth();
    $_sejour->_ref_consult_anesth->loadRefConsultation();
    if ($_sejour->_ref_consult_anesth->_id && !$_sejour->_ref_consult_anesth->operation_id) {
        $consult_id = $_sejour->_ref_consult_anesth->_id;
    } else {
        $_sejour->loadRefsOperations();
        foreach ($_sejour->_ref_operations as $_operation) {
            $_operation->loadRefsConsultAnesth();
            if ($_operation->_ref_consult_anesth->_id) {
                $_operation->_ref_consult_anesth->loadRefConsultation();
                $consult_id = $_operation->_ref_consult_anesth->_id;
            }
        }
    }
    if ($consult_id) {
        $args_dossier = array("dossier_anesth_id" => $consult_id, "offline" => 1, "pdf" => 0);
        $fiches_anesth[$_sejour->_id] = CApp::fetch("dPcabinet", "print_fiche", $args_dossier);
    }
    $args_fiche = array("sejour_id" => $_sejour->_id, "offline" => 1);
    $outputs[$_sejour->_id] = CApp::fetch("soins", "print_dossier_soins", $args_fiche);
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("_sejours", $_sejours);
$smarty->assign("service_id", $service_id);
$smarty->assign("service", $service);
$smarty->assign("date", $date);
$smarty->assign("dateTime", CMbDT::dateTime());
$smarty->assign("outputs", $outputs);
$smarty->assign("fiches_anesth", $fiches_anesth);
$smarty->display("print_dossiers_service.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:print_dossiers_service.php

示例9: array

                $stat_etablissement = array("ref" => $etablissement_tranfert, "count" => 0);
            }
            $stat_etablissement["count"]++;
        }
    }
    // Statistiques d'entrée
    if (CMbDT::date($_sejour->entree) == $date) {
        $stats["entree"]["total"]++;
        // Statistiques  d'âge de patient
        $patient =& $_sejour->_ref_patient;
        if ($patient->_annees < "1") {
            $stats["entree"]["less_than_1"]++;
        }
        if ($patient->_annees >= "75") {
            $stats["entree"]["more_than_75"]++;
        }
    }
    // Chargement nécessaire du mode offline
    if ($offline) {
        $params = array("rpu_id" => $_sejour->_ref_rpu->_id, "dialog" => 1, "offline" => 1);
        $offlines[$_sejour->_id] = CApp::fetch("dPurgences", "print_dossier", $params);
    }
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("date", $date);
$smarty->assign("stats", $stats);
$smarty->assign("sejours", $sejours);
$smarty->assign("offline", $offline);
$smarty->assign("offlines", $offlines);
$smarty->display("print_main_courante.tpl");
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:print_main_courante.php

示例10: foreach

CMbObject::massLoadRefsNotes($sejours);
CSejour::massLoadNDA($sejours);
/** @var CPatient[] $patients */
$patients = CStoredObject::massLoadFwdRef($sejours, "patient_id");
CPatient::massLoadIPP($patients);
foreach ($sejours as $sejour) {
    $patient = $sejour->loadRefPatient();
    $sejour->loadRefPraticien();
    $sejour->checkDaysRelative($date);
    $sejour->loadRefsNotes();
}
$sorter_patient = CMbArray::pluck($sejours, "_ref_patient", "nom");
if ($service_id == "NP") {
    array_multisort($sorter_patient, SORT_ASC, $sejours);
} else {
    $sorter_affectation = CMbArray::pluck($sejours, "_ref_curr_affectation", "_ref_lit", "_view");
    array_multisort($sorter_affectation, SORT_ASC, $sorter_patient, SORT_ASC, $sejours);
}
$period = CAppUI::conf("soins offline_sejour period", $group);
$dossiers_complets = array();
foreach ($sejours as $sejour) {
    $params = array("sejour_id" => $sejour->_id, "dialog" => 1, "offline" => 1, "in_modal" => 1, "embed" => $embed, "period" => $period);
    $dossiers_complets[$sejour->_id] = CApp::fetch("soins", "print_dossier_soins", $params);
}
$smarty = new CSmartyDP();
$smarty->assign("date", $date);
$smarty->assign("hour", CMbDT::time());
$smarty->assign("service", $service);
$smarty->assign("sejours", $sejours);
$smarty->assign("dossiers_complets", $dossiers_complets);
$smarty->display("offline_sejours.tpl");
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:offline_sejours.php

示例11: array

$root = $doc->createElement("modeles");
$doc->appendChild($root);
$where = array("compte_rendu_id" => CSQLDataSource::prepareIn($modeles_ids));
// Récupération des header_id, footer_id, preface_id et ending_id
$ds = CSQLDataSource::get("std");
$request = new CRequest();
$request->addTable("compte_rendu");
$request->addWhere($where);
$components_ids = array();
foreach (array("header_id", "footer_id", "preface_id", "ending_id") as $_component) {
    $request->select = array();
    $request->addSelect($_component);
    $components_ids = array_merge($components_ids, $ds->loadColumn($request->makeSelect()));
}
$modeles_ids = array_unique(array_merge($components_ids, $modeles_ids));
CMbArray::removeValue("", $modeles_ids);
foreach ($modeles_ids as $_modele_id) {
    $modele = CApp::fetch("dPcompteRendu", "ajax_export_modele", array("modele_id" => $_modele_id));
    $doc_modele = new CMbXMLDocument(null);
    @$doc_modele->loadXML($modele);
    // Importation du noeud CPrescription
    $modele_importe = $doc->importNode($doc_modele->firstChild, true);
    // Ajout de ce noeud comme fils de protocoles
    $doc->documentElement->appendChild($modele_importe);
}
$filename = 'Modèles ' . ($owner ? " - {$owner}" : '') . ($object_class ? " - " . CAppUI::tr($object_class) : '') . '.xml';
$content = $doc->saveXML();
header('Content-Type: text/xml');
header('Content-Disposition: attachment; filename="' . $filename . '"');
header('Content-Length: ' . strlen($content) . ';');
echo $content;
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_export_modeles.php

示例12: getIndexableData

 /**
  * Loads the related fields for indexing datum
  *
  * @return array
  */
 function getIndexableData()
 {
     $prat = $this->getIndexablePraticien();
     if (!$prat) {
         $prat = new CMediusers();
     }
     $array["id"] = $this->_id;
     $array["author_id"] = $this->getOwnerId();
     $array["prat_id"] = $prat->_id;
     $array["title"] = $this->loadRefExClass()->name;
     $content = CApp::fetch("forms", "view_ex_object", array("ex_class_id" => $this->_ex_class_id, "ex_object_id" => $this->_id));
     $array["body"] = $this->getIndexableBody($content);
     $date = $this->getCreateDate();
     if (!$date) {
         $date = CMbDT::dateTime();
     }
     $array["date"] = str_replace("-", "/", $date);
     $array["function_id"] = $prat->function_id;
     $array["group_id"] = $this->group_id;
     $array["patient_id"] = $this->getIndexablePatient()->_id;
     $ref_object = $this->getReferenceObject("CSejour");
     if ($ref_object) {
         $array["object_ref_id"] = $ref_object->_id;
         $array["object_ref_class"] = $ref_object->_class;
     } else {
         $ref_object = $this->getReferenceObject("CConsultation");
         $array["object_ref_id"] = $ref_object->_id;
         $array["object_ref_class"] = $ref_object->_class;
     }
     $array["ex_class_id"] = $this->_ex_class_id;
     return $array;
 }
开发者ID:OpenXtrem,项目名称:mediboard_save,代码行数:37,代码来源:CExObject.class.php

示例13: array

            if ($_consultation->heure < $heure_min) {
                $heure_min = $_consultation->heure;
            }
            if ($_consultation->chrono < CConsultation::TERMINE) {
                $nb_a_venir++;
            }
            if ($_consultation->chrono == CConsultation::PATIENT_ARRIVE) {
                $nb_attente++;
            }
            $_consultation->loadRefSejour();
            $_consultation->loadRefPatient();
            $_consultation->loadRefCategorie();
            $_consultation->countDocItems();
            if ($offline && $_consultation->patient_id && !isset($patients_fetch[$_consultation->patient_id])) {
                $args = array("object_guid" => $_consultation->_ref_patient->_guid, "ajax" => 1);
                $patients_fetch[$_consultation->patient_id] = CApp::fetch("system", "httpreq_vw_complete_object", $args);
            }
        }
    }
    if (!count($listPlages[$key_prat]["plages"]) && !$empty) {
        unset($listPlages[$key_prat]);
        unset($praticiens[$key_prat]);
    }
}
$prat_available = $praticiens;
if (!$prats_selected) {
    $prats_selected = array_keys($praticiens);
} else {
    $prats_selected = explode("-", $prats_selected);
}
$diff = array_diff(array_keys($praticiens), $prats_selected);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_journee.php

示例14: ob_clean

ob_clean();
CApp::setMemoryLimit("1024M");
CApp::setTimeLimit(240);
$service_id = CValue::get("service_id");
$date = CValue::get("date", CMbDT::date());
$service = new CService();
$service->load($service_id);
$datetime_min = "{$date} 00:00:00";
$datetime_max = "{$date} 23:59:59";
$datetime_avg = "{$date} " . CMbDT::time();
$sejour = new CSejour();
$where = array();
$ljoin = array();
$ljoin["affectation"] = "sejour.sejour_id = affectation.sejour_id";
$where["sejour.entree"] = "<= '{$datetime_max}'";
$where["sejour.sortie"] = " >= '{$datetime_min}'";
$where["affectation.entree"] = "<= '{$datetime_max}'";
$where["affectation.sortie"] = ">= '{$datetime_min}'";
$where["affectation.service_id"] = " = '{$service_id}'";
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where, null, null, "sejour.sejour_id", $ljoin);
$ordonnances = array();
foreach ($sejours as $_sejour) {
    $_prescription = $_sejour->loadRefPrescriptionSejour();
    $_patient = $_sejour->loadRefPatient();
    $params = array("prescription_id" => $_prescription->_id ?: "", "in_progress" => 1, "multipart" => 1);
    $_content = CApp::fetch("dPprescription", "print_prescription_fr", $params);
    $_naissance = str_replace("/", "-", $_patient->getFormattedValue("naissance"));
    $ordonnances[] = array("title" => base64_encode($_patient->_view . " - " . $_naissance), "content" => base64_encode($_content), "extension" => "pdf");
}
CApp::json($ordonnances);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:offline_prescriptions_multipart.php

示例15: array

<?php

/* $Id: $ */
/**
 * @package Mediboard
 * @subpackage soins
 * @version $Revision: $
 * @author SARL OpenXtrem
 * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html 
 */
$sejour_id = CValue::getOrSession("sejour_id");
if ($sejour_id) {
    echo CApp::fetch("soins", "ajax_vw_dossier_sejour", array("sejour_id" => $sejour_id, "popup" => 1));
}
开发者ID:fbone,项目名称:mediboard4,代码行数:14,代码来源:vw_dossier_sejour.php


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