#Message Search

4 Followers · 51 Posts

All communication within an InterSystems Ensemble production is accomplished with messages. InterSystems Ensemble provides many tools for viewing and working with messages.

Documentation

Question Kevin Furze · Nov 15, 2017

I searched fror "documenting classes" from the search button with no filtering. it naturally came back with 559 responses, but to me, the responses (and therefore the search)  came without context.

for instance,  one of the texts came back with:

Answer:

In first you should define ODBC DSN in your operation system, to your Oracle DB.  Then you can look at this page in the documentation and class %SQLGatewayConnection Vote up! Vote down! Rating: 0 .

3
0 368
Question Julian Samaroo · Mar 27, 2017

Hey all! I'd like to collect some feedback regarding searching for messages using the Message Viewer. I'd like to find out what things regarding the Message Viewer you all in the community have found difficult/confusing/poorly documented. This can of course include things that you don’t know how to do yet, but would like to learn about.

For an example, I’ve had issues searching through messages containing SDA for specific text fragments, because my searches always timeout or don’t return any matching messages.

4
0 628
Question Kevin Furze · Jul 31, 2017

suggestions to try to make the searching of the community better, more relevent

I've been searching within the community for an article about troubleshoting SQL's working out how efficient they are, and how to look inside the system for other SLQ's that we used but may be inefficient,  (still haven't found it, and getting frustrated)

In this instance, after many guesses, I tried

sql "how to" analyze plan tutorial efficiency inefficient troubleshooting highest

I know I've seen the article about this very subject, but it's getting darned hard to find things in the community.

3
0 323
Question Yone Moreno Jiménez · Feb 28, 2025

Good morning,

We need your help:

We wonder if there is a way to filter EnsLib.DICOM.Document, by using its DataSet properties on the Message Viewer.

For example, we would like to find the following DICOM.Document which DataSet.AccessionNumber is SR115985013100

By using the Message Viewer Filter we have tried the following:

FixedDataSet.AccessionNumber = SR115985013100

Because when we look fod a Body Property of the EnsLib.DICOM.Document it shows this drop down menu:

However, it replies with an error:

ERROR #5540: SQLCODE: Message -29: Field 'ENSLIB_DICOM.DOCUMENT.

3
0 209
Question Don Rozwick · Mar 22, 2017

Ensemble 2014.1.5

Inbound EnsLib.HTTP.GenericMessage

<?xml version="1.0" ?>
<!-- type: EnsLib.HTTP.GenericMessage id: 349 -->
<HTTPMessage xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Stream>
{ "patient": { "identifier": "E23456778", "token": "PQOIWUE)&!@TT$1234706125" } }

</Stream>

<Type>
GC

</Type>

<HTTPHeaders>
<HTTPHeadersItem HTTPHeadersKey="CharEncoding" xsi:nil="true"></HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="HTTPVersion">
1.
2
0 882
Question Ewan Whyte · Feb 21, 2018

I'm trying to get a count of specific message type with a specific entry and thought I could build the query in Message Viewer but  this does not provide counts (as far as I am aware). So when I take the SQL from 'Show Query' it omits the segment criteria as the code shows below. 

 I have attached the criteria that has been excluded. Is this possible?

Thank you

SELECT head.ID AS ID, 
       {fn RIGHT(%EXTERNAL(head.TimeCreated),12)} AS TimeCreated,
       head.SessionId AS SESSION,
       head.Status AS Status,
       COUNT (*) AS messages,
       CASE head.IsError
           WHEN 1 THEN 'Error'
           ELSE 'OK'
       END AS Error,
       head.SourceConfigName AS SOURCE,
       head.TargetConfigName AS Target,
       head.SourceConfigName,
       head.TargetConfigName,
       head.MessageBodyClassName AS BodyClassname,
       head.MessageBodyId AS BodyId,
       EnsLib_HL7.Message.%ID AS Body_ID,
       NULL AS Body_OBR_SpecimenSource_specimensourcenameorcode_identifier
FROM Ens.MessageHeader head,
     EnsLib_HL7.Message
WHERE head.TargetConfigName = 'ReviewOrders Router'
  AND head.%ID >= 189143244
  AND head.%ID <= 189589516
  AND (((head.SourceConfigName = 'Review Pathology Inbound'
    OR head.TargetConfigName = 'Review Pathology Inbound'))
  AND head.MessageBodyClassName='EnsLib.HL7.Message'
  AND head.MessageBodyId=EnsLib_HL7.Message.%ID)
