←Select platform

FillCommonMSH Method

Summary

Fills the MSH Segment with default values.

Syntax

C#
VB
C++
Public Shared Sub FillCommonMSH( _ 
   ByVal item As Leadtools.Medical.Hl7.V2x.Models.IHL7MessageItem, _ 
   ByVal version As String _ 
)  
public static void FillCommonMSH( 
   IHL7MessageItem item, 
   string version 
) 
public: 
static void FillCommonMSH(  
   Leadtools.Medical.Hl7.V2x.Models.IHL7MessageItem^ item, 
   String^ version 
)  

Parameters

item
The IHL7MessageItem node.

version
The HL7 version, for example V26, V231, V251.

Example

This example shows how to create a certain HL7 message.

C#
VB
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 MessageFromStruct(string name, string version) 
{ 
   IHL7MessageItem Message = MessageFactory.New(name, version); 
 
   MessageConstructor.CreateSegments(Message); 
   MessageConstructor.FillCommonMSH(Message, version); 
 
   return Message; 
} 
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 MessageFromStruct(ByVal name As String, ByVal version As String) As IHL7MessageItem 
   Dim Message As IHL7MessageItem = MessageFactory.[New](name, version) 
 
   MessageConstructor.CreateSegments(Message) 
   MessageConstructor.FillCommonMSH(Message, version) 
 
   Return Message 
End Function 

Requirements

Target Platforms

Help Version 19.0.2017.10.30
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Medical.HL7 Assembly