MessageStructure Class

Summary

MessageStructure represents an HL7 pipe message in text form.

Syntax
C#
C++/CLI
[SerializableAttribute()] 
public class MessageStructure 
public: 
   [SerializableAttribute] 
   ref class MessageStructure 
Example

This example shows how to use MessageStructure to read a pipe message.

C#
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; 
   } 
} 
Requirements

Target Platforms

Help Version 22.0.2023.2.4
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Medical.HL7 Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.