ORDER BY head.ID DESC

2
0 1669
Question marco calderon · Jun 18, 2018

Hello!,

I was wondering if some one have an example code of the MessageBank Helper Class? , im currently using the MessageBank ok to store all message/events, but i need to be able to search for messages using the bodyclass properties. 

I've read that using MessageBank Helper Class you can do that, but i just cant find anything , documentation only says use the OnBankMSG() method and thats it.

1
1 527
Question Daniel Lee · Aug 1, 2023

I would like to search for all messages where their body size is greater than 3MB. 

I have searched through the common Header and body properties and I have not found a size property. I have looked at the extended properties but I am unsure if any of the extended classes allows me to find the Doc size. 

I have stepped through most of the body property classes related to messages or documents that have an exposed property that filters by document or message size. 

Is there a way to do this within the Message Viewer or Terminal? 

Thank you in advance. 

Dan 

4
0 494
Question Stuart Byrne · May 4, 2017

Hi,

I've built a custom HL7 searchtable, but wish to remove some of the items.

I've removed the items I no longer wish to index recompiled the custom searchtable, however the previous searchtable values are available when searching messages in the namespace.

Do I need to rebuild the index for this searchtable to purge searching the old values?

I have stop and started the production.

Regards

Stuart

2
0 469
Question Ahmad Bukhtiar · Sep 23, 2020

Any syntax help, i want to check different msg types and then reach out to the value in that particular segment. Here is example, i want to get SSNNumber from a method. Trying to use NOTIN, and Lookup

Class Training.RulesFunctionSet Extends Ens.Rule.FunctionSet

