Ens.Util.IO.Log - Querying %RegisteredObject ID via SQL?

I'm running SQL reports on some HL7 messages and need to report the raw content of both the outbound message and the ACK response.

When looking in a Visual Trace at an I/O (Ens.Util.IOLog), under the Header tab it lists "InObject" and "OutObject" as each having values - in the example I'm looking at, the OutObject value is the EnsLib.HL7.Message ID I need for the outbound message, and the InObject value is the EnsLib.HL7.Message ID I need for the ACK response. My thought was that I could query that class via SQL and do two joins on the EnsLib_HL7.Message table (one joined on the InObject ID and one joined on the OutObject ID), returning the RawContent field from each.

However, when querying that class via SQL (Ens_Util.IOLog), both of those properties return as blank in all queries.

Looking at the code of the Ens.Util.IOLog class, the two properties "InObject" and "OutObject" are both instances of %RegisteredObject. Presumably  then the SQL return is blank because it can't render the stored %RegisteredObject object as a text string for display.

I dug a bit deeper and found the part that renders the HTML seen in the Visual Trace (where the IDs I need are returned correctly), and in ObjectScript it seems to grab that value using the syntax tObject.%Id(), where tObject is either the InObject or OutObject.

I just can't figure out how to amend the Cache SQL query to return that same value. Any advice?

  • 0
  • 0
  • 61
  • 0
  • 0