SanteDB support for HL7v2 messaging is implemented via
Hl7MessageHandlerdaemon service in the
SanteDB.Message.HL7.dllassembly. When enabled, the HL7v2 interface will process inbound messages by matching their trigger event and message type to a registered
When an inbound message is received via any registered transport, the following process is initiated:
- 1.The incoming message socket is consumed, if the message is received via SLLP then the client certificate is amended to the message receive event.
- 2.The message is converted to HL7v2.5 which is the canonical version of HL7 used within SanteDB for all handlers.
MSH-9field is read and an applicable
IHl7MessageHandlerinstance is located based on the trigger event.
- 4.The message handler authenticates the sender by:
- 1.Using the client certificate information provided by the sending system,
- 2.Using the
MSH-4fields and the
MSH-8security value to authenticate the sending application/device,
- 3.Optionally the
SFT-2value is used to authenticate application
- 5.The message handler iterates over the segments and segment groups and calls
IHl7SegmentHAndlerinstances to parse the message
- 6.The message handler performs the necessary actions based on the incoming message
- 7.The message handler returns a
Bundleinstance which the processor (again) calls
IHl7SegmentHandlerinstances to parse the RIM based objects back into HL7v2
- 8.The server appends the necessary sending information and message metadata,
- 9.The response is sent via the same channel it was received