HL7Response Class

Summary

HL7Response is used by a client connected to the TCPServer mainly to handle acknowledgment responses.

Syntax

C#
VB
C++
Public Class HL7Response  
   Inherits Leadtools.Medical.Hl7.V2x.Sender.MLPResponse 
public class HL7Response : MLPResponse 
public ref class HL7Response : public Leadtools.Medical.Hl7.V2x.Sender.MLPResponse  

Example

This example shows how to use HL7Response in an HL7 client.

This other example shows how to prepare a message for sending.

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 void HL7Client() 
{ 
   IPEndPoint EndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 6787); 
 
   using (TcpClient _client = new TcpClient()) 
   { 
      _client.Connect(EndPoint); 
 
      string msg = @"MSH|^~\&|MESA_ADT|XYZ_ADMITTING|MESA_IS|XYZ_HOSPITAL|||ADT^A04|101160|P|2.5|||||||| 
                        EVN||200004230800||||200004230800 
                        PID|||583220^^^ADT1||PANZA^SANCHO||16050601121520|M||AI||||||||20-98-3210|981276345||||||||||| 
                        NK1|1|QUIXOTE^DON|MASTER|16 WINDMILL WAY^^LA MANCHA^SPAIN^12587|(157)383-6446 
                        PV1||E||||||5101^NELL^FREDERICK^P^^DR|||||||||||V1102^^^ADT1|||||||||||||||||||||||||200004230800||||||||"; 
 
      using (HL7Response rsp = new HL7Response(_client)) 
      { 
         rsp.Send(msg); 
         Console.WriteLine("--- sent "); 
      } 
   } 
} 
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 Sub HL7Client() 
   Dim EndPoint As IPEndPoint = New IPEndPoint(IPAddress.Parse("127.0.0.1"), 6787) 
 
   Using _client As TcpClient = New TcpClient() 
      _client.Connect(EndPoint) 
 
      Dim msg As String = "MSH|^~\&|MESA_ADT|XYZ_ADMITTING|MESA_IS|XYZ_HOSPITAL|||ADT^A04|101160|P|2.5||||||||" & ControlChars.CrLf & "EVN||200004230800||||200004230800" & ControlChars.CrLf & "                            _ 
                  PID|||583220^^^ADT1||PANZA^SANCHO||16050601121520|M||AI||||||||20-98-3210|981276345|||||||||||" & ControlChars.CrLf & "                              NK1|1|QUIXOTE^DON|MASTER|16 WINDMILL WAY^^LA MANCHA^SPAIN^12587|(157)383-6446" _ 
            & ControlChars.CrLf & "PV1||E||||||5101^NELL^FREDERICK^P^^DR|||||||||||V1102^^^ADT1|||||||||||||||||||||||||200004230800||||||||" 
 
      Using rsp As HL7Response = New HL7Response(_client) 
         rsp.Send(msg) 
         Console.WriteLine("--- sent ") 
      End Using 
   End Using 
End Sub 

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