Storing Message Data in Its Own Database
In order to develop a production, you will need to use or create an interoperability-enabled namespace. While you can rely on a single database for your production, it is often desirable to define a separate database to store the data associated with messages. This data has the potential to increase the database size rapidly during times with higher than usual traffic or if a purge process is not scheduled to run. This practice insulates the database associated with your production’s code from the database with your message data. This page describes the process, including the recommended globals that should be mapped.
General Process
To store message data in a separate database, do the following:
-
Identify the globals that contain the message data and indices.
The rest of this page lists globals in which specific products store message data by default, but custom applications do not necessarily follow these patterns. In order to determine where a specific message class stores data, use an IDE to look at the storage definition of that class. Within the storage definition, make a note of the globals referenced by the <DataLocation>, <IndexLocation>, and <StreamLocation> elements.
-
Within your interoperability namespace, map those globals to the new database.
For globals that feature an incrementing ID as the top-level subscript, you should perform a subscript-level mapping. Choose a higher subscript than the current highest subscript of the global. This will allow the global to roll over to the new database when it increments to the designated subscript. For details on subscript-level mapping, see Global Mapping and Subscript-Level Mapping.
-
If the production was already in use, and there is stored data from before you defined this mapping, you must move that data into the new database so that it is visible.
Tip:For globals that do not have an incrementing ID as the top-level subscript, including globals that store indexes for a class and globals subscripted by $JOB, you can perform a DataMove to map the subscripts to the newly created database.
Globals Containing Message Data
The following table contains the recommended globals which should be mapped to a separate messages database. Select the tab for the product you are using. Additionally, if you have any custom message classes that contain message data, you should consider mapping these to the same message database.
| ^Ens.MessageHeaderD |
| ^Ens.MessageHeaderI† |
| ^Ens.MessageBodyD |
| ^Ens.MessageBodyI† |
| ^Ens.MessageBodyS |
| ^EnsHL7.Segment |
| ^EnsLib.H.MessageD |
| ^Ens.Util.LogD |
| ^Ens.Util.LogI† |
| ^Ens.MessageHeaderD |
| ^Ens.MessageHeaderI† |
| ^Ens.MessageBodyD |
| ^Ens.MessageBodyI† |
| ^Ens.MessageBodyS |
| ^EnsHL7.Segment |
| ^EnsLib.H.MessageD |
| ^Ens.Util.LogD |
| ^Ens.Util.LogI† |
| ^Ens.MessageHeaderD |
| ^Ens.MessageHeaderI† |
| ^Ens.MessageBodyD |
| ^Ens.MessageBodyI† |
| ^Ens.MessageBodyS |
| ^EnsHL7.Segment |
| ^EnsLib.H.MessageD |
| ^Ens.Util.LogD |
| ^Ens.Util.LogI† |
| ^HS.Message.XMLMessageD |
| ^HS.Message.XMLMessageS |
| ^Ens.MessageHeaderD |
| ^Ens.MessageHeaderI† |
| ^Ens.MessageBodyD |
| ^Ens.MessageBodyI† |
| ^Ens.MessageBodyS |
| ^EnsHL7.Segment |
| ^EnsLib.H.MessageD |
| ^Ens.Util.LogD |
| ^Ens.Util.LogI† |
| ^HS.Message.XMLMessageD |
| ^HS.Message.XMLMessageS |
| ^HS.IHE.Comm8F7E.MIMEAttachmentD |
| ^HS.IHE.Comm8F7E.MIMEAttachmentS |
| ^HS.IHE.Comm8F7E.MIMEAttachmentI† |
†Globals that store indexes for classes cannot be mapped using subscript-level mapping on existing systems. For details, see General Process.
Globals That Should Not Be Mapped
The following globals should NOT be mapped to the messages database and need to remain in the default database for the interoperability-enabled namespace. They are essential for interoperability to function properly:
-
^Ens.Runtime
-
^Ens.Queue
-
^Ens.JobLock
-
^Ens.JobStatus
-
^Ens.ActiveMessage
-
^Ens.JobRequest
-
^Ens.Suspended
-
^Ens.SuspendedAppData
-
^Ens.Alarm
-
^Ens.AppData
-
^Ens.Rule.Notification