· Jul 5, 2019

Data model for HL7 tables

Hi all


Is there a data model for the Ensemble EnsLib_HL7 tables in the database? A client wants to run some SQL and would like some documentation about table relationships.


Thanks in advance



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


Probably won't want to look at the HL7 message data content. More likely the client will want to answer questions like:

How many ADT A01's went to system XYZ.


Provide a summary of message types and counts sent from system ABC

That type of thing. In order to do that, if there is some documentation that helps them navigate the data model, that would help them.

I have SQL for these types of queries, but the client wants to do it themselves and wants to be able to understand the data model.



Well, there are only 2 tables related with that queries:


EnsLib.HL7.Messages (

Any Ensemble Message has a header object or record (Ens.MessageHeader) the Message Body related with this Header can be any persistent object. Then you have to check MessageBodyClassName property to check if the body is a EnsLib.HL7.Message, then you can link the Header and Body using MessageBodyId property.

I hope this helps.


Yes, could be, however personally I don't like business metrics too much for this type of things. Because you are making the query every "N" seconds. If you want to show the SQL result in a DS dashboard, from my POV is more useful to make a simple KPI executing the SQL:

In this case the query is made only when the DS is show.