HL7v2
SanteDB support for HL7v2 messaging is implemented via Hl7MessageHandler
daemon service in the SanteDB.Message.HL7.dll
assembly. When enabled, the HL7v2 interface will process inbound messages by matching their trigger event and message type to a registered IHL7MessageHandler
instance.
Processing of HL7 Messages
When an inbound message is received via any registered transport, the following process is initiated:
The incoming message socket is consumed, if the message is received via SLLP then the client certificate is amended to the message receive event.
The message is converted to HL7v2.5 which is the canonical version of HL7 used within SanteDB for all handlers.
The
MSH-9
field is read and an applicableIHl7MessageHandler
instance is located based on the trigger event.The message handler authenticates the sender by:
Using the client certificate information provided by the sending system,
Using the
MSH-3
andMSH-4
fields and theMSH-8
security value to authenticate the sending application/device,Optionally the
SFT-2
value is used to authenticate application
The message handler iterates over the segments and segment groups and calls
IHl7SegmentHAndler
instances to parse the messageThe message handler performs the necessary actions based on the incoming message
The message handler returns a
Bundle
instance which the processor (again) callsIHl7SegmentHandler
instances to parse the RIM based objects back into HL7v2The server appends the necessary sending information and message metadata,
The response is sent via the same channel it was received
Related Topics
Enabling HL7v2 InterfacesHL7 AuthenticationSanteDB HL7v2 ImplementationLast updated