當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CMbObject::completeField方法代碼示例

本文整理匯總了PHP中CMbObject::completeField方法的典型用法代碼示例。如果您正苦於以下問題:PHP CMbObject::completeField方法的具體用法?PHP CMbObject::completeField怎麽用?PHP CMbObject::completeField使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CMbObject的用法示例。


在下文中一共展示了CMbObject::completeField方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getXCN

 /**
  * Get XCN : extended composite ID number and name for persons
  *
  * @param CMbObject        $object     Object
  * @param CInteropReceiver $actor      Actor
  * @param bool             $repeatable Repeatable field
  *
  * @return array
  */
 function getXCN(CMbObject $object, CInteropReceiver $actor, $repeatable = false)
 {
     $xcn1 = $xcn2 = $xcn3 = $xcn9 = $xcn13 = null;
     $idex = new CIdSante400();
     if ($object instanceof CMedecin) {
         $object->completeField("adeli", "rpps");
         $idex = $object->loadLastId400();
         $xcn1 = CValue::first($object->adeli, $object->rpps, $idex->id400, $object->_id);
         $xcn2 = $object->nom;
         $xcn3 = $object->prenom;
         $xcn9 = $this->getXCN9($object, $idex, $actor);
         $xcn13 = $object->adeli ? "ADELI" : ($object->rpps ? "RPPS" : "RI");
     }
     if ($object instanceof CUser) {
         $xcn1 = $object->_id;
         $xcn2 = $object->user_last_name;
         $xcn3 = $object->user_first_name;
         $xcn9 = $this->getXCN9($object);
         $xcn13 = "RI";
     }
     if ($object instanceof CMediusers) {
         $object->completeField("adeli", "rpps");
         $idex = CIdSante400::getMatch("CMediusers", $actor->_tag_mediuser, null, $object->_id);
         $xcn1 = CValue::first($object->adeli, $object->rpps, $idex->id400, $object->_id);
         $xcn2 = $object->_user_last_name;
         $xcn3 = $object->_user_first_name;
         $xcn9 = $this->getXCN9($object, $idex, $actor);
         $xcn13 = $object->adeli ? "ADELI" : ($object->rpps ? "RPPS" : "RI");
     }
     if ($repeatable && $actor->_configs["build_PV1_7"] == "repeatable" && $object instanceof CMediusers) {
         $xcn = array(null, $xcn2, $xcn3, null, null, null, null, null, $xcn9, "L", null, null, null);
         $xncs = array();
         // Ajout du RPPS
         if ($object->rpps) {
             $xcn[0] = $object->rpps;
             $xcn[8] = $this->getAssigningAuthority("RPPS");
             $xcn[12] = "RPPS";
             $xncs[] = $xcn;
         }
         // Ajout de l'ADELI
         if ($object->adeli) {
             $xcn[0] = $object->adeli;
             $xcn[8] = $this->getAssigningAuthority("ADELI");
             $xcn[12] = "ADELI";
             $xncs[] = $xcn;
         }
         // Ajout de l'Idex
         if ($idex->id400) {
             $xcn[0] = $idex->id400;
             $xcn[8] = $this->getAssigningAuthority("actor", null, $actor);
             $xcn[12] = "RI";
             $xncs[] = $xcn;
         }
         // Est-ce que l'on transmet notre identifiant de praticien
         if ($actor->_configs["send_own_identifier"]) {
             // Ajout de l'ID Mediboard
             $xcn[0] = $object->_id;
             $xcn[8] = $this->getAssigningAuthority("mediboard");
             $xcn[12] = "RI";
             $xncs[] = $xcn;
         }
         return $xncs;
     } else {
         return array(array($xcn1, $xcn2, $xcn3, null, null, null, null, null, $xcn9, "L", null, null, $xcn13, null, null, null, null, null, null, null, null, null, null));
     }
 }
開發者ID:OpenXtrem,項目名稱:mediboard_save,代碼行數:75,代碼來源:CHL7v2Segment.class.php

示例2: loadRefGroup

 /**
  * Load Group from CMbObject
  *
  * @param CMbObject $object CMbObject
  *
  * @return CGroups
  */
 function loadRefGroup($object)
 {
     switch ($object->_class) {
         case 'CCompteRendu':
             /** @var CCompteRendu $object */
             $object->completeField("author_id");
             $object->loadRefAuthor();
             $group = $object->_ref_author->loadRefFunction()->loadRefGroup();
             break;
         case 'CConsultAnesth':
         case 'COperation':
             /** @var CConsultAnesth $object */
             $object->loadRefChir();
             $group = $object->_ref_chir->loadRefFunction()->loadRefGroup();
             break;
         case 'CConsultation':
         case 'CPrescriptionLineMedicament':
         case 'CPrescriptionLineMix':
         case 'CPrescriptionLineElement':
             $object->loadRefPraticien();
             $group = $object->_ref_praticien->loadRefFunction()->loadRefGroup();
             break;
         case 'CObservationMedicale':
         case 'CTransmissionMedicale':
             $object->completeField("user_id");
             $object->loadRefUser();
             $group = $object->_ref_user->loadRefFunction()->loadRefGroup();
             break;
         case 'CFile':
             /** @var CFile $object */
             $object->completeField("author_id");
             $object->loadRefAuthor();
             $group = $object->_ref_author->loadRefFunction()->loadRefGroup();
             break;
         default:
             if ($object->_class instanceof CExObject) {
                 $group = $object->loadRefGroup();
             } else {
                 return new CGroups();
             }
     }
     return $group;
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:50,代碼來源:CSearchObjectHandler.class.php


注:本文中的CMbObject::completeField方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。