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


PHP CService类代码示例

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


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

示例1: resetModifications

 function resetModifications()
 {
     $typeRepas = new CTypeRepas();
     $typeRepas->load($this->typerepas_id);
     $service = new CService();
     $service->load($this->service_id);
     $service->loadRefsBack();
     foreach ($service->_ref_chambres as $chambre_id => &$chambre) {
         $chambre->loadRefsBack();
         foreach ($chambre->_ref_lits as $lit_id => &$lit) {
             $lit->loadAffectations($this->date);
             foreach ($lit->_ref_affectations as $affectation_id => &$affectation) {
                 $affectation->loadRefSejour();
                 $affectation->loadMenu($this->date, array($this->typerepas_id => null));
                 $sejour =& $affectation->_ref_sejour;
                 $date_entree = substr($affectation->entree, 0, 10);
                 $date_sortie = substr($affectation->sortie, 0, 10);
                 $heure_entree = substr($affectation->entree, 11, 5);
                 $heure_sortie = substr($affectation->sortie, 11, 5);
                 if (!$sejour->sejour_id || $sejour->type == "ambu" || $this->date == $date_entree && $heure_entree > $typeRepas->fin || $this->date == $date_sortie && $heure_sortie < $typeRepas->debut) {
                 } else {
                     $repas =& $affectation->_list_repas[$this->date][$this->typerepas_id];
                     if ($repas->modif) {
                         $repas->modif = 0;
                         $repas->_no_synchro = true;
                         $repas->store();
                     }
                 }
             }
         }
     }
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:32,代码来源:CValidationRepas.class.php

示例2: _getAllConfigs

 protected static function _getAllConfigs($class, $key, $value)
 {
     // Chargement des etablissements
     $group = new CGroups();
     /** @var CGroups[] $groups */
     $groups = $group->loadList();
     // Chargement des services
     $service = new CService();
     $services = $service->loadList();
     // Chargement de toutes les configs
     /** @var self $config */
     $config = new $class();
     /** @var self[] $all_configs */
     $all_configs = $config->loadList();
     if ($all_configs == null) {
         return null;
     }
     /** @var self[] $configs_default */
     // Creation du tableau de valeur par defaut (quelque soit l'etablissement)
     foreach ($all_configs as $_config) {
         if (!$_config->service_id && !$_config->group_id) {
             $configs_default[$_config->{$key}] = $_config;
         } else {
             if ($_config->service_id) {
                 $configs_service[$_config->service_id][$_config->{$key}] = $_config->{$value};
             } else {
                 $configs_group[$_config->group_id][$_config->{$key}] = $_config->{$value};
             }
         }
     }
     $configs = array();
     // Parcours des etablissements
     foreach ($groups as $group_id => $group) {
         $group->loadRefsServices();
         // Parcours des services
         foreach ($group->_ref_services as $service_id => $_service) {
             foreach ($configs_default as $_config_default) {
                 $configs[$group_id][$service_id][$_config_default->{$key}] = $_config_default->{$value};
                 if (isset($configs_group[$group_id][$_config_default->{$key}])) {
                     $configs[$group_id][$service_id][$_config_default->{$key}] = $configs_group[$group_id][$_config_default->{$key}];
                 }
                 if (isset($configs_service[$service_id][$_config_default->{$key}])) {
                     $configs[$group_id][$service_id][$_config_default->{$key}] = $configs_service[$service_id][$_config_default->{$key}];
                 }
             }
         }
         // Si aucun service
         foreach ($configs_default as $_config_default) {
             if (isset($configs_group[$group_id][$_config_default->{$key}])) {
                 $configs[$group_id]["none"][$_config_default->{$key}] = $configs_group[$group_id][$_config_default->{$key}];
             } else {
                 $configs[$group_id]["none"][$_config_default->{$key}] = $_config_default->{$value};
             }
         }
     }
     return $configs;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:57,代码来源:CConfigServiceAbstract.class.php

示例3: loadServiceComplet

/**
 * Charge complètement un service pour l'affichage des affectations
 *
 * @param CService $service       le service concerné
 * @param string   $date          le filtre de date sur les affectations
 * @param string   $mode          forcer le chargement des affectations effectuées
 * @param int      $praticien     charge les séjours pour un praticien en particulier
 * @param string   $type          charge les séjours pour un type d'hospitalisation
 * @param int      $prestation_id charge la prestation éventuellement associée à chaque séjour
 *
 *
 * @return void
 */
function loadServiceComplet(&$service, $date, $mode, $praticien_id = "", $type = "", $prestation_id = "", $with_dossier_medical = true)
{
    $service->_nb_lits_dispo = 0;
    $dossiers = array();
    $systeme_presta = CAppUI::conf("dPhospi prestations systeme_prestations", CGroups::loadCurrent());
    $lits = $service->loadRefsLits();
    foreach ($lits as $_lit) {
        $_lit->_ref_affectations = array();
        $_lit->checkDispo($date);
    }
    $affectations = $service->loadRefsAffectations($date, $mode, false, true);
    $sejours = CMbObject::massLoadFwdRef($affectations, "sejour_id");
    CMbObject::massLoadFwdRef($sejours, "patient_id");
    CMbObject::massLoadFwdRef($sejours, "prestation_id");
    CMbObject::massLoadFwdRef($sejours, "praticien_id");
    if (CModule::getActive("dPImeds")) {
        CSejour::massLoadNDA($sejours);
    }
    foreach ($affectations as $_affectation) {
        $sejour = $_affectation->loadRefSejour();
        if ($praticien_id) {
            if ($sejour->praticien_id != $praticien_id) {
                unset($affectations[$_affectation->_id]);
                continue;
            }
        }
        if ($type) {
            if ($sejour->type != $type) {
                unset($affectations[$_affectation->_id]);
                continue;
            }
        }
        $lits[$_affectation->lit_id]->_ref_affectations[$_affectation->_id] = $_affectation;
        $_affectation->loadRefsAffectations(true);
        $_affectation->checkDaysRelative($date);
        $aff_prev = $_affectation->_ref_prev;
        if ($aff_prev->_id) {
            if ($aff_prev->lit_id) {
                $aff_prev->loadRefLit();
            } else {
                $aff_prev->loadRefService();
            }
        }
        $aff_next = $_affectation->_ref_next;
        if ($aff_next->_id) {
            if ($aff_next->lit_id) {
                $aff_prev->loadRefLit();
            } else {
                $aff_prev->loadRefService();
            }
        }
        $sejour->loadRefPrestation();
        $sejour->loadRefsOperations();
        $sejour->loadNDA();
        $sejour->loadRefPraticien();
        $sejour->loadRefPatient();
        if ($with_dossier_medical) {
            $sejour->_ref_patient->loadRefDossierMedical(false);
            $dossiers[] = $sejour->_ref_patient->_ref_dossier_medical;
        }
        // Chargement des droits CMU
        $sejour->getDroitsCMU();
        foreach ($sejour->_ref_operations as $_operation) {
            $_operation->loadExtCodesCCAM();
        }
        $_affectation->_ref_lit = $lits[$_affectation->lit_id];
        $_affectation->loadRefLit();
        $_affectation->_ref_lit->_ref_chambre->_nb_affectations++;
        if ($systeme_presta == "expert" && $prestation_id) {
            $sejour->loadLiaisonsForDay($prestation_id, $date);
        }
    }
    foreach ($lits as $_lit) {
        array_multisort(CMbArray::pluck($_lit->_ref_affectations, "_ref_sejour", "entree"), SORT_ASC, $_lit->_ref_affectations);
    }
    if ($with_dossier_medical) {
        CDossierMedical::massCountAntecedentsByType($dossiers, "deficience");
    }
    if (!$service->externe) {
        foreach ($service->_ref_chambres as $_chambre) {
            $_chambre->checkChambre();
            $service->_nb_lits_dispo += $_chambre->_nb_lits_dispo;
        }
    }
}
开发者ID:fbone,项目名称:mediboard4,代码行数:98,代码来源:inc_vw_affectations.php

示例4: guessHost

 /**
  * Find the host from a context object
  *
  * @param CMbObject|string $context The context (séjour, rpu, service, etablissement)
  *
  * @return CGroups|CService|CFunctions|string
  */
 static function guessHost($context)
 {
     if ($context === "global") {
         return "global";
     }
     // Etablissement, service ou cabinet (deja un HOST)
     if ($context instanceof CGroups || $context instanceof CService || $context instanceof CFunctions || $context instanceof CBlocOperatoire) {
         return $context;
     }
     // Séjour d'urgence
     if ($context instanceof CSejour && $context->type == "urg") {
         $rpu = $context->loadRefRPU();
         if ($rpu && $rpu->_id) {
             $context = $rpu;
         }
     }
     // Sejour
     if ($context instanceof CSejour) {
         $affectation = $context->loadRefCurrAffectation();
         if (!$affectation->_id) {
             $affectation = $context->loadRefFirstAffectation();
         }
         return $affectation->loadRefService();
     }
     // Urgences
     if ($context instanceof CRPU) {
         /** @var CService $service */
         $service = null;
         if ($context->box_id) {
             return $context->loadRefBox()->loadRefService();
         }
         $sejour = $context->loadRefSejour();
         $affectation = $sejour->loadRefCurrAffectation();
         if (!$affectation->_id) {
             $affectation = $sejour->loadRefFirstAffectation();
         }
         $service = $affectation->loadRefService();
         if ($service && $service->_id) {
             return $service;
         }
         // Recherche du premier service d'urgences actif
         $group_id = CGroups::loadCurrent()->_id;
         $where = array("group_id" => "= '{$group_id}'", "urgence" => "= '1'", "cancelled" => "= '0'");
         $service = new CService();
         $service->loadObject($where, "nom");
         return $service;
     }
     // Utiliser le contexte de la consultation dans la cas des dossiers d'anesth
     if ($context instanceof CConsultAnesth) {
         $context = $context->loadRefConsultation();
     }
     // Utiliser le contexte du cabinet dans le cas des consultations
     if ($context instanceof CConsultation) {
         return $context->loadRefPlageConsult()->loadRefChir()->loadRefFunction();
     }
     return CGroups::loadCurrent();
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:64,代码来源:CConstantesMedicales.class.php

示例5: CMediusers

$filter->convalescence = CValue::getOrSession("convalescence");
$filter->_specialite = CValue::getOrSession("_specialite");
$filter->_filter_type = CValue::getOrSession("_filter_type");
$filter->_ccam_libelle = CValue::getOrSession("_ccam_libelle", "1");
$filter->_coordonnees = CValue::getOrSession("_coordonnees");
$filter->_notes = CValue::getOrSession("_notes");
$filter->_by_date = CValue::getOrSession("_by_date");
$listPrat = new CMediusers();
$listPrat = $listPrat->loadPraticiens(PERM_READ);
$listSpec = new CFunctions();
$listSpec = $listSpec->loadSpecialites(PERM_READ);
// Récupération de la liste des services
$where = array();
$where["externe"] = "= '0'";
$where["cancelled"] = "= '0'";
$service = new CService();
$services = $service->loadGroupList($where);
$yesterday = CMbDT::date("-1 day", $today);
$tomorrow = CMbDT::date("+1 day", $today);
$j2 = CMbDT::date("+2 day", $today);
$j3 = CMbDT::date("+3 day", $today);
$week_deb = CMbDT::date("last sunday", $today);
$week_fin = CMbDT::date("next sunday", $week_deb);
$week_deb = CMbDT::date("+1 day", $week_deb);
$next_week_deb = CMbDT::date("+1 day", $week_fin);
$next_week_fin = CMbDT::date("next sunday", $next_week_deb);
$yesterday_deb = "{$yesterday} 06:00:00";
$yesterday_fin = "{$yesterday} 21:00:00";
$today_deb = "{$today} 06:00:00";
$today_fin = "{$today} 21:00:00";
$tomorrow_deb = "{$tomorrow} 06:00:00";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:form_print_planning.php

示例6: getOtherRequestSejour

 /**
  * Get others PV1 QPD element
  *
  * @param DOMNode $node QPD element
  *
  * @return array
  */
 function getOtherRequestSejour(DOMNode $node)
 {
     // Recherche du service
     $service = new CService();
     $ds = $service->getDS();
     $where_returns = array();
     if ($service_name = $this->getDemographicsFields($node, "CSejour", "3.1")) {
         $service_name = preg_replace("/\\*+/", "%", $service_name);
         $where["code"] = $ds->prepare("LIKE %", $service_name);
         $ids = array_unique($service->loadIds($where, null, 100));
         // FIXME prendre les affectations en compte
         $where_returns["sejour.service_id"] = $ds->prepareIn($ids);
     }
     // Praticien
     if (($attending_doctor_name = $this->getDemographicsFields($node, "CSejour", "7.2.1")) || ($attending_doctor_name = $this->getDemographicsFields($node, "CSejour", "17.2.1"))) {
         $user = new CUser();
         $attending_doctor_name = preg_replace("/\\*+/", "%", $attending_doctor_name);
         $where["user_last_name"] = $ds->prepare("LIKE %", $attending_doctor_name);
         $ids = array_unique($user->loadIds($where, null, 100));
         $where_returns["sejour.praticien_id"] = $ds->prepareIn($ids);
     }
     // Médecin adressant
     if ($referring_doctor_name = $this->getDemographicsFields($node, "CSejour", "8.2.1")) {
         $medecin = new CMedecin();
         $referring_doctor_name = preg_replace("/\\*+/", "%", $referring_doctor_name);
         $where["nom"] = $ds->prepare("LIKE %", $referring_doctor_name);
         $ids = array_unique($medecin->loadIds($where, null, 100));
         $where_returns["sejour.adresse_par_prat_id"] = $ds->prepareIn($ids);
     }
     return $where_returns;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:38,代码来源:CHL7v2GeneratePatientDemographicsResponse.class.php

示例7: array

}
$categories = CPrescription::getCategoriesForPeriod($service_id, $date, $real_time);
if (!count($categories_id_pancarte)) {
    $categories_id_pancarte = array("med");
    foreach ($categories as $_categorie) {
        foreach ($_categorie as $_elts) {
            $categories_id_pancarte = array_merge($categories_id_pancarte, array_keys($_elts));
        }
    }
}
$filter_line = new CPrescriptionLineMedicament();
$filter_line->debut = $date;
// Récupération de la liste des services
$where = array();
$where["externe"] = "= '0'";
$where["cancelled"] = "= '0'";
$service = new CService();
$services = $service->loadGroupList($where);
// Smarty template
$smarty = new CSmartyDP();
$smarty->assign("service", $service);
$smarty->assign("filter_line", $filter_line);
$smarty->assign("services", $services);
$smarty->assign("service_id", $service_id);
$smarty->assign("date", $date);
$smarty->assign('day', CMbDT::date());
$smarty->assign('real_time', $real_time);
$smarty->assign("categories", $categories);
$smarty->assign("date_min", "");
$smarty->assign("categories_id_pancarte", $categories_id_pancarte);
$smarty->display('vw_pancarte_service.tpl');
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:vw_pancarte_service.php

示例8: array

 $ticks[] = array(count($ticks) * 2 - 0.4, utf8_encode(CMbDT::format($date, "%b")));
 // Input //////////////////
 $where = array("product.product_id" => "= '{$product->_id}'", "product_order_item_reception.date" => "BETWEEN '{$date}' AND '{$to}'");
 $ljoin = array("product_order_item" => "product_order_item.order_item_id = product_order_item_reception.order_item_id", "product_reference" => "product_reference.reference_id = product_order_item.reference_id", "product" => "product.product_id = product_reference.product_id");
 $lot = new CProductOrderItemReception();
 /** @var CProductOrderItemReception[] $lots */
 $lots = $lot->loadList($where, null, null, null, $ljoin);
 $total = 0;
 foreach ($lots as $_lot) {
     $total += $_lot->quantity;
 }
 $max = max($max, $total);
 $series[0]["data"][] = array(count($series[0]["data"]) * 2 - 0.6, $total);
 // Hack pour les etablissements qui ont un service "Périmés"
 $where_services = array("nom" => "= 'Périmés'");
 $services_expired = new CService();
 $services_expired_ids = $services_expired->loadIds($where_services);
 // Output //////////////////
 $where = array("product_delivery.stock_class" => "= 'CProductStockGroup'", "product_delivery.stock_id" => "= '{$product->_ref_stock_group->_id}'", "product_delivery_trace.date_delivery" => "BETWEEN '{$date}' AND '{$to}'");
 if (count($services_expired_ids)) {
     $where[100] = "(product_delivery.type != 'expired' OR product_delivery.type IS NULL)\r\n                   AND product_delivery.service_id NOT IN (" . implode(',', $services_expired_ids) . ")";
 } else {
     $where[100] = "product_delivery.type != 'expired' OR product_delivery.type IS NULL";
 }
 $ljoin = array("product_delivery" => "product_delivery.delivery_id = product_delivery_trace.delivery_id");
 $trace = new CProductDeliveryTrace();
 /** @var CProductDeliveryTrace $traces */
 $traces = $trace->loadList($where, null, null, null, $ljoin);
 $total = 0;
 foreach ($traces as $_trace) {
     $total += $_trace->quantity;
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:httpreq_vw_product_consumption_graph.php

示例9: unset

/**
 * $Id$
 *
 * @category Soins
 * @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
 */
$service_id = CValue::get("service_id");
// Le service_id en get lors du fetch pour le plan de soins pose problème
unset($_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();
$date_tolerance = CAppUI::conf("dPurgences date_tolerance");
$date_before = CMbDT::date("-{$date_tolerance} DAY", $date);
$date_after = CMbDT::date("+1 DAY", $date);
$group = CGroups::loadCurrent();
$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["sejour.group_id"] = "= '{$group->_id}'";
开发者ID:fbone,项目名称:mediboard4,代码行数:30,代码来源:offline_sejours_lite.php

示例10: CSejour

CCanDo::checkRead();
// Filtres d'affichage
$selSortis = CValue::getOrSession("selSortis", "0");
$order_col = CValue::getOrSession("order_col", "patient_id");
$order_way = CValue::getOrSession("order_way", "ASC");
$date = CValue::getOrSession("date", CMbDT::date());
$type = CValue::getOrSession("type");
$service_id = CValue::getOrSession("service_id");
$prat_id = CValue::getOrSession("prat_id");
$period = CValue::getOrSession("period");
$filterFunction = CValue::getOrSession("filterFunction");
$date_actuelle = CMbDT::dateTime("00:00:00");
$date_demain = CMbDT::dateTime("00:00:00", "+ 1 day");
$hier = CMbDT::date("- 1 day", $date);
$demain = CMbDT::date("+ 1 day", $date);
$service_id = CService::getServicesIdsPref($service_id);
// Récupération de la liste des praticiens
$prat = CMediusers::get();
$prats = $prat->loadPraticiens();
$sejour = new CSejour();
$sejour->_type_admission = $type;
$sejour->praticien_id = $prat_id;
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("sejour", $sejour);
$smarty->assign("date_demain", $date_demain);
$smarty->assign("date_actuelle", $date_actuelle);
$smarty->assign("date", $date);
$smarty->assign("selSortis", $selSortis);
$smarty->assign("order_way", $order_way);
$smarty->assign("order_col", $order_col);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_idx_sortie.php

示例11: bind

 public function bind($mobile, $no, $name)
 {
     $members = CService::factory("Member")->queryMemberAnd($mobile, $no, $name);
     if (empty($members)) {
         $this->setError("can not find this member!");
         return array(-1, null);
     }
     $arr = array();
     foreach ($members as $key => $value) {
         $cards = D("Card")->getAllCards($value['id']);
         foreach ($cards as $card) {
             $info = array("card_id" => $card['card_number']);
             $club_id = "";
             $clubs = array();
             $contracts = D("Contract")->getAllContract($card['id']);
             foreach ($contracts as $contract) {
                 $clbs = D("CardUseclub")->getAllUseClub($contract['card_type_id']);
                 foreach ($clbs as $clb) {
                     $clubs[] = $clb['id'];
                 }
             }
             $clubs = array_unique($clubs);
             $club_id = implode(',', $clubs);
             $info['club_id'] = $club_id;
             $arr[] = $info;
         }
     }
     return array(0, $arr);
 }
开发者ID:peterleezz,项目名称:test,代码行数:29,代码来源:ApiService.class.php

示例12: foreach

         $key++;
     }
     // suppression des series vides
     foreach ($series as $_key => $_serie) {
         if ($_serie['subtotal'] == 0) {
             unset($series[$_key]);
         }
     }
     $series = array_values($series);
     break;
     // Nombre de mutations
 // Nombre de mutations
 case "mutations_count":
     $data[$axe] = array("options" => array("title" => utf8_encode("Nombre de mutations")), "series" => array());
     $series =& $data[$axe]['series'];
     $service = new CService();
     $service->group_id = CGroups::loadCurrent()->_id;
     $service->cancelled = 0;
     $services = $service->loadMatchingList("nom");
     $services["none"] = new CService();
     $services["none"]->_view = "Non renseigné";
     $where["sejour.mode_sortie"] = "= 'mutation'";
     $key = 0;
     foreach ($services as $_id => $_service) {
         $series[$key] = array('data' => array(), 'label' => utf8_encode($_service->_view));
         $sub_total = 0;
         foreach ($dates as $i => $_date) {
             $_date_next = CMbDT::date("+1 {$period}", $_date);
             $where['sejour.entree'] = "BETWEEN '{$_date}' AND '{$_date_next}'";
             $where['sejour.service_sortie_id'] = $_id === "none" ? "IS NULL" : "= '{$_id}'";
             $count = $sejour->countList($where, null, $ljoin);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_json_stats.php

示例13: CSejour

<?php

/**
 * $Id$
 *
 * @category Admissions
 * @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::checkRead();
// Chargement du séjour s'il y en a un
$sejour = new CSejour();
$sejour->load(CValue::get("sejour_id"));
$service_id = $sejour->service_sortie_id;
$service = new CService();
$service->load($service_id);
// Chargement des services
$order = "nom";
$services = $service->loadList(null, $order);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("service", $service);
$smarty->assign("services", $services);
$smarty->display("inc_vw_services.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:27,代码来源:ajax_vw_services.php

示例14: CService

<?php

/* $Id: do_delivery_aed.php 6067 2009-04-14 08:04:15Z phenxdesign $ */
/**
 * @package Mediboard
 * @subpackage soins
 * @version $Revision: 6067 $
 * @author SARL OpenXtrem
 * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html 
 */
$service_id = CValue::get('service_id');
$date_min = CValue::get('date_min');
$date_max = CValue::get('date_max');
$service = new CService();
$orders = array();
if ($service->load($service_id) && $date_min && $date_max) {
    $stocks = $service->loadBackRefs('product_stock_services');
    if ($stocks) {
        foreach ($stocks as $stock) {
            $stock->loadRefsFwd();
            $stock_group = CProductStockGroup::getFromCode($stock->_ref_product->code);
            $target_quantity = $stock->order_threshold_optimum ? $stock->order_threshold_optimum : $stock->order_threshold_max;
            if (CAppUI::conf('dPstock CProductStockService infinite_quantity') != 1) {
                $effective_quantity = $stock->quantity;
                $where = array('product_delivery.date_dispensation' => "BETWEEN '{$date_min} 00:00:00' AND '{$date_max} 23:59:59'", 'product_delivery.stock_id' => " = '{$stock_group->_id}'", 'product_delivery.stock_class' => " = '{$stock_group->_class}'", 'product.category_id' => " = '" . CAppUI::conf('dPmedicament CBcbProduitLivretTherapeutique product_category_id') . "'");
                $ljoin = array('product_stock_group' => 'product_delivery.stock_id = product_stock_group.stock_id', 'product' => 'product.product_id = product_stock_group.product_id');
                $delivery = new CProductDelivery();
                $deliveries = $delivery->loadList($where, null, null, null, $ljoin);
                foreach ($deliveries as $delivery) {
                    if ($delivery->order == 1 && $delivery->quantity > 0) {
                        $effective_quantity += $delivery->quantity;
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_auto_order.php

示例15: array

$services = array();
$services_type = array("Urgences" => CService::loadServicesUrgence(), "UHCD" => CService::loadServicesUHCD());
if (CAppUI::conf("dPurgences view_rpu_uhcd")) {
    // Affichage des services UHCD et d'urgence
    $services = CService::loadServicesUHCDRPU();
} elseif ($sejour->type == "comp" && $sejour->UHCD) {
    // UHCD pour un séjour "comp" et en UHCD
    $services = $services_type["UHCD"];
    unset($services_type["Urgences"]);
} else {
    // Urgences pour un séjour "urg"
    $services = $services_type["Urgences"];
    unset($services_type["UHCD"]);
}
if ($imagerie_etendue) {
    $service_imagerie = CService::loadServicesImagerie();
    $services_type["Imagerie"] = $service_imagerie;
    $services = array_merge($services, $services_type["Imagerie"]);
}
$module_orumip = CModule::getActive("orumip");
$orumip_active = $module_orumip && $module_orumip->mod_active;
$nb_printers = 0;
if (CModule::getActive("printing")) {
    // Chargement des imprimantes pour l'impression d'étiquettes
    $user_printers = CMediusers::get();
    $function = $user_printers->loadRefFunction();
    $nb_printers = $function->countBackRefs("printers");
}
$list_mode_entree = array();
if (CAppUI::conf("dPplanningOp CSejour use_custom_mode_entree")) {
    $mode_entree = new CModeEntreeSejour();
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:vw_aed_rpu.php


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