本文整理汇总了PHP中CConsultation::loadMatchingObject方法的典型用法代码示例。如果您正苦于以下问题:PHP CConsultation::loadMatchingObject方法的具体用法?PHP CConsultation::loadMatchingObject怎么用?PHP CConsultation::loadMatchingObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConsultation
的用法示例。
在下文中一共展示了CConsultation::loadMatchingObject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: importObject
/**
* @see parent::importObject()
*/
function importObject(DOMElement $element)
{
$id = $element->getAttribute("id");
if (isset($this->imported[$id])) {
return;
}
$this->name_suffix = " (import du " . CMbDT::dateTime() . ")";
$_class = $element->getAttribute("class");
$imported_object = null;
$idex = self::lookupObject($id);
if ($idex->_id) {
$this->imported[$id] = true;
$this->map[$id] = $idex->loadTargetObject()->_guid;
return;
}
switch ($_class) {
// COperation = Intervention: Données incorrectes, Le code CCAM 'QZEA024 + R + J' n'est pas valide
case "CPatient":
/** @var CPatient $_patient */
$_patient = $this->getObjectFromElement($element);
if ($_patient->naissance == "0000-00-00") {
$_patient->naissance = "1850-01-01";
}
$_patient->loadMatchingPatient();
$is_new = !$_patient->_id;
$_patient->_merging = true;
// TODO a supprimer
if ($msg = $_patient->store()) {
CAppUI::stepAjax($msg, UI_MSG_WARNING);
break;
}
if ($is_new) {
CAppUI::stepAjax("Patient '%s' créé", UI_MSG_OK, $_patient->_view);
} else {
CAppUI::stepAjax("Patient '%s' retrouvé", UI_MSG_OK, $_patient->_view);
}
$imported_object = $_patient;
break;
case "CDossierMedical":
/** @var CDossierMedical $_object */
$_object = $this->getObjectFromElement($element);
$_dossier = new CDossierMedical();
$_dossier->object_id = $_object->object_id;
$_dossier->object_class = $_object->object_class;
$_dossier->loadMatchingObject();
if (!$_dossier->_id) {
if ($msg = $_object->store()) {
CAppUI::stepAjax($msg, UI_MSG_WARNING);
break;
}
CAppUI::stepAjax(CAppUI::tr($_object->_class) . " '%s' créé", UI_MSG_OK, $_object);
$imported_object = $_object;
} else {
$imported_object = $_dossier;
}
break;
case "CAntecedent":
/** @var CAntecedent $_new_atcd */
$_new_atcd = $this->getObjectFromElement($element);
// On cherche un ATCD similaire
$_empty_atcd = new CAntecedent();
$_empty_atcd->dossier_medical_id = $_new_atcd->dossier_medical_id;
$_empty_atcd->type = $_new_atcd->type ?: null;
$_empty_atcd->appareil = $_new_atcd->appareil ?: null;
$_empty_atcd->annule = $_new_atcd->annule ?: null;
$_empty_atcd->date = $_new_atcd->date ?: null;
$_empty_atcd->rques = $_new_atcd->rques ?: null;
$_empty_atcd->loadMatchingObject();
if (!$_empty_atcd->_id) {
$_new_atcd->_forwardRefMerging = true;
// To accept any ATCD type
if ($msg = $_new_atcd->store()) {
CAppUI::stepAjax($msg, UI_MSG_WARNING);
break;
}
CAppUI::stepAjax("Antécédent '%s' créé", UI_MSG_OK, $_new_atcd->_view);
}
$imported_object = $_new_atcd;
break;
case "CPlageOp":
case "CPlageconsult":
/** @var CPlageOp|CPlageconsult $_plage */
$_plage = $this->getObjectFromElement($element);
$_plage->hasCollisions();
if (count($_plage->_colliding_plages)) {
$_plage = reset($_plage->_colliding_plages);
CAppUI::stepAjax("%s '%s' retrouvée", UI_MSG_OK, CAppUI::tr($_plage->_class), $_plage->_view);
} else {
if ($msg = $_plage->store()) {
CAppUI::stepAjax($msg, UI_MSG_WARNING);
break;
}
CAppUI::stepAjax("%s '%s' créée", UI_MSG_OK, CAppUI::tr($_plage->_class), $_plage->_view);
}
$imported_object = $_plage;
break;
case "CFile":
//.........这里部分代码省略.........
示例2: loadRefObsEntree
/**
* Charge l'observation d'entrée du séjour
*
* @return CConsultation
*/
function loadRefObsEntree()
{
$consult = new CConsultation();
if ($this->_id) {
$consult->sejour_id = $this->_id;
$consult->type = "entree";
$consult->annule = 0;
$consult->loadMatchingObject();
}
return $this->_ref_obs_entree = $consult;
}