I am not aware about specific message for this but, I can see following workarounds:
Use MSH(2)
(Sending Application) and MSH(3)
(Sending Facility)
Data in these fields identify the sending application and facility. If this is configured different on each device, you can maintain a table in your database to map device against this data. This is only applicable if unique values for those fields are configured on each device.
Custom field in Z
segment
This is only applicable if you can convenience the owner of device to manipulate/customize the HL7 message. Implement custom Z
(ZDS
may be) segment and define some field (ZDS(1)
may be) with mutual communication and pass the device identifier in this field. You can then map this field in your database against device.
IP address on TCP level
If your communication is happening over TCP/IP, you may maintain a master table with device and IP address. Use this mapping to identify the device. You get IP address when the device connects to you.
These may not really be a solutions, just hacks - those also based on some pre-requisites.
Hope this helps you.