public function postHl7MessageAction() { $message = $this->_getParam('message'); $hl7Message = new HL7Message(); $hl7Message->message = $message; $hl7Message->type = 'HL7'; $hl7Message->persist(); $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json'); $json->suppressExit = true; $json->direct(true); }
protected function _doProcess(Handler $handler, Audit $audit) { $ret = false; $handlerName = $handler->normalizedName; $datasourceName = $handler->dataIntegrationDatasource->normalizedName; $destinationName = $handler->dataIntegrationDestination->normalizedName; $actionName = $handler->dataIntegrationAction->normalizedName; $classConditionHandler = $handlerName . 'ConditionHandler'; if (!parent::isParentOf($classConditionHandler, 'DataIntegrationConditionHandlerAbstract')) { return false; } if (call_user_func_array(array($classConditionHandler, 'matchAudit'), array($audit))) { do { $classDatasource = $datasourceName . 'DataIntegrationDatasource'; if (!parent::isParentOf($classDatasource, 'DataIntegrationDatasourceAbstract')) { return false; } $data = call_user_func_array(array($classDatasource, 'sourceData'), array($audit)); switch ($handler->direction) { case 'INCOMING': $classAction = $actionName . 'DataIntegrationAction'; if (!parent::isParentOf($classAction, 'DataIntegrationActionAbstract')) { return false; } $ret = call_user_func_array(array($classAction, 'act'), array($audit, $data)); break; case 'OUTGOING': $classDestination = $destinationName . 'DataIntegrationDestination'; if (!parent::isParentOf($classDestination, 'DataIntegrationDestinationAbstract')) { return false; } $template = new DataIntegrationTemplate(); $template->dataIntegrationTemplateId = $handler->dataIntegrationTemplateId; $template->populate(); $data['msh'] = HL7Message::generateMSHData($audit); $template->template = TemplateXSLT::render($data, $template->template); // temporarily override the template $ret = call_user_func_array(array($classDestination, 'transmit'), array($audit, $template, $data)); // temporarily set to true, transmit() skeleton does not provide boolean return $ret = true; break; } } while (false); } return $ret; }