示例#1
0
 /**
  * Build event
  *
  * @param CMbObject $object Object
  *
  * @see parent::build()
  *
  * @return void
  */
 function build($object)
 {
     // Traitement sur le mbObject
     $this->object = $object;
     $this->last_log = $object->loadLastLog();
     // Génération de l'échange
     $this->generateExchange();
     // Dans le cas où l'on charge un message XML HL7v3 standard
     if (!$this->dom) {
         $this->dom = new CHL7v3MessageXML("utf-8", $this->version);
     }
 }
 /**
  * Build HPR message
  *
  * @param CMbObject $object Object to use
  *
  * @return void
  */
 function build($object)
 {
     // Traitement sur le mbObject
     $this->object = $object;
     $this->last_log = $object->loadLastLog();
     $this->version = "H" . $this->_receiver->_configs["{$this->type}_version"];
     $this->type_liaison = $this->_receiver->_configs["{$this->type}_sous_type"];
     // Génération de l'échange
     $this->generateExchange();
     // Création du message HL7
     $message = new CHPrimSanteMessage($this->version);
     $message->name = $this->msg_codes;
     $this->message = $message;
     $this->addH();
 }
 /**
  * Build event
  *
  * @param CMbObject $object Object
  *
  * @see parent::build()
  *
  * @return void
  */
 function build($object)
 {
     // Traitement sur le mbObject
     $this->object = $object;
     $this->last_log = $object->loadLastLog();
     // Récupération de la version HL7 en fonction du receiver et de la transaction
     $this->version = $this->_receiver->_configs[$this->transaction . "_HL7_version"];
     // Génération de l'échange
     $this->generateExchange();
     $terminator = $this->getSegmentTerminator($this->_receiver->_configs["ER7_segment_terminator"]);
     // Création du message HL7
     $message = new CHL7v2Message($this->version);
     $message->segmentTerminator = $terminator;
     $message->name = $this->msg_codes;
     $this->message = $message;
 }
 function getCode(CMbObject $scheduling)
 {
     $current_log = $scheduling->loadLastLog();
     if (!in_array($current_log->type, array("create", "store"))) {
         return null;
     }
     $receiver = $scheduling->_receiver;
     $configs = $receiver->_configs;
     $scheduling->loadOldObject();
     // Création d'un rendez-vous
     if ($current_log->type == "create") {
         return "S12";
     }
     // Déplacement d'un rendez-vous (heure ou plageconsult_id)
     if ($scheduling->fieldModified("heure") || $scheduling->fieldModified("plageconsult_id")) {
         return "S13";
     }
     // Modification d'un rendez-vous
     if ($scheduling->fieldModified("annule", "1")) {
         return "S15";
     }
     // Annulation d'un rendez-vous
     return "S14";
 }