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


PHP CMediusers::loadObject方法代码示例

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


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

示例1: loadFromAdeli

 static function loadFromAdeli($adeli)
 {
     $cache = new Cache(__METHOD__, func_get_args(), Cache::INNER);
     if ($cache->exists()) {
         return $cache->get();
     }
     $mediuser = new CMediusers();
     $where = array();
     $where["users_mediboard.adeli"] = " = '{$adeli}'";
     $mediuser->loadObject($where);
     return $cache->put($mediuser, false);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:12,代码来源:CMediusers.class.php

示例2: foreach

// praticien(s) && secretaires
$profile_prat = CValue::post("profile_prat");
$profile_sec = CValue::post("profile_sec");
foreach ($_POST["user"] as $type => $_user_list) {
    foreach ($_user_list as $_user) {
        if (!$_user['lastname'] || !$_user['firstname']) {
            continue;
        }
        $mediuser = new CMediusers();
        $mediuser->_user_last_name = trim($_user['lastname']);
        $mediuser->_user_first_name = trim($_user['firstname']);
        $mediuser->makeUsernamePassword($mediuser->_user_first_name, $mediuser->_user_last_name);
        $where = array();
        $ljoin["users"] = "users_mediboard.user_id = users.user_id";
        $where['users.user_username'] = "= '" . $mediuser->_user_username . "'";
        $mediuser->loadObject($where, null, null, $ljoin);
        if ($mediuser->_id) {
            CAppUI::stepAjax("Cabinet_mediuser_prenom%s_nom%s_username%s_already_exist", UI_MSG_WARNING, $mediuser->_user_first_name, $mediuser->_user_last_name, $mediuser->_user_username);
            continue;
        }
        $mediuser->function_id = $cabinet->_id;
        //praticien
        if ($type == "prat") {
            $mediuser->_profile_id = $profile_prat;
            $mediuser->_user_type = 13;
        }
        //secretaire
        if ($type == "sec") {
            $mediuser->_profile_id = $profile_sec;
            $mediuser->_user_type = 10;
        }
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_configure_cabinet.php

示例3: array

$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";
    $where = array();
    $where["users_mediboard.adeli"] = " = '{$_medecin->external_id}'";
    $medecin->loadObject($where, null, null, $ljoin);
    if ($medecin->_id) {
        $_medecin->user_id = $medecin->_id;
        $_medecin->store();
        $nouv++;
    }
    $echg_hprim->object_class = "CMediusers";
    $echg_hprim->object_id = $medecin->_id;
    $echg_hprim->store();
}
CAppUI::stepAjax("Médecins utilisés : '{$total}'");
CAppUI::stepAjax("Médecins rapprochés : '{$nouv}'");
if ($total > 0) {
    CAppUI::stepAjax($nouv * 100 / $total . ", %% de rapprochement de médecins");
}
// Gestion des patients
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:httpreq_link_hprim_objects.php

示例4: getParticipant

 /**
  * Récupération des participants de l'intervention
  *
  * @param DOMNode $node   Node
  * @param CSejour $sejour Séjour
  *
  * @return string
  */
 function getParticipant(DOMNode $node, CSejour $sejour = null)
 {
     $xpath = new CHPrimXPath($node->ownerDocument);
     $adeli = $xpath->queryTextNode("hprim:participants/hprim:participant/hprim:medecin/hprim:numeroAdeli", $node);
     // Recherche du mediuser
     $mediuser = new CMediusers();
     if (!$adeli) {
         return $mediuser;
     }
     $where = array("users_mediboard.adeli" => $mediuser->_spec->ds->prepare("=%", $adeli), "functions_mediboard.group_id" => "= '{$sejour->group_id}'");
     $ljoin = array("functions_mediboard" => "functions_mediboard.function_id = users_mediboard.function_id");
     $mediuser->loadObject($where, null, null, $ljoin);
     return $mediuser;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CHPrimXMLEvenementsServeurActivitePmsi.class.php

示例5: getMedecin

 /**
  * Récupération du médecin
  *
  * @param DOMNode $node Node
  *
  * @return int
  */
 function getMedecin(DOMNode $node)
 {
     $xpath = new CHPrimXPath($node->ownerDocument);
     $code = $xpath->queryTextNode("hprim:identification/hprim:code", $node);
     $mediuser = new CMediusers();
     $tag = $this->_ref_echange_hprim->_ref_sender->_tag_mediuser;
     $idex = CIdSante400::getMatch("CMediusers", $tag, $code);
     if ($idex->_id) {
         return $idex->object_id;
     }
     $rpps = $xpath->queryTextNode("hprim:noRPPS", $node);
     if ($rpps) {
         $mediuser = new CMediusers();
         $where = array();
         $where["users_mediboard.rpps"] = " = '{$rpps}'";
         $mediuser->loadObject($where);
         return $mediuser->_id;
     }
     $adeli = $xpath->queryTextNode("hprim:numeroAdeli", $node);
     if ($adeli) {
         $mediuser = CMediusers::loadFromAdeli($adeli);
         return $mediuser->_id;
     }
     // Récupération du typePersonne
     // Obligatoire pour MB
     $personne = $xpath->queryUniqueNode("hprim:personne", $node, false);
     $mediuser = self::getPersonne($personne, $mediuser);
     $mediuser->_id = $this->createPraticien($mediuser);
     $idex->object_id = $mediuser->_id;
     $idex->last_update = CMbDT::dateTime();
     $idex->store();
     return $mediuser->_id;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:40,代码来源:CHPrimXMLEvenements.class.php

示例6: getDoctor

 /**
  * Return or create the doctor of the message
  *
  * @param DOMNode $node Node
  *
  * @return CMediusers|int|null
  */
 function getDoctor($node)
 {
     $xpath = new CHPrimSanteMessageXPath($node ? $node->ownerDocument : $this);
     $nodeDoctor = $xpath->query("P.13", $node);
     $code = null;
     $nom = null;
     $prenom = null;
     $type_code = null;
     foreach ($nodeDoctor as $_node_doctor) {
         $code = $xpath->queryTextNode("CNA.1", $_node_doctor);
         $nom = $xpath->queryTextNode("CNA.2/PN.1", $_node_doctor);
         $prenom = $xpath->queryTextNode("CNA.2/PN.2", $_node_doctor);
         $type_code = $xpath->queryTextNode("CNA.3", $_node_doctor);
         if ($code && $nom) {
             break;
         }
     }
     $mediuser = new CMediusers();
     $mediuser->_user_last_name = $nom;
     switch ($type_code) {
         case "R":
             $mediuser->rpps = $code;
             break;
         case "A":
             $mediuser->adeli = $code;
             break;
         default:
             if (strlen($code) == 9 && luhn($code)) {
                 $mediuser->adeli = $code;
             }
             if (strlen($code) == 11 && luhn($code)) {
                 $mediuser->rpps = $code;
             }
     }
     // Cas où l'on a aucune information sur le médecin
     if (!$mediuser->rpps && !$mediuser->adeli && !$mediuser->_id && !$mediuser->_user_last_name) {
         return null;
     }
     $sender = $this->_ref_sender;
     $ds = $mediuser->getDS();
     $ljoin = array();
     $ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
     $where = array();
     $where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
     if ($mediuser->rpps || $mediuser->adeli) {
         if ($mediuser->rpps) {
             $where[] = $ds->prepare("rpps = %", $mediuser->rpps);
         }
         if ($mediuser->adeli) {
             $where[] = $ds->prepare("adeli = %", $mediuser->adeli);
         }
         // Dans le cas où le praticien recherché par son ADELI ou RPPS est multiple
         if ($mediuser->countList($where, null, $ljoin) > 1) {
             $ljoin["users"] = "users_mediboard.user_id = users.user_id";
             $where[] = $ds->prepare("users.user_last_name = %", $nom);
         }
         $mediuser->loadObject($where, null, null, $ljoin);
         if ($mediuser->_id) {
             return $mediuser;
         }
     }
     $user = new CUser();
     $ljoin = array();
     $ljoin["users_mediboard"] = "users.user_id = users_mediboard.user_id";
     $ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
     $where = array();
     $where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
     $where[] = $ds->prepare("users.user_first_name = %", $prenom);
     $where[] = $ds->prepare("users.user_last_name = %", $nom);
     $order = "users.user_id ASC";
     if ($user->loadObject($where, $order, null, $ljoin)) {
         return $user->loadRefMediuser();
     }
     $mediuser->_user_first_name = $prenom;
     $mediuser->_user_last_name = $nom;
     return $this->createDoctor($mediuser);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:84,代码来源:CHPrimSanteMessageXML.class.php

示例7: CFunctions

 $function = new CFunctions();
 $function->group_id = CGroups::loadCurrent()->_id;
 $function->text = $results[$i]["function_name"];
 $function->loadMatchingObject();
 // Praticien
 $prat = new CMediusers();
 $lastname = $results[$i]["praticien_lastname"];
 $firstname = $results[$i]["praticien_firstname"];
 if ($lastname) {
     $ljoin = array();
     $ljoin["users"] = "users.user_id = users_mediboard.user_id";
     $where = array();
     $where["users.user_last_name"] = "= '{$lastname}'";
     $where["users.user_first_name"] = "= '{$firstname}'";
     //$where["users_mediboard.function_id"] = "= '$function->_id'";
     $prat->loadObject($where, null, null, $ljoin);
 }
 if (!$function->_id && !$prat->_id) {
     $results[$i]["errors"][] = "Fonction et utilisateur non trouvé";
     $unfound["praticien_lastname"][$lastname] = true;
 }
 // Protocole
 $protocole = new CProtocole();
 $protocole->_time_op = null;
 $protocole->for_sejour = $results[$i]["for_sejour"];
 if (isset($results[$i]["motif"]) && $results[$i]["motif"] != "") {
     $protocole->libelle = $results[$i]["motif"];
 }
 if (isset($results[$i]["libelle_sejour"]) && $results[$i]["libelle_sejour"] != "") {
     $protocole->libelle_sejour = $results[$i]["libelle_sejour"];
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:protocole_dhe_import_csv.php


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