private bool ProcessHL7Message(string filePath, ref string sendData) { string fileContent = string.Empty; if (!ReadFileContent(filePath, ref fileContent)) { return(false); } Message notify = new Message(); //notify.Header.Type = MessageRegistry.HL7V2_NotificationMessageType; notify.Header.Type = MessageRegistry.GENERIC_NotificationMessageType; HYS.IM.Messaging.Registry.HL7MessageHelper.SetHL7V2PayLoad(notify, fileContent); _publisher.Context.Log.Write("Begin sending notification to subscriber."); bool ret = _publisher.NotifyMessagePublish(notify); _publisher.Context.Log.Write("End sending notification to subscriber. Result: " + ret.ToString()); if (ret) { sendData = HL7MessageParser.FormatResponseMessage(fileContent, _publisher.Context.ConfigMgr.Config.ReadHL7AckAATemplate()); } else { sendData = HL7MessageParser.FormatResponseMessage(fileContent, _publisher.Context.ConfigMgr.Config.ReadHL7AckAETemplate()); } _publisher.Context.Log.Write("End processing HL7v2 text message"); return(ret); }