Question
· 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

 

Ian

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

David

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.

or

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.

Regards

Ian

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

Ens.MessageHeader(https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EMONITOR_concepts#EMONITOR_concepts_msgs)

EnsLib.HL7.Messages (https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EHL72_tools#EHL72_tools_classes)

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.

Ens.MessageHeader

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:

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

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