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


PHP CSejour::getTagNDA方法代码示例

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


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

示例1: createDomain

 /**
  * Create domains
  *
  * @return bool
  */
 protected function createDomain()
 {
     $ds = $this->ds;
     $groups = $ds->loadList("SELECT * FROM groups_mediboard");
     $tab = array("CPatient", "CSejour");
     foreach ($groups as $_group) {
         $group_id = $_group["group_id"];
         $group_configs = $ds->loadHash("SELECT * FROM groups_config WHERE object_id = '{$group_id}'");
         foreach ($tab as $object_class) {
             if ($object_class == "CPatient") {
                 $tag_group = CPatient::getTagIPP($group_id);
                 if (!$group_configs || !array_key_exists("ipp_range_min", $group_configs)) {
                     continue;
                 }
                 $range_min = $group_configs["ipp_range_min"];
                 $range_max = $group_configs["ipp_range_max"];
             } else {
                 $tag_group = CSejour::getTagNDA($group_id);
                 if (!$group_configs || !array_key_exists("nda_range_min", $group_configs)) {
                     continue;
                 }
                 $range_min = $group_configs["nda_range_min"];
                 $range_max = $group_configs["nda_range_max"];
             }
             if (!$tag_group) {
                 continue;
             }
             // Insert domain
             $query = "INSERT INTO `domain` (`domain_id`, `incrementer_id`, `actor_id`, `actor_class`, `tag`)\n                      VALUES (NULL, NULL, NULL, NULL, '{$tag_group}');";
             $ds->query($query);
             $domain_id = $ds->insertId();
             // Insert group domain
             $query = "INSERT INTO `group_domain` (`group_domain_id`, `group_id`, `domain_id`, `object_class`, `master`)\n                      VALUES (NULL, '{$group_id}', '{$domain_id}', '{$object_class}', '1');";
             $ds->query($query);
             // Select incrementer for this group
             $select = "SELECT *\n                     FROM `incrementer`\n                     LEFT JOIN `domain` ON `incrementer`.`incrementer_id` = `domain`.`incrementer_id`\n                     LEFT JOIN `group_domain` ON `domain`.`domain_id` = `group_domain`.`domain_id`\n                     WHERE `incrementer`.`object_class` = '{$object_class}'\n                     AND `group_domain`.`group_id` = '{$group_id}';";
             $incrementer = $ds->loadHash($select);
             $incrementer_id = $incrementer["incrementer_id"];
             if ($incrementer_id) {
                 // Update domain with incrementer_id
                 $query = "UPDATE `domain`\n                      SET `incrementer_id` = '{$incrementer_id}'\n                      WHERE `domain_id` = '{$domain_id}';";
                 $ds->query($query);
                 // Update incrementer
                 if (!array_key_exists("nda_range_min", $group_configs) || !$range_max || $range_min === null) {
                     continue;
                 }
                 $query = "UPDATE `incrementer`\n                      SET `range_min` = '{$range_min}', `range_max` = '{$range_max}'\n                      WHERE `incrementer_id` = '{$incrementer_id}';";
                 $ds->query($query);
             }
         }
     }
     // Update constraints to stick to the event
     return true;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:59,代码来源:setup.php

示例2: onAfterStore

 /**
  * @see parent::onAfterStore()
  */
 function onAfterStore(CMbObject $mbObject)
 {
     if (!$this->isHandled($mbObject)) {
         return false;
     }
     if (!$mbObject->_id || !$this->create) {
         return false;
     }
     $group_id = $mbObject->_id;
     $object_class = array("CSejour", "CPatient");
     global $dPconfig;
     $original_value = $dPconfig["eai"]["use_domain"];
     $dPconfig["eai"]["use_domain"] = "0";
     foreach ($object_class as $_class) {
         switch ($_class) {
             case "CSejour":
                 $tag_group = CSejour::getTagNDA($group_id);
                 break;
             case "CPatient":
                 $tag_group = CPatient::getTagIPP($group_id);
                 break;
             default:
                 $tag_group = null;
         }
         if (!$tag_group) {
             continue;
         }
         $domain = new CDomain();
         $domain->tag = $tag_group;
         if ($domain->store()) {
             continue;
         }
         $group_domain = new CGroupDomain();
         $group_domain->group_id = $group_id;
         $group_domain->domain_id = $domain->_id;
         $group_domain->object_class = $_class;
         $group_domain->master = "1";
         $group_domain->store();
     }
     $dPconfig["eai"]["use_domain"] = "{$original_value}";
     return true;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:45,代码来源:CEAIGroupsHandler.class.php

示例3: array

$idex->object_id = $object_id;
$idex->loadMatchingObject();
$group_id = CGroups::loadCurrent()->_id;
$idexs = array();
$idex_id = null;
if ($idex->_id) {
    $filter = new CIdSante400();
    $filter->object_class = $idex->object_class;
    $filter->object_id = $idex->object_id;
    $filter->tag = CSejour::getTagNDA($group_id);
    $idexs = $filter->loadMatchingList();
    $filter->tag = CSejour::getTagNDA($group_id, "tag_dossier_trash");
    $idexs += $filter->loadMatchingList();
    $filter->tag = CSejour::getTagNDA($group_id, "tag_dossier_cancel");
    $idexs += $filter->loadMatchingList();
    $filter->tag = CSejour::getTagNDA($group_id, "tag_dossier_pa");
    $idexs += $filter->loadMatchingList();
    // Chargement de l'objet afin de récupérer l'id400 associé (le latest)
    $object = new $filter->object_class();
    $object->load($filter->object_id);
    $object->loadNDA($group_id);
    foreach ($idexs as $key => $_idex) {
        $_idex->loadRefs();
        $_idex->getSpecialType();
        if (!$idex_id && $_idex->id400 == $object->_NDA) {
            $idex_id = $_idex->_id;
        }
    }
    ksort($idexs);
}
$smarty = new CSmartyDP();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_show_id400.php

示例4: array

/**
 * Liaison des object Hprim21 aux objets métiers
 *
 * @category Hprim21
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License; see http://www.gnu.org/licenses/gpl.html
 * @version  SVN: $Id: httpreq_link_hprim_objects.php 21867 2014-02-03 08:18:27Z nicolasld $
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
CApp::setTimeLimit(240);
$date_limite = CMbDT::date("- 1 month");
$qte_limite = 1000;
$tag_ipp = CPatient::getTagIPP();
$tag_sejour = CSejour::getTagNDA();
// Gestion des médecins
$hprimMedecin = new CHprim21Medecin();
$where = array();
$where["user_id"] = "IS NULL";
/** @var CHprim21Medecin[] $listHprimMedecins */
$listHprimMedecins = $hprimMedecin->loadList($where);
$total = count($listHprimMedecins);
// Liaison à un médecin existant
$nouv = 0;
foreach ($listHprimMedecins as $_medecin) {
    $_medecin->loadRefExchange();
    $echg_hprim = $_medecin->_ref_echange_hprim21;
    $medecin = new CMediusers();
    $ljoin = array();
    $ljoin["users"] = "users.user_id = users_mediboard.user_id";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:httpreq_link_hprim_objects.php

示例5: updateFormFields

 /**
  * Update the form (derived) fields plain fields
  *
  * @return void
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_view = $this->libelle ? $this->libelle : $this->nom;
     $this->_type_echange = $this->_class;
     $this->_self_tag = $this->getTag($this->group_id);
     $this->_tag_patient = CPatient::getTagIPP($this->group_id);
     $this->_tag_sejour = CSejour::getTagNDA($this->group_id);
     $this->_tag_consultation = CConsultation::getObjectTag($this->group_id);
     $this->_tag_mediuser = CMediusers::getObjectTag($this->group_id);
     $this->_tag_service = CService::getObjectTag($this->group_id);
     $this->_tag_chambre = CChambre::getObjectTag($this->group_id);
     $this->_tag_lit = CLit::getObjectTag($this->group_id);
     $this->_tag_movement = CMovement::getObjectTag($this->group_id);
     $this->_tag_visit_number = CSmp::getObjectTag($this->group_id);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:21,代码来源:CInteropActor.class.php

示例6: CSmartyDP

 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 27868 $
 */
CCanDo::checkRead();
$view_current = CValue::get("view_current", 0);
CView::enforceSlave();
$smarty = new CSmartyDP();
// Pour l'établissement courant
if ($view_current) {
    $etab = CGroups::loadCurrent();
    $current_group = $etab->_id;
    $res_current_etab = array();
    $where = array();
    $ljoin = array();
    // - Nombre de séjours
    $tag_NDA = CSejour::getTagNDA($current_group);
    $where["tag"] = " = '{$tag_NDA}'";
    $where["object_class"] = " = 'CSejour'";
    $idex = new CIdSante400();
    $res_current_etab["CSejour-_NDA"] = $idex->countList($where);
    // - Patients IPP
    $tag_ipp = CPatient::getTagIPP($current_group);
    $where["tag"] = " = '{$tag_ipp}'";
    $where["object_class"] = " = 'CPatient'";
    $idex = new CIdSante400();
    $res_current_etab["CPatient-_IPP"] = $idex->countList($where);
    // - Nombre de consultations
    $where = array();
    $consultation = new CConsultation();
    $ljoin["plageconsult"] = "consultation.plageconsult_id = plageconsult.plageconsult_id";
    $ljoin["users_mediboard"] = "plageconsult.chir_id = users_mediboard.user_id";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:view_metrique.php

示例7: array_merge

$filter->object_id = $idex->object_id;
$filter->tag = CSejour::getTagNDA(CGroups::loadCurrent()->_id);
$idexs = $filter->loadMatchingList(CGroups::loadCurrent()->_id);
$filter->tag = CSejour::getTagNDA(CGroups::loadCurrent()->_id, "tag_dossier_cancel");
$idexs = array_merge($idexs, $filter->loadMatchingList());
$filter->tag = CSejour::getTagNDA(CGroups::loadCurrent()->_id, "tag_dossier_trash");
$idexs = array_merge($idexs, $filter->loadMatchingList());
$filter->tag = CSejour::getTagNDA(CGroups::loadCurrent()->_id, "tag_dossier_pa");
$idexs = array_merge($idexs, $filter->loadMatchingList());
$tag = CSejour::getTagNDA(CGroups::loadCurrent()->_id);
// Chargement de l'objet afin de récupérer l'id400 associé
$object = new $filter->object_class();
$object->load($filter->object_id);
$object->loadNDA(CGroups::loadCurrent()->_id);
foreach ($idexs as $_idex) {
    // L'identifiant 400 coché
    if ($_idex->_id == $idex_id) {
        $_idex->tag = CSejour::getTagNDA(CGroups::loadCurrent()->_id);
        if ($msg = $_idex->store()) {
            CAppUI::stepAjax($msg, UI_MSG_ERROR);
        }
        continue;
    }
    // L'ancien est à mettre en trash
    if ($_idex->id400 == $object->_NDA) {
        $_idex->tag = CAppUI::conf("dPplanningOp CSejour tag_dossier_trash") . $tag;
        if ($msg = $_idex->store()) {
            CAppUI::stepAjax($msg, UI_MSG_ERROR);
        }
    }
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_trash_id400.php

示例8: array

     $where["cp"] = $whereSoundex["cp"] = $whereLimited["cp"] = "LIKE '{$patient_cp}%'";
 }
 if ($prat_id) {
     $ljoin["consultation"] = "`consultation`.`patient_id` = `patients`.`patient_id`";
     $ljoin["plageconsult"] = "`plageconsult`.`plageconsult_id` = `consultation`.`plageconsult_id`";
     $ljoin["sejour"] = "`sejour`.`patient_id` = `patients`.`patient_id`";
     $where[] = $whereLimited[] = "plageconsult.chir_id = '{$prat_id}' OR sejour.praticien_id = '{$prat_id}'";
     $whereSoundex[] = "plageconsult.chir_id = '{$prat_id}' OR sejour.praticien_id = '{$prat_id}'";
     $group_by = "patient_id";
 }
 if ($patient_nda) {
     $ljoin["sejour"] = "`sejour`.`patient_id` = `patients`.`patient_id`";
     $ljoin["id_sante400"] = "`id_sante400`.`object_id` = `sejour`.`sejour_id`";
     $where[] = $whereLimited[] = "`id_sante400`.`object_class` = 'CSejour'";
     $where["id_sante400.id400"] = " = '{$patient_nda}'";
     $where["id_sante400.tag"] = " = '" . CSejour::getTagNDA() . "'";
 }
 /** @var CPatient[] $patients */
 $patients = array();
 /** @var CPatient[] $patientsSoundex */
 $patientsSoundex = array();
 /** @var CPatient[] $patientsLimited */
 $patientsLimited = array();
 $order = "nom, prenom, naissance";
 $pat = new CPatient();
 // Chargement des patients
 if ($where) {
     // Séparation des patients par fonction
     if (CAppUI::conf('dPpatients CPatient function_distinct') && !CMediusers::get()->isAdmin()) {
         $function_id = CMediusers::get()->function_id;
         $where["function_id"] = $whereLimited["function_id"] = $whereSoundex["function_id"] = "= '{$function_id}'";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_search_patient.php

示例9: onBeforeMerge

 /**
  * Trigger before event merge
  *
  * @param CMbObject $mbObject Object
  *
  * @throws CMbException
  *
  * @return bool
  */
 function onBeforeMerge(CMbObject $mbObject)
 {
     if (!parent::onBeforeMerge($mbObject)) {
         return false;
     }
     // Si pas en mode alternatif
     if (!CAppUI::conf("alternative_mode")) {
         throw new CMbException("no_alternative_mode");
     }
     $sejour = $mbObject;
     $sejour_elimine = new CSejour();
     $sejour_elimine->load(reset($mbObject->_merging));
     // Si Client
     if (!CAppUI::conf('smp server')) {
         $mbObject->_fusion = array();
         foreach (CGroups::loadGroups() as $_group) {
             $sender = CMbObject::loadFromGuid($mbObject->_eai_sender_guid);
             if ($sender && $sender->group_id == $_group->_id) {
                 continue;
             }
             $sejour->_NDA = null;
             $sejour->loadNDA($_group->_id);
             $sejour1_nda = $sejour->_NDA;
             $sejour_elimine->_NDA = null;
             $sejour_elimine->loadNDA($_group->_id);
             $sejour2_nda = $sejour_elimine->_NDA;
             // Passage en trash des NDA des séjours
             $tag_NDA = CSejour::getTagNDA($_group->_id);
             if (!$tag_NDA) {
                 continue;
             }
             $idexSejour = new CIdSante400();
             $idexSejour->tag = $tag_NDA;
             $idexSejour->object_class = "CSejour";
             $idexSejour->object_id = $sejour->_id;
             $idexsSejour = $idexSejour->loadMatchingList();
             $idexSejourElimine = new CIdSante400();
             $idexSejourElimine->tag = $tag_NDA;
             $idexSejourElimine->object_class = "CSejour";
             $idexSejourElimine->object_id = $sejour_elimine->_id;
             $idexsSejourElimine = $idexSejourElimine->loadMatchingList();
             /** @var CIdSante400[] $idexs */
             $idexs = array_merge($idexsSejour, $idexsSejourElimine);
             $idexs_changed = array();
             if (count($idexs) > 1) {
                 foreach ($idexs as $_idex) {
                     // On continue pour ne pas mettre en trash le NDA du séjour que l'on garde
                     if ($_idex->id400 == $sejour1_nda) {
                         continue;
                     }
                     $old_tag = $_idex->tag;
                     $_idex->tag = CAppUI::conf('dPplanningOp CSejour tag_dossier_trash') . $tag_NDA;
                     $_idex->last_update = CMbDT::dateTime();
                     if (!($msg = $_idex->store())) {
                         if ($_idex->object_id == $sejour_elimine->_id) {
                             $idexs_changed[$_idex->_id] = $old_tag;
                         }
                     }
                 }
             }
             if (!$sejour1_nda && !$sejour2_nda) {
                 continue;
             }
             $mbObject->_fusion[$_group->_id] = array("sejourElimine" => $sejour_elimine, "sejour1_nda" => $sejour1_nda, "sejour2_nda" => $sejour2_nda, "idexs_changed" => $idexs_changed);
         }
     }
     $this->sendFormatAction("onBeforeMerge", $mbObject);
     return true;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:78,代码来源:CSmpObjectHandler.class.php

示例10: CRequest

$request = new CRequest();
$request->addSelect("sejour.sejour_id");
$request->addTable("sejour");
$request->addLJoinClause("rpu", "rpu.sejour_id = sejour.sejour_id");
$request->addWhereClause("annule", "!='1'");
$request->addWhereClause("facture", "!='1'");
$request->addWhereClause("sortie_reelle", "BETWEEN '" . CMbDT::dateTime("-{$day}DAY") . "' AND '" . CMbDT::dateTime() . "'");
$request->addWhereClause("rpu.sejour_id", "IS NOT NULL");
$request->addGroup("sejour.sejour_id");
$request->addHaving("count(*) = 1");
$request->setLimit($limit);
$list_sejour = $ds->loadList($request->makeSelect());
foreach ($list_sejour as $_sejour_id) {
    $sejour = new CSejour();
    $sejour->load($_sejour_id["sejour_id"]);
    if (!($nda = $sejour->getTagNDA())) {
        continue;
    }
    $rpu = $sejour->loadRefRPU();
    if ($rpu->mutation_sejour_id) {
        $sejour_reliquat = $rpu->loadRefSejourMutation();
        if (!($nda = $sejour_reliquat->getTagNDA())) {
            continue;
        }
        $consultations = $sejour_reliquat->loadRefsConsultations();
        foreach ($consultations as $_consultation) {
            $_consultation->facture = "1";
            $_consultation->store();
        }
    }
    $sejour->facture = "1";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:facturer_codable.php


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