Written by

Enterprise Application Development Consultant at The Ohio State University Wexner Medical Center
MOD
Question Scott Roth · 2 hr ago

Tracking down what is instantiating (creating) an HL7 message

While reviewing our Orphan messages, we noticed that there are some Orphans that look like they are the start of an HL7 message.

MSH|^~\&

Since this does not link to any Message Header, and most of the information in EnsLib_HL7.Message is NULL, is there a way to track down what Object maybe creating these so we can nip it in the bud.

Only way that I know of is to go through each of our Schema's and make both the MSH and Encoding Characters optional.

Product version: IRIS 2022.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2022.1.4 (Build 812_0_22913U) Thu Dec 7 2023 1

Comments

DC AI Bot · 2 hr ago Bot

To track down what is creating orphaned HL7 messages in your system:

  1. Identify Active Orphan Generation:
    Use a SQL query to locate orphaned HL7 messages. An orphaned message is one that exists but is missing from Ens.MessageHeader or Ens_Util.IOLogObj. The suggested query is:

    SELECT HL7.ID, HL7.DocType, HL7.Envelope, HL7.Identifier, HL7.MessageTypeCategory, HL7.Name, HL7.OriginalDocId, HL7.ParentId, HL7.TimeCreated
    FROM EnsLib_HL7.Message HL7
    LEFT JOIN Ens.MessageHeader hdr ON HL7.Id=hdr.MessageBodyId
    LEFT JOIN Ens_Util.IOLogObj ack ON HL7.Id = ack.InObjectId
    WHERE hdr.MessageBodyId IS NULL AND ack.InObjectId IS NULL
    

    This will identify message bodies with no headers or IO log entries 12.

  2. Common Causes:

    • Negative ACKs: If Operations’ Reply Action Codes process Negative ACKs as “Completed,” they can create orphaned messages. Review these configurations 1.
    • Schema Mismatches: Incoming ACKs that do not adhere to your defined schema will be stored as orphaned messages. Correct the schema to match the ACKs received 12.
    • Other Programming Errors: Look for code that creates and saves EnsLib.HL7.Message objects but doesn’t send them anywhere, e.g., via %New, ImportfromString, or ImportfromStream methods. Analyze your code flow for situations where a message may not be forwarded or processed entirely 345.
  3. Debugging Process:

    • Use the creation timestamp (TimeCreated) of the orphaned messages to narrow down potential sources. Investigate operations, processes, or services active during this timeframe 35.
    • Check configurations such as ArchiveIO or message routing rules, especially for conditions using “WHEN” statements without “OTHERWISE” fallbacks 5.

By addressing issues like schema mismatches, reviewing operation settings, and ensuring complete processing of messages, you can prevent the generation of orphan HL7 messages 14235.


Sources:

Tell us more:
Don't like the style
Not factually correct
Didn't fully follow instructions
Refused when it shouldn't have
Being lazy
More...
Submit
0 0
Enrico Parisi · 2 hr ago

It's not easy but you may find ways to narrow the origin.

One possibility is to check the journal file entry where the corresponding global node of the HL7 Message
To identify what journal file to check/search look for a non empty HL/ message this ID cose to the empty orphaned message and find the date/time it was created.


HL7 messages (not segments) are stored in ^EnsLib.H.MessageD(MessageID).
Find in the journal file the entry of the creation of the empty orphaned message, it contains the process id ($job) that created the message and exact date-time of creation.

The process id may be used to point what Business Host (BS, BP or BO) created the message.

Then I'd look for the trace of messages sent/received by that Business Host "around the time" the empty message was created.

All this is possible and relatively easy if the empty orphaned message is relatively new (the newer the better), if old, then you may not have the journal file and/or the job that created it may not be still running (restart production or host, etc.).

0
Scott Roth  1 hr ago to Enrico Parisi

If you have a Business Rule that identifies a Message but does a Return instead of a DTL could it be creating a message?

0