Question
· Aug 7, 2017

Get a count on number of HL7 Interface messages on various Business Services and Operations.

What would be the best way to count all Interface messages on some Business Services and Operations in Ensemble? 

I need this to determine the volume of messages for a given week or month, would this be easier to do in SQL?

Discussion (6)2
Log in or sign up to continue

The accepted answer would probably be your best shot.

Say for example you wanted a count of all messages that have come from a service called "TEST Inbound", you could use the SQL query option (System Explorer>SQL) to run the following:

SELECT count(*)
FROM Ens.MessageHeader WHERE SourceConfigName = 'TEST Inbound'

If you wanted to put a date range in as well (which is advisable if what you're searching is a high throughput system and your retention is large):

SELECT count(*) Total
FROM Ens.MessageHeader where SourceConfigName = 'TEST Inbound' AND TimeCreated >= '2018-04-30 00:00:00' AND TimeCreated <= '2018-04-30 23:59:59'

If you need to monitor your productions, try checking out the Ensemble Activity Monitor:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

 

It will give you the information you need with minimum performance impact since the data will be stored on a cube and your queries won't affect your runtime system. You can see the counts on the last hour, week, month and year with trending graphs. You will also get the same for queuing and wait time. It's great stuff!