本文整理汇总了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));
}
}
示例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;
}