Question
· Jun 4

SQL Query - HL7 Message/HL7 ACK

Does anyone have a query that I could run to show a Vendor the time difference between when a message was sent out a BO, and when we received the HL7 ACK back that is associated with the message sent?

I am trying to prove to this vendor of the delay we are seeing getting the ACK back because of a Timeout

I know how to pull Ens.MessageHeader, and EnsLib.HL7.Message but not sure how to match up the Message with the HL7 Acknowledgement received.

Product version: IRIS 2024.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2024.1 (Build 267_2U) Tue Apr 30 2024 16:06:39 EDT [HealthConnect:7.2.0-1.r1]
Discussion (1)2
Log in or sign up to continue

I assume that your interoperability is using Application ACK, so the response ACK in traced (there is an Ens.MessageHeader and HL7 Message reponse with ACK).

select req.TargetConfigName as BusinessOperation,
DATEDIFF('ms',req.TimeCreated, res.TimeCreated) as ResponseTime
from %PARALLEL Ens.MessageHeader req, Ens.MessageHeader res
where req.SessionId=res.SessionId
and req.TargetConfigName = ?
and %internal(res.SourceBusinessType)=3
and %internal(req.TargetBusinessType)=3
and req.TimeCreated between ? and ?


First placeholder/parameter (?) is the BO name.

To narrow the scope (and runtime) you can use the second and third placeholder/parameter to limit the date/time range.

Note that the returned ResponseTime will include the time the request remains in queue (if any).

If you have many messages, %PARALLEL will help to speed up.