Data model for HL7 tables

Primary tabs

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

  • 0
  • 0
  • 185
  • 5
  • 1

Answers

Comments

Do you want to explore the content of the HL7 Messages using SQL? Or only meta Data like document type, date etc? In case you want more data from HL7 body using SQL I recommend to use a HL7 Search table

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