/**
  * handle
  *
  * @param String $ack_hpr ack message
  *
  * @return DOMDocument
  */
 function handle($ack_hpr)
 {
     $this->message = new CHPrimSanteMessage();
     $this->message->parse($ack_hpr);
     $this->dom_message = $this->message->toXML();
     return $this->dom_message;
 }
 * $Id$
 *
 * @category Hprimsante
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$message_string = CValue::post("message");
if (!$message_string) {
    return;
}
$message_string = stripslashes($message_string);
CValue::setSession("message", $message_string);
try {
    $message = new CHPrimSanteMessage();
    $message->parse($message_string);
    $message->_errors_msg = !$message->isOK(CHL7v2Error::E_ERROR);
    $message->_warnings_msg = !$message->isOK(CHL7v2Error::E_WARNING);
    $message->_xml = CMbString::highlightCode("xml", $message->toXML()->saveXML());
} catch (CHL7v2Exception $e) {
    CAppUI::stepMessage(UI_MSG_ERROR, $e->getMessage() . " (" . $e->extraData . ")");
    return;
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("message", $message);
$smarty->assign("key", "input");
$smarty->display("inc_display_hprim_message.tpl");
 /**
  * handle
  *
  * @param String $msg_hpr message
  *
  * @return DOMDocument
  */
 function handle($msg_hpr)
 {
     $this->message = new CHPrimSanteMessage();
     $this->message->parse($msg_hpr);
     return $this->message->toXML(get_class($this), true, CApp::$encoding);
 }
 /**
  * parse message
  *
  * @param String        $string     message
  * @param bool          $parse_body parse the body
  * @param CInteropActor $actor      actor
  *
  * @return CHPrimSanteMessage
  */
 function parseMessage($string, $parse_body = true, $actor = null)
 {
     $hpr_message = new CHPrimSanteMessage();
     if (!$this->_id && $actor) {
         $this->sender_id = $actor->_id;
         $this->sender_class = $actor->_class;
     }
     $hpr_message->parse($string, $parse_body);
     return $hpr_message;
 }