Example #1
0
 static function sendRetrieveValueSet($OID, $version = null, $language = null)
 {
     $receiver_hl7v3 = new CReceiverHL7v3();
     $receiver_hl7v3->actif = 1;
     $receiver_hl7v3->group_id = CGroups::loadCurrent()->_id;
     /** @var CReceiverHL7v3[] $receivers */
     $receivers = $receiver_hl7v3->loadMatchingList();
     $event_name = "CHL7v3EventSVSRetrieveValueSet";
     /** @var CHL7v3Event $event */
     $event = new $event_name();
     $event->_event_name = "ValueSetRepository_RetrieveValueSet";
     $data = array("OID" => trim($OID), "version" => trim($version), "language" => trim($language));
     $object = new CMbObject();
     $object->_data = $data;
     $headers = CHL7v3Adressing::createWSAddressing("urn:ihe:iti:2008:RetrieveValueSet", "http://valuesetrepository/");
     $value_set = null;
     foreach ($receivers as $_receiver) {
         if (!$_receiver->isMessageSupported($event_name)) {
             continue;
         }
         $value_set = $_receiver->sendEvent($event, $object, $headers, true)->getQueryAck();
     }
     return $value_set;
 }
 /**
  * Send the event ProvideAndRegisterDocumentSetRequest
  *
  * @param CDocumentItem $document_item Document
  *
  * @throws Exception
  * @return mixed
  */
 function sendEventProvideAndRegisterDocumentSetRequest(CDocumentItem $document_item)
 {
     $iti41 = new CHL7v3EventXDSbProvideAndRegisterDocumentSetRequest();
     $iti41->type = $this->libelle;
     $iti41->_event_name = "ProvideAndRegisterDocumentSetRequest";
     $headers = CHL7v3Adressing::createWSAddressing("urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b", "http://ihexds.nist.gov/tf6/services/xdsrepositoryb");
     try {
         $this->sendEvent($iti41, $document_item, $headers, true);
     } catch (CMbException $e) {
         $e->stepAjax(UI_MSG_WARNING);
     }
 }