for example
select count(*), sourceconfigname from ens.messageheader where sourcebusinesstype=1 group by sourceconfigname
will give you a count of message by business service, and
select count(*), targetconfigname from ens.messageheader where targetbusinesstype=3 group by targetconfigname
will give you message counts being sent to business operations.
There is an index on TimeCreated if you want to use a time range, but for large message databases this can take several/many minutes to run when limited to a sinlge day. So you don't want to put it in a dashboard. It seems more appropriate to schedule a batch job to find the numbers from the previous day and email the results.
I will try and post an example for that later tonight if I get a chance
dave
David Loveluck
617 225 3122
Thoughts and ideas welcome.
Many Thanks
--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
The idea that a batch job running for a previous day, then being sent by email would be spot on.
for example
dave
Thoughts and ideas welcome.
Many Thanks
Mid Essex Hospital Services NHS Trust Caring for you, Caring about you.
Information in this message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies; please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it.
Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, confidentiality of this e-mail and your reply cannot be guaranteed. Thank you for your co-operation.
It includes a business service, a business operation and a production.
The business service includes some methods to run an SQL query, build a string of HTML and then invoke the business service ProcessInput method.
That sends the string of HTML to an operation that sends it as an email message.
From a command lime you could invoke it
set sc=##Class(ABC.Reports.SubmissionService).GenerateReport(10,1)
to start reporting from 10 days ago and end 1 day ago. You could schedule this in a batch job easily enough.
I have replaced various settings (such as the email addresses and servers) in the operation with xxxxx.
I did most of it in streams, but then used Ens.StringContainer because I was running out of time and couldn't remember the syntax for Ens.StreamContainer.
I only included one very simple SQL statement and I did the absolute minimum work on the presentation of the 'report' (I would like to get this into a ZEN Report), but it should be enough to get you going with any SQL you can think of.
I included my analysis methods in the business service, mainly to minimize the number of classes.
dave
Again Many Thanks