本文整理汇总了PHP中CMbObject::loadRefPatient方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbObject::loadRefPatient方法的具体用法?PHP CMbObject::loadRefPatient怎么用?PHP CMbObject::loadRefPatient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMbObject
的用法示例。
在下文中一共展示了CMbObject::loadRefPatient方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addReponses
/**
* Ajout des éléments Reponses
*
* @param string $statut Statut de l'acquittement
* @param array $codes Codes d'erreurs
* @param string $commentaires Commentaire
* @param CMbObject $mbObject Object
* @param array $data Datas
*
* @return void
*/
function addReponses($statut, $codes, $commentaires = null, $mbObject = null, $data = array())
{
$acquittementsServeurActivitePmsi = $this->documentElement;
$mbPatient = $mbSejour = null;
if ($mbObject instanceof CSejour) {
$mbPatient = $mbObject->loadRefPatient();
$mbSejour = $mbObject;
}
if ($mbObject instanceof COperation) {
$mbPatient = $mbObject->loadRefSejour()->loadRefPatient();
$mbSejour = $mbObject->_ref_sejour;
}
// Ajout des réponses
$reponses = $this->addElement($acquittementsServeurActivitePmsi, "reponses");
// Ajout du patient et de la venue
$patient = $this->addElement($reponses, "patient");
if (isset($mbPatient->_id)) {
$this->addPatient($patient, $mbPatient, false, true);
}
$venue = $this->addElement($reponses, "venue");
if (isset($mbSejour->_id)) {
$this->addVenue($venue, $mbSejour, false, true);
}
if (!is_array($codes)) {
if (!isset($mbPatient->_id)) {
$this->addPatientError($reponses, $data);
}
$this->addReponseGeneral($reponses, $statut, $codes, null, $mbObject, $commentaires, $data);
return;
}
// Génération des réponses en fonction du type de l'acquittement
switch (get_class($this)) {
case "CHPrimXMLAcquittementsServeurActes":
if (!$data && !CMbArray::get($data, "CCAM") && !CMbArray::get($data, "NGAP")) {
break;
}
$actesCCAM = $data["CCAM"];
$actesNGAP = $data["NGAP"];
foreach ($actesCCAM as $_acteCCAM) {
$code_ccam = $codes[$_acteCCAM["idSourceActeCCAM"]];
$this->addReponseCCAM($reponses, $_acteCCAM["statut"], $code_ccam["code"], $_acteCCAM, $mbObject, $code_ccam["commentaires"]);
}
foreach ($actesNGAP as $_acteNGAP) {
$code_ngap = $codes[$_acteNGAP["idSourceActeNGAP"]];
$this->addReponseNGAP($reponses, $_acteNGAP["statut"], $code_ngap["code"], $_acteNGAP, $mbObject, $code_ngap["commentaires"]);
}
break;
case "CHPrimXMLAcquittementsServeurIntervention":
$this->addReponseIntervention($reponses, $statut, $codes, null, $mbObject, $commentaires);
break;
}
}