Written by

Release Engineer at Amazing Charts | Harris CareTracker
Question Daniel Lee · Aug 1, 2023

How to search for messages based on size

I would like to search for all messages where their body size is greater than 3MB. 

I have searched through the common Header and body properties and I have not found a size property. I have looked at the extended properties but I am unsure if any of the extended classes allows me to find the Doc size. 

I have stepped through most of the body property classes related to messages or documents that have an exposed property that filters by document or message size. 

Is there a way to do this within the Message Viewer or Terminal? 

Thank you in advance. 

Dan 

Product version: Ensemble 2013.1

Comments

Enrico Parisi · Aug 1, 2023

What type of messages?

In general, a message is an instance of a persistent class, so "size" is a vague term.

Enrico

0
Andrew S. (Liberty IT Solutions) Bartholomew  Aug 1, 2023 to Enrico Parisi

Right. The size of a message depends on what particular message type you're looking at. You could try something like:

SELECT 
M.FullSize
FROM Ens.MessageHeader H
JOIN EnsLib_HL7.Message M
ON H.MessageBodyId=M.ID
Where H.MessageBodyClassName='EnsLib.HL7.Message'

but it depends on the implementation of the message type you're looking at. 

0
Cristiano Silva · Aug 2, 2023

If you are talking about HL7 messages, you can use the property FullSize in a SQL statement:

SELECTIDFROM EnsLib_HL7.Message WHERE FullSize > ?

Take care because this is a calulated proprety and doesn't have a index.

0
Jeffrey Drumm · Aug 2, 2023

As others have mentioned, Size can be something of a "squishy" terrm depending on a variety of factors.

There's no single property that will work for all message classes; you do need to know the class and make sure it has a "Size" (or in the case of  EnsLib.HL7.Message) "FullSize" property. And you can certainly add it as a search criteria in the Message Viewer:

0