{

ClassMethod getEmiratesId(pHL7 As EnsLib.HL7.Message) As %String
{
SET msgType = pHL7.GetValueAt("MSH:MessageType.TriggerEvent")
 

IF msgType NotIn "A39,A40,O01,O11,O09,R01" {
return pHL7.GetValueAt("PID:SSNNumberPatient")}

IF msgType In "A39,A40" {
 return pHL7.GetValueAt("PIDgrp(1).

5
0 789
Question Jimmy Christian · Dec 21, 2023

Hello community,

I am trying to see the complete HL7 message for the class  EnsLib.HL7.Message.

But it is showing the truncated version only.

I also tried to convert to stream

msg.OutputToLibraryStream(.streammsg)
newmsg=##class(EnsLib.HL7.Message).ImportFromLibraryStream(streammsg)

While (streammsg.AtEnd = 0) {
     Set len = 1000
        Set tPrintMessage=newstream.Read(.len)
     Write tPrintMessage
}

But when i print it, its not showing complete message.

Any idea or suggestions?

Thank you in advance.

Jimmy Christian.
 

2
1 389
Question prashanth ponugoti · Oct 23, 2024

Hello Experts ,

Could you help to search message details based on MRN in intersytems iris. 

We have created 100+ interfaces and currenly in live (interystems cloud) . Now I try to search message details based on MRN using below query. it is working fine in DEV. but in prod it is taking ages.

SELECT Header.SessionId, Header.SourceConfigName ,Body.RawContent
FROM Ens.MessageHeader AS Header 
JOIN EnsLib_HL7.Message AS Body ON Header.MessageBodyId = Body.ID     
 where  Body.TimeCreated BETWEEN '2023-03-15 13:10:22.993' AND '2023-03-15 13:10:25.993'
 AND Body.

2
0 198
Question Craig Regester · Oct 13, 2021

Good morning -

As we're starting to create more custom message classes to represent out JSON-based integrations, I was pondering how to implicitly grant SELECT privileges to a specific Security Role so they can utilize Message Viewer to search through the message history.

So if all of our custom JSON message classes are under OurParentPkg.Messages.REST.* (e.g., OurParentPkg.Messages.REST.AddPatientRequest and OurParentPkg.Messages.REST.AddPatientResponse), is there a method to ensure that our analysts can be granted the SELECT permission to anything created under OurParentPkg.Messages.

6
1 533
Question Murillo Braga · Aug 3, 2016

Hello guys,

One thing keeps annoying me and I'm pretty sure it does many other people (my workmates as well, lol): every time I access the 'Message Viewer' screen, the 'Time Format' come with 'Time only' as a default. Can I make 'Complete' as the default value for it?

Thanks!

2
0 522
Question Sergio Vidal · Mar 21, 2019

Hi,

I want to create a messages statistics group by month and year using deepsee. To do that I'm creating a DeepSee data model based on Ens.MessageHeader.

I added both SourceConfigName and TargetConfigName as dimensions and now I'm trying to add TimeCreated but I get these messages 

ERROR #5001: Level in time dimension must have a timeFunction: TimeCreated.H1.TimeCreated
  > ERROR #5490: Error running generator for method '%GetModel:User.Mensajes' 
ERROR: %DeepSee.CubeDefinition.cls(%GetModel) of generated code compiling subclass 'User.Mensajes'
    > ERROR #5030: An error occurred while compiling class 'User.Mensajes'
Compiling routine User.Mensajes.1
3
1 449
Question Jonathan Anglin · Jan 6, 2022

Problem to Solve: When an HL7 message hits a particular Process, I need to use the placer order number therein to query the messages that came in over the last 24 hours on a particular Service and grab discrete pieces of data that came in the latest message that has that placer order number.

The code I'm (currently) using looks like this:

<assign property='FullMessage'     action='set' value='"PID||TEST"' />
<sql>
    <![CDATA[SELECT Full_Message INTO :FullMessage, head.ID As ID, {fn RIGHT(%EXTERNAL(head.TimeCreated),999 )} As TimeCreated,
head.SessionId As Session,
head.Status As Status,
CASE head.IsError WHEN 1 THEN 'Error' ELSE 'OK' END As Error,
head.SourceConfigName As Source,
head.TargetConfigName As Target,
head.TargetConfigName,
head.MessageBodyClassName As BodyClassname,
(SELECT LIST(PropValue) FROM EnsLib_HL7.SearchTable WHERE head.MessageBodyId = DocId And PropId=7) As SchTbl_ORC2,
EnsLib_HL7.SearchTable.PropId As SchTbl_PropId,
head.MessageBodyId As BodyId,
EnsLib_HL7.Message.%ID As Body_ID,
EnsLib_HL7.Message.RawContent AS Full_Message
FROM Ens.MessageHeader head, EnsLib_HL7.SearchTable, EnsLib_HL7.Message
WHERE Head.TimeCreated >= DATEADD(day, -1, GETDATE())
AND Head.TimeCreated <= GETDATE()
AND ((head.SourceConfigName = 'SITE ORM-ORU Inbound')
AND (head.TargetConfigName = 'SITE ORM 1 PreProcessor')
AND head.MessageBodyClassName=(('EnsLib.HL7.Message'))
AND head.MessageBodyId = EnsLib_HL7.SearchTable.DocId
AND EnsLib_HL7.SearchTable.PropId = 6
AND EnsLib_HL7.SearchTable.PropValue = '1234567890'
AND head.MessageBodyClassName='EnsLib.HL7.Message'
AND head.MessageBodyId=EnsLib_HL7.Message.%ID)
ORDER BY head.ID Desc
    ]]></sql>

<assign property='target.{PID:2}'   action='set' value='..Piece(..Piece(FullMessage,"PID",2),"|",3)' />
4
0 822
Question Colin Brough · May 1

We have a large, existing production taking a feed from a single up-stream system and sending to a wide-variety of downstream systems. One of the downstream systems has been decommissioned, and we have deleted the classes that implemented the routing/transformations from the namespace, and deleted the components from the production (Wardview and WV Out in the diagram below). We now want to delete the messages associated with those components without deleting the messages associated with any other components.

1
0 60
Question Brian Porterfield · Dec 27, 2017

I have made a complete copy of our test namespace into a secondary test namespace.  Thereby we can test with our current EHR version and our soon to be deployed EHR version simultaneously.    However, we have a number of saved searches within the Message Viewer that we would like to have available within our secondary namespace.  Is it possible to export the saved searches within the message viewer?

Thanks!

3
0 513
Question Stefan Schick · Mar 24, 2022

Hello,

I'd like to add/remove items to/from a custom HL7 searchtable (which extends EnsLib.HL7.SearchTable).

Adding new items worked fine by:

  • -add new item to class definition
  • compile class in all namespaces
  • reindexing messages with the BuildIndex() method

Question 1:

How can I remove items from the searchtable properly? Doing the same as above (removing them from the class, recompiling, reindexing) seemed to work, but the removed items still appear in the message viewer's search criteria list. So I think there must be an additional step to the procedure. What am I missing?

3
0 574