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


PHP CIdSante400::setObject方法代码示例

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


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

示例1: loadIdex

 /**
  * Charge l'idex de l'établissement
  *
  * @return string|null
  */
 function loadIdex()
 {
     $tag_group = $this->getTagGroup();
     if (!$this->_id || !$tag_group) {
         return null;
     }
     // Récupération du premier idex créé
     $order = "id400 ASC";
     // Recuperation de la valeur de l'id400
     $idex = new CIdSante400();
     $idex->setObject($this);
     $idex->tag = $tag_group;
     $idex->loadMatchingObject($order);
     return $idex->id400;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:20,代码来源:CGroups.class.php

示例2: storeActe

 /**
  * Store Acte
  *
  * @param String[] $data    Value
  * @param String   $type    CCAM or NGAP
  * @param CSejour  $sejour  Sejour
  * @param CPatient $patient Patient
  * @param String   $tag     Tag
  *
  * @return String|CActe;
  */
 function storeActe($data, $type, $sejour, $patient, $tag)
 {
     $code_acte = "code";
     if ($type == "CCAM") {
         $field_object = "codes_ccam";
         $code_acte = "code_acte";
     }
     $action = $data["action"];
     $idex = CIdSante400::getMatch("CActe{$type}", $tag, $data["idSourceActe{$type}"]);
     $executant_id = $data["executant_id"];
     if ($idex->_id) {
         $class = "CActe{$type}";
         /** @var CActeCCAM|CActeNGAP $acte */
         $acte = new $class();
         $acte->load($idex->object_id);
         $object = $acte->loadTargetObject();
         if ($action === "suppression") {
             if ($type == "CCAM") {
                 $code = $acte->{$code_acte};
                 $replace = explode("|", $object->{$field_object});
                 CMbArray::removeValue($code, $replace);
                 $object->{$field_object} = $replace ? implode("|", $replace) : "";
             }
             if ($msg = $this->deleteActe($acte, $object, $idex)) {
                 return $msg;
             }
             return $acte;
         }
         /** @var CActeCCAM|CActeNGAP $new_acte */
         $new_acte = $this->{"createActe{$type}"}($data["acte{$type}"], $object, $executant_id);
         $modification = $new_acte->{$code_acte} != $acte->{$code_acte};
         if ($modification) {
             if ($type == "CCAM") {
                 $new_code = preg_replace("#{$acte}->{$code_acte}#", $new_acte->{$code_acte}, $object->{$field_object}, 1);
                 $object->{$field_object} = $new_code;
             }
             if ($msg = $this->deleteActe($acte, $object, $idex)) {
                 return $msg;
             }
             $acte = new $class();
         }
         $acte->extendsWith($new_acte, true);
         if ($msg = $acte->store()) {
             return $msg;
         }
         if ($modification) {
             $idex->setObject($acte);
             if ($msg = $idex->store()) {
                 return $msg;
             }
         }
         return $acte;
     }
     if ($action !== "création") {
         return "{$action} impossible car l'acte n'a pas été trouvé";
     }
     $date = CMbDT::date($data["acte{$type}"]["date"]);
     $object = $this->getObject($date, $executant_id, $patient->_id);
     $object = $object ? $object : $sejour;
     /** @var CActe $acte */
     $acte = $this->{"createActe{$type}"}($data["acte{$type}"], $object, $executant_id);
     if ($type == "CCAM") {
         $object->{$field_object} .= $object->{$field_object} ? "|{$acte->{$code_acte}}" : $acte->{$code_acte};
     }
     if ($msg = $object->store()) {
         return $msg;
     }
     if ($msg = $acte->store()) {
         return $msg;
     }
     $idex = new CIdSante400();
     $idex->id400 = $data["idSourceActe{$type}"];
     $idex->tag = $tag;
     $idex->setObject($acte);
     if ($msg = $idex->store()) {
         return $msg;
     }
     return $acte;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:90,代码来源:CHPrimXMLEvenementsServeurActes.class.php

示例3: CGroups

<?php

/**
 * $Id$
 *  
 * @category CDA
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
$group_type = CValue::post("group_type");
$group_id = CValue::post("group_id");
$group = new CGroups();
$group->load($group_id);
$idex = new CIdSante400();
$idex->tag = "cda_association_code";
$idex->setObject($group);
$idex->loadMatchingObject();
$idex->last_update = CMbDT::dateTime();
$idex->id400 = $group_type;
if ($group_type && ($msg = $idex->store())) {
    CAppUI::setMsg($msg, UI_MSG_ERROR);
}
CAppUI::setMsg("Configuration effectué");
开发者ID:fbone,项目名称:mediboard4,代码行数:26,代码来源:do_cda_association_aed.php

示例4: merge

 /**
  * Merge an array of objects
  *
  * @param self[] $objects An array of CMbObject to merge
  * @param bool   $fast    Tell wether to use SQL (fast) or PHP (slow but checked and logged) algorithm
  *
  * @return string|null
  */
 function merge($objects, $fast = false)
 {
     $alternative_mode = $this->_id != null;
     // Modes and object count check
     if ($alternative_mode && count($objects) > 1) {
         return "mergeAlternativeTooManyObjects";
     }
     if (!$alternative_mode && count($objects) < 2) {
         return "mergeTooFewObjects";
     }
     // Trigger before event
     $this->notify("BeforeMerge");
     if (!$this->_id && ($msg = $this->store())) {
         $this->notify("MergeFailure");
         return $msg;
     }
     foreach ($objects as $object) {
         $this->_merging[$object->_id] = $object;
     }
     foreach ($objects as &$object) {
         $msg = $fast ? $this->fastTransferBackRefsFrom($object) : $this->transferBackRefsFrom($object);
         if ($msg) {
             $this->notify("MergeFailure");
             return $msg;
         }
         $object_id = $object->_id;
         $object->_mergeDeletion = true;
         if ($msg = $object->delete()) {
             return $msg;
         }
         // If external IDs are available, we save old objects' id as external IDs
         if (CModule::getInstalled("dPsante400")) {
             $idex = new CIdSante400();
             $idex->setObject($this);
             $idex->tag = "merged";
             $idex->id400 = $object_id;
             $idex->last_update = CMbDT::dateTime();
             $idex->store();
         }
     }
     // Trigger after event
     $this->notify("AfterMerge");
     return $this->store();
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:52,代码来源:CStoredObject.class.php

示例5: fclose

        $mediuser->insGroupPermission();
        $results[$i]["result"] = 0;
        $results[$i]["username"] = $mediuser->_user_username;
        $results[$i]["password"] = $mediuser->_user_password;
        $number_idex = $results[$i]["idex"];
        if (!$number_idex) {
            continue;
        }
        $idex = new CIdSante400();
        $idex->tag = CMediusers::getTagMediusers($group_id);
        $idex->id400 = $number_idex;
        if ($idex->loadMatchingObject()) {
            $unfound["idex"][$number_idex] = true;
            CAppUI::setMsg("Identifiant déjà existant", UI_MSG_WARNING);
            continue;
        }
        $idex->setObject($mediuser);
        $msg = $idex->store();
        if ($msg) {
            CAppUI::setMsg($msg, UI_MSG_ERROR);
        }
    }
    fclose($fp);
}
CAppUI::callbackAjax('$("systemMsg").insert', CAppUI::getMsg());
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("dryrun", $dryrun);
$smarty->assign("results", $results);
$smarty->assign("unfound", $unfound);
$smarty->display("user_import_csv.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:user_import_csv.php

示例6: storeIdExt

 /**
  * Store the external ID of the given object
  *
  * @param CMbObject $object The MB to store the external ID of
  * @param string    $db_id  The Import ID to store on the MB Object
  *
  * @return string The external ID store error message
  */
 function storeIdExt(CMbObject $object, $db_id)
 {
     $id_ext = new CIdSante400();
     $id_ext->setObject($object);
     $id_ext->tag = $this->getImportTag();
     $id_ext->id400 = $db_id;
     $id_ext->escapeValues();
     $id_ext->loadMatchingObject();
     $id_ext->last_update = CMbDT::dateTime();
     $id_ext->unescapeValues();
     return $id_ext->store();
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:20,代码来源:CExternalDBImport.class.php

示例7: storeIdex

 /**
  * store the idex
  *
  * @param CPatient|CSejour $object     patient or sejour
  * @param String[]         $identifier identifiers
  * @param String           $tag        tag
  *
  * @return null|String
  */
 function storeIdex($object, $identifier, $tag)
 {
     $idex = new CIdSante400();
     $idex->tag = "{$tag}";
     $idex->id400 = "{$identifier}";
     $idex->setObject($object);
     $idex->loadMatchingObject();
     if ($msg = $idex->store()) {
         return $msg;
     }
     return null;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:21,代码来源:CHPrimSanteRecordADM.class.php

示例8: store

 /**
  * @see parent::store()
  */
 function store()
 {
     $this->completeField("type");
     if ($this->type == "alle") {
         $this->loadRefDossierMedical();
         $dossier_medical = $this->_ref_dossier_medical;
         if ($dossier_medical->object_class == "CPatient") {
             DSHM::remKeys("alertes-*-CPatient-" . $dossier_medical->object_id);
         }
     }
     // Save owner and creation date
     if (!$this->_id) {
         if (!$this->creation_date) {
             $this->creation_date = CMbDT::dateTime();
         }
         if (!$this->owner_id) {
             $this->owner_id = CMediusers::get()->_id;
         }
     }
     // Standard store
     if ($msg = parent::store()) {
         return $msg;
     }
     // DossierMedical store
     $this->checkCodeCim10();
     // Sauvegarde de l'identifiant externe (code composant de la BDM pour le cas des allergies)
     if ($this->_idex_code && $this->_idex_tag) {
         $idex = new CIdSante400();
         $idex->setObject($this);
         $idex->id400 = $this->_idex_code;
         $idex->tag = $this->_idex_tag;
         $idex->store();
     }
     return null;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:38,代码来源:CAntecedent.class.php

示例9: handle

 /**
  * Handle receive order message
  *
  * @param CHL7v2ReceiveOrderMessageResponse $ack     Acknowledgment
  * @param CPatient                          $patient Person
  * @param array                             $data    Data
  *
  * @return string|void
  */
 function handle(CHL7v2ReceiveOrderMessageResponse $ack, CPatient $patient, $data)
 {
     $exchange_hl7v2 = $this->_ref_exchange_hl7v2;
     $sender = $exchange_hl7v2->_ref_sender;
     $sender->loadConfigValues();
     $this->_ref_sender = $sender;
     $patientPI = CValue::read($data['personIdentifiers'], "PI");
     if (!$patientPI) {
         return $exchange_hl7v2->setORRError($ack, "E007");
     }
     $IPP = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientPI);
     // Patient non retrouvé par son IPP
     if (!$IPP->_id) {
         return $exchange_hl7v2->setORRError($ack, "E105");
     }
     $patient->load($IPP->object_id);
     $venueAN = $this->getVenueAN($sender, $data);
     $NDA = CIdSante400::getMatch("CSejour", $sender->_tag_sejour, $venueAN);
     // Séjour non retrouvé par son NDA
     if (!$NDA->_id) {
         return $exchange_hl7v2->setORRError($ack, "E205");
     }
     $sejour = new CSejour();
     $sejour->load($NDA->object_id);
     // Common order - ORC
     $orc = $data["ORC"];
     $obr = $data["OBR"];
     $event_request = $this->getEventRequest($orc);
     $consultation = new CConsultation();
     $placer_id = $this->getPlacerNumber($orc);
     $filler_id = $this->getFillerNumber($orc);
     switch ($event_request) {
         // new order
         case "SN":
             $datetime = $this->getDate($orc);
             $orc12 = $this->getDoctorNode($orc, $data);
             $mediuser = new CMediusers();
             $medisuer_id = $this->getDoctor($orc12, $mediuser);
             if (!$medisuer_id) {
                 return $exchange_hl7v2->setORRError($ack, "E801");
             }
             $consultation->createByDatetime($datetime, $medisuer_id, $patient->_id);
             if (!$consultation->_id) {
                 return $exchange_hl7v2->setORRError($ack, "E802");
             }
             $idex = new CIdSante400();
             $idex->id400 = $filler_id;
             $idex->tag = $sender->_tag_consultation;
             $idex->setObject($consultation);
             $idex->store();
             break;
             //Modification
         //Modification
         case "SC":
             $consultation->load($placer_id);
             $status_code = $this->getStatusCode($orc);
             switch ($status_code) {
                 case "CM":
                     $status = CConsultation::TERMINE;
                     break;
                 case "OD":
                     $status = CConsultation::PLANIFIE;
                     break;
                 case "IP":
                     $status = CConsultation::EN_COURS;
                     break;
                 default:
                     return $exchange_hl7v2->setORRError($ack, "E803");
             }
             $consultation->chrono = $status;
             if ($msg = $consultation->store()) {
                 return $exchange_hl7v2->setORRError($ack, "E804", $msg);
             }
             $obr4 = $this->getExamen("OBR.4", $obr, $data);
             //Identifiant de l'élément de prescription
             $examen_id = $this->getExamenID($obr4);
             $examen_name = $this->getExamenName($obr4);
             //todo gérer avec l'élément de prescription
             break;
             // cancel order request
         // cancel order request
         case "OC":
             $consultation->annule = "1";
             if ($msg = $consultation->store()) {
                 return $exchange_hl7v2->setORRError($ack, "E804", $msg);
             }
             $idex = CIdSante400::getMatchFor($consultation, $sender->_tag_consultation);
             $idex->id400 = "trash_{$idex->id400}";
             if ($msg = $idex->store()) {
                 return $exchange_hl7v2->setORRError($ack, "E805", $msg);
             }
//.........这里部分代码省略.........
开发者ID:fbone,项目名称:mediboard4,代码行数:101,代码来源:CHL7v2ReceiveOrderMessage.class.php


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