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


PHP CGroups类代码示例

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


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

示例1: _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

示例2: store

 /**
  * @see parent::store()
  */
 function store()
 {
     if (!$this->_id) {
         $this->group_id = CGroups::loadCurrent()->_id;
     }
     return parent::store();
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:10,代码来源:CExClassCategory.class.php

示例3: loadRefGroup

 function loadRefGroup()
 {
     if (!$this->_ref_group) {
         $this->_ref_group = new CGroups();
         $this->_ref_group->load($this->group_id);
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:7,代码来源:CChapitreDoc.class.php

示例4: generateEnteteMessageAcquittement

 /**
  * @see parent::generateEnteteMessageAcquittement()
  */
 function generateEnteteMessageAcquittement($statut, $codes = null, $commentaires = null)
 {
     $echg_hprim = $this->_ref_echange_hprim;
     $identifiant = $echg_hprim->_id ? str_pad($echg_hprim->_id, 6, '0', STR_PAD_LEFT) : "ES{$this->now}";
     $acquittementsServeurActivitePmsi = $this->addElement($this, $this->acquittement, null, "http://www.hprim.org/hprimXML");
     $this->addAttribute($acquittementsServeurActivitePmsi, "version", CAppUI::conf("hprimxml {$this->evenement} version"));
     $enteteMessageAcquittement = $this->addElement($acquittementsServeurActivitePmsi, "enteteMessage");
     $this->addAttribute($enteteMessageAcquittement, "statut", $statut);
     $this->addElement($enteteMessageAcquittement, "identifiantMessage", $identifiant);
     $this->addDateTimeElement($enteteMessageAcquittement, "dateHeureProduction");
     $emetteur = $this->addElement($enteteMessageAcquittement, "emetteur");
     $agents = $this->addElement($emetteur, "agents");
     $this->addAgent($agents, "application", "MediBoard", "Gestion des Etablissements de Santé");
     $group = CGroups::loadCurrent();
     $group->loadLastId400();
     $this->addAgent($agents, $this->getAttSysteme(), CAppUI::conf('mb_id'), $group->text);
     $echg_hprim->loadRefsInteropActor();
     // Pour un acquittement l'emetteur du message devient destinataire
     $destinataire = $this->addElement($enteteMessageAcquittement, "destinataire");
     $agents = $this->addElement($destinataire, "agents");
     $this->addAgent($agents, "application", $echg_hprim->_ref_sender->nom, $echg_hprim->_ref_sender->libelle);
     /* @todo Doit-on gérer le système du destinataire ? */
     //$this->addAgent($agents, "système", $group->_id, $group->text);
     $this->addElement($enteteMessageAcquittement, "identifiantMessageAcquitte", $this->_identifiant_acquitte);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:28,代码来源:CHPrimXMLAcquittementsServeurActivitePmsi.class.php

示例5: loadRefAddress

 /**
  * Load postal address object
  *
  * @return CGroups|CFunctions|CBlocOperatoire
  */
 function loadRefAddress()
 {
     $this->_ref_address = $this->loadFwdRef("address_id", true);
     if ($this->address_class == "CFunctions" || $this->address_class == "CBlocOperatoire") {
         $this->_ref_address->loadRefGroup();
     }
     return $this->_ref_address;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:13,代码来源:CProductOrder.class.php

示例6: getTagVisitNumber

 /**
  * Construit le tag d'une venue en fonction des variables de configuration
  *
  * @param string $group_id Permet de charger l'id externe d'une venue pour un établissement donné si non null
  *
  * @return string
  */
 static function getTagVisitNumber($group_id = null)
 {
     // Pas de tag venue
     if (null == ($tag_visit_number = CAppUI::conf("smp tag_visit_number"))) {
         return;
     }
     // Permettre des id externes en fonction de l'établissement
     $group = CGroups::loadCurrent();
     if (!$group_id) {
         $group_id = $group->_id;
     }
     return str_replace('$g', $group_id, $tag_visit_number);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:20,代码来源:CSmp.class.php

示例7: doStore

 function doStore()
 {
     parent::doStore();
     $dialog = CValue::post("dialog");
     if ($dialog) {
         $this->redirectStore .= "&a=pat_selector&dialog=1&name=" . $this->_obj->nom . "&firstName=" . $this->_obj->prenom . "&useVitale=" . $this->_obj->_bind_vitale;
         if (CAppUI::conf("dPpatients CPatient auto_selected_patient", CGroups::loadCurrent())) {
             $this->redirectStore .= "&patient_id=" . $this->_obj->patient_id;
         }
     } else {
         $this->redirectStore .= "&m=dPpatients&tab=vw_idx_patients&id=" . $this->_obj->patient_id;
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:13,代码来源:do_patients_aed.php

示例8: loadSejourNonAffectes

function loadSejourNonAffectes($where)
{
    global $listChirs, $listPats, $listFunctions;
    $group = CGroups::loadCurrent();
    $leftjoin = array("affectation" => "sejour.sejour_id = affectation.sejour_id");
    $where["sejour.group_id"] = "= '{$group->_id}'";
    $where[] = "affectation.affectation_id IS NULL";
    $sejourNonAffectes = new CSejour();
    $sejourNonAffectes = $sejourNonAffectes->loadList($where, null, null, null, $leftjoin);
    foreach ($sejourNonAffectes as $keySejour => $valSejour) {
        $sejour =& $sejourNonAffectes[$keySejour];
    }
    return $sejourNonAffectes;
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:14,代码来源:vw_etat_semaine.php

示例9: getObjectTag

 /**
  * Get object tag
  *
  * @param string $group_id Group
  *
  * @return string|null
  */
 static function getObjectTag($group_id = null)
 {
     // Recherche de l'établissement
     $group = CGroups::get($group_id);
     if (!$group_id) {
         $group_id = $group->_id;
     }
     $cache = new Cache(__METHOD__, array($group_id), Cache::INNER);
     if ($cache->exists()) {
         return $cache->get();
     }
     $tag = self::getDynamicTag();
     return $cache->put(str_replace('$g', $group_id, $tag));
 }
开发者ID:OpenXtrem,项目名称:mediboard_save,代码行数:21,代码来源:CHL7.class.php

示例10: countForDates

 /**
  * count list of Op not linked to a plage
  *
  * @param date      $start    date de début
  * @param date|null $end      date de fin
  * @param array     $chir_ids chir targeted
  *
  * @return int number of HP found
  */
 static function countForDates($start, $end = null, $chir_ids = array())
 {
     $d_start = $start;
     $d_end = $end ? $end : $start;
     $op = new COperation();
     $ljoin = array();
     $ljoin["sejour"] = "sejour.sejour_id = operations.sejour_id";
     $where = array();
     if (count($chir_ids)) {
         $where["chir_id"] = CSQLDataSource::prepareIn($chir_ids);
     }
     $where["operations.plageop_id"] = "IS NULL";
     $where["operations.date"] = "BETWEEN '{$d_start}' AND '{$d_end}'";
     $where["operations.annulee"] = "= '0'";
     $where["sejour.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
     /** @var COperation[] $listHorsPlage */
     return $op->countList($where, null, $ljoin);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:27,代码来源:CIntervHorsPlage.class.php

示例11: send

 /**
  * @see parent::send()
  */
 function send(CCompteRendu $docItem)
 {
     $object = $docItem->loadTargetObject();
     if ($object instanceof CConsultAnesth) {
         $object = $object->loadRefConsultation();
     }
     if ($object instanceof CPatient) {
         CAppUI::stepAjax("Impossible d'ajouter un document lié directement à un patient", UI_MSG_ERROR);
     }
     $receiver_hl7v3 = new CReceiverHL7v3();
     $receiver_hl7v3->actif = 1;
     $receiver_hl7v3->group_id = CGroups::loadCurrent()->_id;
     /** @var CReceiverHL7v3[] $receivers */
     $receivers = $receiver_hl7v3->loadMatchingList();
     foreach ($receivers as $_receiver) {
         $request = $_receiver->sendEventProvideAndRegisterDocumentSetRequest($docItem);
         mbTrace($request);
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CDocumentSourceSender.class.php

示例12: getImportFunction

 /**
  * Get import function
  *
  * @return CFunctions
  */
 function getImportFunction()
 {
     static $function;
     if ($function) {
         return $function;
     }
     $function_name = CAppUI::conf($this->_import_function_name_conf);
     $function = new CFunctions();
     $function->text = $function_name;
     $function->loadMatchingObjectEsc();
     if (!$function->_id) {
         $function->group_id = CGroups::loadCurrent()->_id;
         $function->type = "cabinet";
         $function->compta_partagee = 0;
         $function->color = "#CCCCCC";
         if ($msg = $function->store()) {
             CAppUI::setMsg($msg, UI_MSG_WARNING);
         }
     }
     return $function;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:26,代码来源:CExternalDBImport.class.php

示例13: generateEnteteMessageAcquittement

 /**
  * @see parent::generateEnteteMessageAcquittement
  */
 function generateEnteteMessageAcquittement($statut, $codes = null, $commentaires = null)
 {
     $commentaires = strip_tags($commentaires);
     $echg_hprim = $this->_ref_echange_hprim;
     $identifiant = isset($echg_hprim->_id) ? str_pad($echg_hprim->_id, 6, '0', STR_PAD_LEFT) : "ES{$this->now}";
     $acquittementsPatients = $this->addElement($this, "acquittementsPatients", null, "http://www.hprim.org/hprimXML");
     $enteteMessageAcquittement = $this->addElement($acquittementsPatients, "enteteMessageAcquittement");
     $this->addAttribute($enteteMessageAcquittement, "statut", $statut);
     $this->addElement($enteteMessageAcquittement, "identifiantMessage", $identifiant);
     $this->addDateTimeElement($enteteMessageAcquittement, "dateHeureProduction");
     $emetteur = $this->addElement($enteteMessageAcquittement, "emetteur");
     $agents = $this->addElement($emetteur, "agents");
     $this->addAgent($agents, "application", "MediBoard", "Gestion des Etablissements de Santé");
     $group = CGroups::loadCurrent();
     $group->loadLastId400();
     $this->addAgent($agents, $this->getAttSysteme(), CAppUI::conf('mb_id'), $group->text);
     if (!$echg_hprim->_ref_sender) {
         $echg_hprim->loadRefsInteropActor();
     }
     // Pour un acquittement l'emetteur du message devient destinataire
     $destinataire = $this->addElement($enteteMessageAcquittement, "destinataire");
     $agents = $this->addElement($destinataire, "agents");
     $this->addAgent($agents, "application", $echg_hprim->_ref_sender->nom, $echg_hprim->_ref_sender->libelle);
     /* @todo Doit-on gérer le système du destinataire ? */
     //$this->addAgent($agents, "système", $group->_id, $group->text);
     $this->addElement($enteteMessageAcquittement, "identifiantMessageAcquitte", $this->_identifiant_acquitte);
     if ($statut == "OK") {
         if (is_array($codes)) {
             $_codes = $_libelle_codes = "";
             foreach ($codes as $code) {
                 $_codes .= $code;
                 $_libelle_codes .= CAppUI::tr("hprimxml-error-{$code}");
             }
             $this->addObservation($enteteMessageAcquittement, $_codes, $_libelle_codes, $commentaires);
         } else {
             $this->addObservation($enteteMessageAcquittement, $codes, CAppUI::tr("hprimxml-error-{$codes}"), $commentaires);
         }
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:42,代码来源:CHPrimXMLAcquittementsPatients.class.php

示例14: onAfterStore

 /**
  * Trigger after event store
  *
  * @param CMbObject $mbObject Object
  *
  * @return void
  */
 function onAfterStore(CMbObject $mbObject)
 {
     if (!$this->isHandled($mbObject)) {
         return;
     }
     $receiver = $mbObject->_receiver;
     if (CGroups::loadCurrent()->_id != $receiver->group_id) {
         return;
     }
     if (!$receiver->isMessageSupported("CHPrimXMLEvenementsServeurIntervention")) {
         return;
     }
     /** @var COperation $operation */
     $operation = $mbObject;
     $sejour = $operation->_ref_sejour;
     $sejour->loadNDA($receiver->group_id);
     $patient = $sejour->loadRefPatient();
     $patient->loadIPP($receiver->group_id);
     // Chargement des actes du codable
     $operation->loadRefsActes();
     $this->sendEvenementPMSI("CHPrimXMLEvenementsServeurIntervention", $operation);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:29,代码来源:CSaEventHprimXMLObjectHandler.class.php

示例15: CPlageOp

 * $Id: inc_edit_planning.php 22873 2014-04-22 07:51:07Z mytto $
 *
 * @package    Mediboard
 * @subpackage dPbloc
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 22873 $
 */
$plageop_id = CValue::getOrSession("plageop_id");
$date = CValue::getOrSession("date", CMbDT::date());
$bloc_id = CValue::get("bloc_id");
// Informations sur la plage demandée
$plagesel = new CPlageOp();
$plagesel->load($plageop_id);
$plagesel->loadRefSalle();
$listBlocs = CGroups::loadCurrent()->loadBlocs(PERM_READ, null, "nom");
//curent bloc if $bloc_id
$bloc = new CBlocOperatoire();
$bloc->load($bloc_id);
$listSalles = $bloc->loadRefsSalles();
$arrKeySalle = array_keys($listSalles);
// cleanup listBlocs
foreach ($listBlocs as $key => $curr_bloc) {
    $salles = $curr_bloc->loadRefsSalles();
    foreach ($salles as $id => $_salle) {
        if (count($arrKeySalle) && !in_array($id, $arrKeySalle)) {
            unset($salles[$id]);
            continue;
        }
    }
    if (!count($salles)) {
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:inc_edit_planning.php


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