ProxyHL7Message Object


The HL7 message interface

(c) 2007-2010 Hermetech International Ltd.

It's not within the scope of this document to explain what HL7 is, how HL7 messages are structured and how it is implemented.


When your ListenerProxy object sends your application an HL7MessageReceived event it will pass you a fully populated ProxyHL7Message object. This object will contain the entire HL7 message which was received by the UltraPort Listener from an HL7 client and forwarded to your application. Your task is to evaluate the message contents, process it and then return control back to the ListenerProxy object so that it can notify the UltraPort Listener that you successfully received the message.


General Properties

IsError, LastError, Tag, TagObject


HL7 Properties



HL7 Message Header Properties (MSH Segment)

HL7MSH_ControlID, HL7MSH_SendingApplication, HL7MSH_SendingFacility, HL7MSH_ReceivingApplication, HL7MSH_ReceivingFacility, HL7MSH_MessageDate, HL7MSH_MessageType, HL7MSH_MessageEvent, HL7MSH_HL7Version, HL7MSH_Security, HL7MSH_ProcessingID, HL7MSH_Field15, HL7MSH_Field16


Acknowledgement Properties

ThisAcknowledgement, SendThisAcknowledgement



ClearErrors, SaveThisMessage


Visual Basic Example

Private Sub MyListener_HL7MessageReceived(ByRef objHL7Message As UPLTK.Net2005.ProxyHL7Message) Handles MyListener.HL7MessageReceived


With objHL7Message

 Select Case .HL7MSH_MessageType

  Case "ADT", "SIU"

    Call ProcessPatientOrAppointment(.ThisHL7Message)

  Case "ORU"

    Call ProcessLabResult(.ThisHL7Message)

  Case Else

    'Do Nothing. We don't care about other message types

     Exit Sub

 End Select

End With

Catch ex As Exception

  'Throw the UltraPort Listener into a loop

  'See ThisAcknowledgement

  objHL7Message.ThisAcknowledgement = "Error"

End Try

End Sub