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


PHP CMbObject::loadMatchingObjectEsc方法代码示例

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


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

示例1: getDoctor

 /**
  * Return the Object with the information of the medecin in the message
  *
  * @param DOMNode   $node   Node
  * @param CMbObject $object object
  *
  * @return int|null|string
  */
 function getDoctor(DOMNode $node, CMbObject $object)
 {
     $type_id = $this->queryTextNode("XCN.13", $node);
     $id = $this->queryTextNode("XCN.1", $node);
     $last_name = $this->queryTextNode("XCN.2/FN.1", $node);
     $first_name = $this->queryTextNode("XCN.3", $node);
     switch ($type_id) {
         case "RPPS":
             $object->rpps = $id;
             break;
         case "ADELI":
             $object->adeli = $id;
             break;
         case "RI":
             // Notre propre RI
             if ($this->queryTextNode("XCN.9/HD.2", $node) == CAppUI::conf("hl7 assigning_authority_universal_id")) {
                 return $id;
             }
         default:
             // Recherche du praticien par son idex
             $idex = CIdSante400::getMatch($object->_class, $this->_ref_sender->_tag_mediuser, $id);
             if ($idex->_id) {
                 return $idex->object_id;
             }
             if ($object instanceof CMediusers) {
                 $object->_user_first_name = $first_name;
                 $object->_user_last_name = $last_name;
             }
             if ($object instanceof CMedecin) {
                 $object->prenom = $first_name;
                 $object->nom = $last_name;
             }
             break;
     }
     // Cas où l'on a aucune information sur le médecin
     if (!$object->rpps && !$object->adeli && !$object->_id && ($object instanceof CMediusers && !$object->_user_last_name || $object instanceof CMedecin && !$object->nom)) {
         return null;
     }
     if ($object instanceof CMedecin && $object->loadMatchingObjectEsc()) {
         return $object->_id;
     }
     $sender = $this->_ref_sender;
     $ds = $object->getDS();
     if ($object instanceof CMediusers) {
         $ljoin = array();
         $ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
         $where = array();
         $where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
         if ($object->rpps || $object->adeli) {
             if ($object->rpps) {
                 $where[] = $ds->prepare("rpps = %", $object->rpps);
             }
             if ($object->adeli) {
                 $where[] = $ds->prepare("adeli = %", $object->adeli);
             }
             // Dans le cas où le praticien recherché par son ADELI ou RPPS est multiple
             if ($object->countList($where, null, $ljoin) > 1) {
                 $ljoin["users"] = "users_mediboard.user_id = users.user_id";
                 $where[] = $ds->prepare("users.user_last_name = %", $last_name);
             }
             $object->loadObject($where, null, null, $ljoin);
             if ($object->_id) {
                 return $object->_id;
             }
         }
         $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 = %", $first_name);
         $where[] = $ds->prepare("users.user_last_name = %", $last_name);
         $order = "users.user_id ASC";
         if ($user->loadObject($where, $order, null, $ljoin)) {
             return $user->_id;
         }
         $object->_user_first_name = $first_name;
         $object->_user_last_name = $last_name;
         return $this->createDoctor($object);
     }
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:90,代码来源:CHL7v2MessageXML.class.php


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