/** * Build ProvideAndRegisterDocumentSetRequest event * * @param CCompteRendu|CFile $object compte rendu * * @see parent::build() * * @throws CMbException * @return void */ function build($object) { parent::build($object); $uuid = $this->uuid; $factory = CCDAFactory::factory($object); $cda = $factory->generateCDA(); try { CCdaTools::validateCDA($cda); } catch (CMbException $e) { throw $e; } $xml = new CXDSXmlDocument(); $xds = CXDSFactory::factory($factory); $xds->type = $this->type; $xds->extractData(); $header_xds = $xds->generateXDS57($uuid, $this->action); $xml->importDOMDocument($xml, $header_xds); $this->message = $xml->saveXML(); $this->updateExchange(false); }