C#
VB
C++
Parses a MessageStructure and creates a Message object with the results. Returns this object.
Public Function MessageStructureToMessage( _
ByVal msgstruct As Leadtools.Medical.Hl7.V2x.Models.MessageStructure, _
ByVal op As Leadtools.Medical.Hl7.V2x.Models.MessageStructureConverter.Options _
) As Leadtools.Medical.Hl7.V2x.Models.MessageStructureConverter
public MessageStructureConverter MessageStructureToMessage(
MessageStructure msgstruct,
Options op
)
public:
Leadtools.Medical.Hl7.V2x.Models.MessageStructureConverter^ MessageStructureToMessage(
Leadtools.Medical.Hl7.V2x.Models.MessageStructure^ msgstruct,
Leadtools.Medical.Hl7.V2x.Models.MessageStructureConverter.Options^ op
)
msgstruct
The MessageStructure to parse.
op
Parsing Options for this MessageStructure.
Returns this object.
This example shows how to read a pipe message.
using Leadtools;
using LeadtoolsExamples.Common;
using Leadtools.Medical.HL7;
using Leadtools.Medical.HL7.V2x.Models;
using Leadtools.Medical.HL7.V2x.Listener;
using Leadtools.Medical.HL7.V2x.Sender;
using Leadtools.Medical.HL7.V26.Messages;
public static IHL7MessageItem ParsePipeMessage(string pipe)
{
PipeMessageConverter pmc = new PipeMessageConverter();
MessageStructure ms = pmc.PipeMessageToMessageStructure(pipe);
MessageStructureConverter msc = new MessageStructureConverter();
Exception exParse = null;
try
{
IHL7MessageItem msg = msc.MessageStructureToMessage(ms, new MessageStructureConverter.Options() { Parse_RepeatableParentGroupFirst = true, Forgive_IncompleteMessage = true }).Message;
return msg;
}
catch (Exception e)
{
exParse = e;
}
try
{
IHL7MessageItem msg = msc.MessageStructureToMessage(ms, new MessageStructureConverter.Options() { Parse_RepeatableParentGroupFirst = false, Forgive_IncompleteMessage = true }).Message;
return msg;
}
catch
{
throw exParse;
}
}
Imports Leadtools
Imports LeadtoolsDocumentsExamples.LeadtoolsExamples.Common
Imports Leadtools.Medical.HL7
Imports Leadtools.Medical.HL7.V2x.Models
Imports Leadtools.Medical.HL7.V2x.Listener
Imports Leadtools.Medical.HL7.V2x.Sender
Imports Leadtools.Medical.HL7.V26.Messages
Public Shared Function ParsePipeMessage(ByVal pipe As String) As IHL7MessageItem
Dim pmc As PipeMessageConverter = New PipeMessageConverter()
Dim ms As MessageStructure = pmc.PipeMessageToMessageStructure(pipe)
Dim msc As MessageStructureConverter = New MessageStructureConverter()
Dim exParse As Exception = Nothing
Try
Dim options As MessageStructureConverter.Options = New MessageStructureConverter.Options()
options.Parse_RepeatableParentGroupFirst = True
options.Forgive_IncompleteMessage = True
Dim msg As IHL7MessageItem = msc.MessageStructureToMessage(ms, options).Message
Return msg
Catch e As Exception
exParse = e
End Try
Try
Dim options As MessageStructureConverter.Options = New MessageStructureConverter.Options()
options.Parse_RepeatableParentGroupFirst = False
options.Forgive_IncompleteMessage = True
Dim msg As IHL7MessageItem = msc.MessageStructureToMessage(ms, options).Message
Return msg
Catch
Throw exParse
End Try
End Function
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET